0
$\begingroup$

Rosanswers logo

Hi All

I'm trying to teleoperate a robot using the gazebo simulator. I need to slow down the simulation, because mannually controling the robot is very hard when it is running 3 or more times faster than the real time.

is there any tag or property in gazebo to limit the simulation to a maximum of real time?

thanks a lot

Mario


Originally posted by Mario Garzon on ROS Answers with karma: 802 on 2012-08-16

Post score: 2

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

It looks like you can set the simulator to use wall clock time by setting the parameter '/use_sim_time' to false in the gazebo world launch file (i.e. gazebo_worlds/launch/empty_world.launch).

Alternatively, you can set the update rate of the simulation to match the dt simulation step time (see gazebo_worlds/worlds/empty_throttled.world --line 10)

<physics type="ode" update_rate="1000">
  <ode>
    <solver type="quick" dt="0.001" iters="10" sor="1.3" />
     ...
  </ode>
</physics>

This should also produce (at least roughly) the behavior you're looking for.


Originally posted by pgrice with karma: 196 on 2012-08-16

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by hsu on 2012-08-16:
actually, setting /use_sim_time to false in simulation has unexpected results. But you are correct, update_rate * dt = upper bound of the real-time factor of the simulation. e.g. 1000 * 0.001 = 1 throttles simulation to be real-time at the maximum.

Comment by Mario Garzon on 2012-08-17:
I tried the solution, the simulator runs with the correct real-time factor, but when i try to spawn any object it gives a message "waiting for service spawn_urdf_model" and doesn't put the model on the simulator

Comment by hsu on 2012-08-17:
@Mario Garzon: there is a bug in 1.6.12 where the gazebo node name needs to be "gazebo". see http://answers.ros.org/question/41646/spawning-problems-with-fuerte-ubuntu-1204/. anticipate fixes in next release 1.6.13.

Comment by Mario Garzon on 2012-08-20:
Thanks a lot.. it works fine!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.