0
$\begingroup$

Rosanswers logo

Hi everyone!!!

I have little problem with Gazebo. How I can make the sim_time equal to real time?, in another words, How I can do for what 1 seconds in sim_time equal to 1 seconds in real time?

Thanks!!


Originally posted by Ivan Rojas Jofre on ROS Answers with karma: 70 on 2012-03-22

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

In your *.world file, add an <updateRate/> tag under <physics:ode> and set its value to -1, for example:

<physics:ode>
  <stepTime>0.001</stepTime>
  <gravity>0 0 -9.8</gravity>
  <cfm>0.0000000001</cfm>
  <erp>0.2</erp>
  <quickStep>true</quickStep>
  <quickStepIters>10</quickStepIters>
  <quickStepW>1.3</quickStepW>
  <contactMaxCorrectingVel>100.0</contactMaxCorrectingVel>
  <contactSurfaceLayer>0.001</contactSurfaceLayer>
  <updateRate>-1</updateRate>
</physics:ode>

That should throttle sim time to real time.


Originally posted by hsu with karma: 5780 on 2012-03-22

This answer was ACCEPTED on the original site

Post score: 5


Original comments

Comment by Ivan Rojas Jofre on 2012-03-28:
Thanks!!!

Comment by phil0stine on 2012-06-25:
Has this been tested in Fuerte? I am not able to get anything except faster than real time behavior.

Comment by SL Remy on 2012-10-10:
How much faster than realtime do you see @phil0stine? (I've noticed factors [0.97-1.32] )

Comment by SL Remy on 2012-10-10:
I take that back.. when left to run long enough, the factors rise. Maybe it's time for a new question?

Comment by phil0stine on 2012-10-12:
Interestingly, I can get gazebo empty.world to set sim_time to real_time when update_rate is greater than zero, but not when it's less than zero (it runs about 10x in that case)

$\endgroup$

Your Answer

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