Change static model pose in `PostUpdate`
Hi,
I'm working on a System plugin in Gazebo Garden and I need to move a model in the PostUpdate
callback.
I found the SetWorldPoseCmd
function, but it requires a not constant Entity Component Manager and it cannot be used.
What is the correct way to set a new position for static objects?
I tried with this, but as expected it does not work:
gz::math::Pose3d newPose(mCalibX,mCalibY,mCalibZ,mCalibRoll,mCalibPitch,mCalibYaw);
gz::sim::EntityComponentManager ecm;
ecm.CopyFrom(_ecm);
mModel.SetWorldPoseCmd(ecm,newPose);