Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

This does not seem to be the case. setModelState calls Entity::SetWorldPose which calls Entity::SetWorldPoseModel which calls Entity::PublishPose which calls World::PublishModelPose which only queues up the requested change in the model.

The actual change is applied in World::Step which calls World::ProcessMessages where the requested changes is propagated to the rendering scene via updateScenePose.

In my case, my sensor (Gpu Laser) uses the rendering Scene for updates. Hence it cannot be guaranteed that the scene is updated when setModelState returns. Instead, one needs to wait for the next World::Step call. This may also explain why my waits seem to stop working when my computer is heavily loaded.