Ask Your Question

Issues about quaternion and conversion

asked 2013-10-31 07:28:46 -0500

SM gravatar image

updated 2016-10-24 09:02:12 -0500

ngrennan gravatar image

I an using the openni_tracker.cpp and the skeleton tracking. My questions are (A) how do I obtain the quaternion values of each join? (B) How do I convert each joint's rotation matrix (say 3 joints) to half space quaternion with respect to the torso in skeleton tracking. Thank you in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-10-31 10:57:28 -0500

The openni_tracker simply broadcasts transforms from the camera_frame_id frame (defaults to openni_depth_frame) to each of the joints of the user. Using a tf listener) one could write a simple node that looked up transforms between any two frames you are interested in. For example you could lookup the transform between the /torso and the /right_elbow. Once you have a transform object, the tf package provides functionality for converting to Euler angles, quaternions, SO(3), etc. See the geometry page and the rotation methods page. Then you could publish this info as whatever type of message you want.

Alternatively, you could write your own node that modified the source of openni_tracker that published a custom message in the form you want. I believe this is the route taken by the pi_tracker package. I have also worked with my own package that does this same thing. See and

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2013-10-31 07:28:46 -0500

Seen: 142 times

Last updated: Oct 31 '13