Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Does setModelState block such that the next sensor readings account for the modified scene?

I am running a simulation involving many different configurations of a large number of objects. For each "cycle", I read the required object configuration and move the objects in the scene via the /setModelState ROS service. I wait (using simulated time) for what is equivalent to the sensor's publish rate (to make sure I receive the sensor measurements after moving the objects)

I am trying to track down a bug where my sensors in the scene occasionally don't register the new object positions. This does not happen every time, and the probability of it happening seems to decrease as I increase the wait time between moving the objects and getting the sensor readings.

To help narrow down the possibilities, I'd like to know if setModelState block (or stop time) until the next sensor readings. I.e. once setModelState returns, is it guaranteed that the next reading returned by the sensor uses the updated scene?