Gazebo | Ignition | Community
Ask Your Question
0

Link Local Coordinate Frame

asked 2019-03-01 06:31:55 -0500

dagiopia gravatar image

updated 2019-03-01 06:34:02 -0500

I wanted to get the local coordinate frame of a link relative to the world. I guess it can be obtained by doing a coordinate transformation using the pitch, roll, yaw parts of the WorldPose result but it would be preferable if there's something in the gazebo api that already does that or may be in the ignition math library function that does transformation. For example one might want the direction of the X axis so if there's a better way than transformation which gazebo already does. The picture below might better explain what I wanted. image description

Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-03-01 09:58:19 -0500

chapulina gravatar image

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.

edit flag offensive delete link more

Comments

hey thanks for the quick answer! I realize doing a rotation is the way to go but I wanted to know if there was some function available in the gazebo or ignition api that already did that to avoid redundancy and I assume whatever implementation is there would be much more efficient than mine. I found RotateVector of ignition::math that does what I needed.

dagiopia gravatar imagedagiopia ( 2019-03-15 01:42:53 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2019-03-01 06:31:55 -0500

Seen: 873 times

Last updated: Mar 01 '19