The gazebo threading model requires all sensors and plugins to effectively operate within their own threads, with an assumption that no one is clobbering the others data. As far as it seems, this is OK as long as physics is running, as I believe the physics update happens outside of the sensor updates.
In the case of a plugin modifying the position of an object, in real-time, however, the sensor does not necessary know the true state of the world at the time it was run in its own thread.
Thread A: updates a pose manually (i.e. manually setting the pose of a body or the position of a joint)
Thread B: a laser scanner or camera viewing the scene
If A wakes up at t=0.5 and performs its update, while B also wakes up at t=0.5, it is very difficult to know whether the sensor collected data before or after A did its action.
Are there any built-in methods to allow such synchronization and make these changes atomic?
Post score: 0