Home | Tutorials | Wiki | Issues
Ask Your Question
2

Timing, function and sequence of the gazebo "world update cycle" and the "plugin update cycle"

asked 2013-11-14 09:47:46 -0600

Christoph gravatar image

Hey all,

I got some questions concerning the procedure of the world update cycle and the onUpdate function of plugins, because I couldn't find that information in the gazebo wiki.

  1. How often is the world state updated?

  2. How is it implemented and whats happening in one update cylce (in short)?

  3. Does the onUpdate method of a plugin block the world update cycle?

  4. What happens when there are more than one plugins with an onUpdate method? Are these processed in parallel or sequentially?

  5. How is the interaction between the world update and sensor plugins (like the gazebo_ros_laser or gazebo_ros_openni_kinect) that are running in its own thread? Does the world call them in the given clock pulse set in the sdf to get the sensor data?

  6. Does the existence of a mutex in your onUpdate method, that is used to read or set some global variables, has any influence on the update behaviour between the world and the plugin? Like for the case that the world is running an update cycle and the onUpdate method is still reading the global variables. The same question refers to the call of (short) functions in the onUpdate method.

  7. Does the existence of a shared mutex, used in the onUpdate method and some functions to set and read some global variables, block the onUpdate method in the case that the mutex is locked in one of the functions while the onUpdate methods need the mutex to finish its cycle?

Thanks for your help,

Christoph

edit retag flag offensive close merge delete

Comments

Did you ever get an official answers to these questions?

josephcoombe gravatar imagejosephcoombe ( 2018-07-27 08:11:30 -0600 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2014-04-14 04:53:02 -0600

philonous gravatar image

Regarding your first question the SDF specification states:

<real_time_update_rate>
 Description: Rate at which to update the physics engine (UpdatePhysics calls per real-time second).  (was physics.sdf's update_rate).
 Required: 1    Type: double    Default: 1000

How often the world state is updated depends on what is written in the "world-file" to be simulated. Regarding the other questions – I would be very interested in answers as well!

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2013-11-14 09:47:46 -0600

Seen: 1,358 times

Last updated: Apr 14 '14