ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
There is a Python version of the KDL library (PyKDL), which allows you to do all sorts of conversions between rotation representations. An example would look like this:
{{{ import PyKDL a = PyKDL.Rotation.Quaternion(x, y, z, w) b = PyKDL.Rotation.Quaternion(x, y, z, w)
c = a * b.Inverse() c.GetQuaternion() # get quaternion result c.GetRPY() # get roll pitch yaw result c.GetEulerZYX() # get euler angle result in zyx format }}}
There is a small tutorial here that will give you some more background.
2 | code block |
There is a Python version of the KDL library (PyKDL), which allows you to do all sorts of conversions between rotation representations. An example would look like this:
{{{
import PyKDL
a = PyKDL.Rotation.Quaternion(x, y, z, w)
b = PyKDL.Rotation.Quaternion(x, y, z, There is a small tutorial here that will give you some more background.