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?
Are you using ROS in your simulation?
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.
I'm attempting to do the same thing, did you ever figure this out?
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
, andLink::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.