ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

real time and sim time in gazebo [closed]

asked 2012-03-22 13:05:38 -0500

this post is marked as community wiki

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

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!!

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Ivan Rojas Jofre
close date 2013-05-12 15:00:47

1 Answer

Sort by ยป oldest newest most voted
5

answered 2012-03-22 14:33:11 -0500

this post is marked as community wiki

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

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.

edit flag offensive delete link more

Comments

Thanks!!!

Ivan Rojas Jofre gravatar image Ivan Rojas Jofre  ( 2012-03-28 02:35:56 -0500 )edit

Has this been tested in Fuerte? I am not able to get anything except faster than real time behavior.

phil0stine gravatar image phil0stine  ( 2012-06-25 13:53:14 -0500 )edit

How much faster than realtime do you see @phil0stine? (I've noticed factors [0.97-1.32] )

SL Remy gravatar image SL Remy  ( 2012-10-10 08:25:49 -0500 )edit

I take that back.. when left to run long enough, the factors rise. Maybe it's time for a new question?

SL Remy gravatar image SL Remy  ( 2012-10-10 09:44:42 -0500 )edit

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)

phil0stine gravatar image phil0stine  ( 2012-10-12 17:11:33 -0500 )edit

Question Tools

Stats

Asked: 2012-03-22 13:05:38 -0500

Seen: 2,215 times

Last updated: Mar 22 '12