Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Get a pose of nested model relative to it's parent model


I've been experimenting with Gazebo plugins recently and I've encountered problem while trying to publish tf transformations from Gazebo to ROS.

I have sdf model of quadcopter with nested model of camera attached to the quadcopter with joint. I then created model plugin where I'm trying to get position of my nested camera model relative to quadcopter model by GetRelativePose() function documented here.

But it doesn't work and it seems like I'm getting world coordinates instead of relative ones. Also when I try GetParent()->GetName() function it gives me my quadcopter's name which is fine. But when I do the same on model with GetParentModel()->GetName() it gives me my camera's model name which is weird to me...

Any idea what's happening and what am I missing?

Thank you.