Robotics StackExchange | Archived questions

Changing the relative pose of a link in simulation

Hello,

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?

Asked by Tao_Gazebo on 2018-12-03 16:55:04 UTC

Comments

Are you using ROS in your simulation?

Asked by brschettini on 2018-12-05 11:54:50 UTC

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.

Asked by nkoenig on 2018-12-06 11:11:10 UTC

I'm attempting to do the same thing, did you ever figure this out?

Asked by wil on 2019-05-07 09:46:02 UTC

Has anybody got this working? I'm trying similar thing but it didn't work so I ended up here. What I'm doing is that I create a model plugin that changes pose of a link in that model. I have one target joint in that model and I want to change the pose of its child. Using Link::SetInitialRelativePose, Link::SetRelativePose, and Link::SetWorldTwist to zero doesn't work. The link does change the orientation when I started in pause, but go back on play. By stepping it slowly rotates.

Asked by Veerachart on 2021-03-18 04:39:05 UTC

Answers