Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

I wanted to get the local coordinate frame of a link relative to the world

If you're calling WorldPose on the link, that's exactly what you should be getting. The position and orientation components of the pose you get will be expressed in the world frame.

one might want the direction of the X axis

The X axis is the easiest one, because it's the one used as a reference for the pose itself. So if your link's pose has 30 degrees yaw, that also means the link's X axis' yaw w.r.t. the world is 30 degrees. For the Y and Z axes you'll need to rotate from X to that axis.