Quaternion transformations in Python
I'm trying to place some Markers in RViz, using a node written in Python. To this end, I need to create a geometry_msgs.mgs.Pose
with an orientation
Quaternion.
But I can't for the life of me find the utility and conversion functions that I need for Quaternions. There are some in tf.transformations
, but those produce numpy
Quaternions, which I would have to manually split up and throw into the geometry_msgs.msg.Quaternion
constructor.
Considering that Quaternions are of little use without a set of functions to work with them, my question is: Where are the proper conversion functions for Quaternions? That is, functions to create and modify geometry_msgs.msg.Quaternion
or to convert between a numpy
Quaternion (4-tuple) and geometry_msgs.msg.Quaternion
(object with x,y,z,w attributes).
My environment is Ubuntu 12.04 Precise, with ROS fuerte (using fuerte is currently mandatory for this project; I'm already looking into upgrading, but that's not at all easy).