Changing the relative pose of a link in simulation

asked 2018-12-03 15:55:04 -0600

Tao_Gazebo gravatar image

updated 2018-12-04 09:51:58 -0600

azeey gravatar image


I'd like to write a plugin that could change the relative position of a link to its parent. For now I can get the pointer of the link and use "SetRelativePose()" or "UpdateParameters()" to change the relative position. However, right after the position shift, the link immediately shifts back to its original position. I'd like it to stay. It's kinda like the changing the geometry of the model without relaunching the simulation or respawn the entire model. But so far I haven't been able to find a way to do it. Can anyone help?

edit retag flag offensive close merge delete


Are you using ROS in your simulation?

brschettini gravatar imagebrschettini ( 2018-12-05 10:54:50 -0600 )edit

Can you try first pausing simulation, then setting the relative pose, then unpausing simulation? The physics engine might be overriding your set relative pose call.

nkoenig gravatar imagenkoenig ( 2018-12-06 10:11:10 -0600 )edit