Gazebo | Ignition | Community
Ask Your Question

What does Update Rate control?

asked 2013-04-19 13:49:01 -0600

Bharadwaj Ramesh gravatar image

I have an SDF file, in which i have the following snippet:

<physics type='ode'>
  <gravity>0.000000 0.000000 -9.800000</gravity>

Here what does the realtimeupdate_rate parameter do ? Does 1000 mean it updates 1000 time per simulation second or a real world second ? If I want to control the update rate : i.e I have a controller that controls my model. This controller basically controls the position of a joint. But I want it to move at the rate I want it to. say for ex : I want to move 1 radian per second. and I do only a .1 radian increment in my plugin. Which means I need only 10 increments per real world second. So can this be achieved by settin the parameter as


Does that mean my plugin runs only 10 times/ REAL WORLD SECOND ?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-04-19 15:41:29 -0600

scpeters gravatar image

The real_time_update_rate controls the update rate of the physics engine. The product of real_time_update_rate and max_time_step determine the target real time factor, though for computationally demanding simulations, the target real-time update rate may not be achieved. If you set the real_time_update_rate to 10.0, with a max_step_size of 0.001, then your simulation will run in slow motion, at about 1% real time factor.

If your plugin uses an update function (for example using the ConnectWorldUpdateBegin event), then it will run after every physics update. If you want to throttle it's actions, then you can make a variable to keep track of the last time the plugin was updated and wait until a certain time has passed before updating further. The Sensor::Update function has some logic like that.

edit flag offensive delete link more

answered 2013-04-19 15:03:44 -0600

AndreiHaidu gravatar image


Yes it means per real world second. According to the SDF documentation:

Description: Rate at which to update the physics engine (UpdatePhysics calls per real-time second). (was physics.sdf's update_rate).

As for the 1 rad/second thing, you could set the speed of the joint only once to 1 rad/sec and it will stay that way. Setting the update rate so low will cause large computational errors in the simulation.

Cheers, Andrei

edit flag offensive delete link more


if realtimeupdate_rate = 1000. this means that, the physic engine will do 1000 iterations on the OnUpdate function in one simulation second not real second...

djou07 gravatar imagedjou07 ( 2015-02-03 08:53:13 -0600 )edit
Login/Signup to Answer

Question Tools



Asked: 2013-04-19 13:49:01 -0600

Seen: 16,320 times

Last updated: Apr 19 '13