Gazebo | Ignition | Community
Ask Your Question
0

How to set Real Time Factor to 1.0 in Gazebo ROS Fuerte [closed]

asked 2012-11-07 11:55:01 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hi guys,

I have a problem in simulating multi agent system. The real time factor in gazebo (using ROS fuerte) flows between 0.1 and 1.1. I tried to set the option updateRate to -1 in order to cast the real time factor to 1.0. Is there any kind of suggestion I can use?

My .world file looks like

<gazebo version="1.0"> <world name="default"> <scene> <ambient rgba="0.5 0.5 0.5 1"/> <background rgba="0.5 0.5 0.5 1"/> <shadows enabled="false"/> </scene>

<physics type="ode" update_rate="-1">
  <gravity xyz="0 0 -9.8"/>
  <ode>
    <solver type="quick" dt="0.001" iters="10" sor="1.3"/>
    <constraints cfm="0.0" erp="0.2" contact_max_correcting_vel="10000.0" contact_surface_layer="0.001"/>
  </ode>
</physics>

<!-- Ground Plane -->
<model name="plane1_model" static="true">
  <link name="body">
    <collision name="geom_1">
      <geometry>
        <plane normal="0 0 1"/>
      </geometry>
      <surface>
        <friction>
          <ode mu="50.0" mu2="50.0" fdir1="0 0 0" slip1="0" slip2="0"/>
        </friction>
        <bounce restitution_coefficient="0" threshold="1000000.0"/>
        <contact>
          <ode soft_cfm="0.0" soft_erp="0.2" kp="1000000000.0" kd="1" max_vel="100.0" min_depth="0.0001"/>
        </contact>
      </surface>
    </collision>

    <visual name="visual_1" cast_shadows="false">
      <geometry>
        <plane normal="0 0 1"/>
      </geometry>
      <material script="Gazebo/Grey"/>
    </visual>
  </link>
</model>

<light type="directional" name="my_light" cast_shadows="false">
  <origin pose="0 0 30 0 0 0"/>
  <diffuse rgba=".9 .9 .9 1"/>
  <specular rgba=".1 .1 .1 1"/>
  <attenuation range="20"/>
  <direction xyz="0 0 -1"/>
</light>
<plugin name="joint_trajectory_plugin" filename="libgazebo_ros_joint_trajectory.so"/>
</world> </gazebo>

Thank you for your time and responce. Best regards,

Neostek

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by nkoenig
close date 2013-07-23 16:52:23.900687

2 Answers

Sort by ยป oldest newest most voted
0

answered 2012-11-08 02:49:47 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

It starts around 1.0, then when I run my code it speeds down up to 0.1, floating between 0.1 and 0.3 for all simulation. The cose is exactly the same than in ROS electric where this ratio time was fixed around 1.0. The problem is when the plugin is attached to the model. But the plugin has a computational cost not so high (I recall that in ROS electric I have no problem). I'm trying to run the controller with a lower frequency and see if it helps.

Is there such a way where I can set the number of threads to use for gazebo? Maybe it could help In addition if you know some tips I really thank you.

In addition, there are other models such as an arena and a quadrotor UAV. As I said, one of the main reason I chose Gazebo in ROS electric is because it yields me to run multi-robot simulation.

I do not think this is lost for ROS fuerte using Gazebo 1.0

edit flag offensive delete link more

Comments

Could you also post your plugin code?

nkoenig gravatar imagenkoenig ( 2012-11-09 13:01:18 -0600 )edit
0

answered 2012-11-07 13:01:20 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

The real-time factor changes back and forth between 0.1 and 1.1? How rapidly does that happen?

Does the same behavior happen when the plugin is not in the world?

Are other models added to the world dynamically?

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2012-11-07 11:55:01 -0600

Seen: 1,833 times

Last updated: Nov 08 '12