ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
It seems that creating a Matrix3X3 from the quaternion is not necessary since a transform already contains the rotation matrix. If you are working with TF, inside every Quaternion there is a Matrix3x3 called m_basis. When you call Transform::getRotation(), what you get is
From http://docs.ros.org/indigo/api/tf/html/c++/Transform_8h_source.html :
00120 Quaternion getRotation() const {
00121 Quaternion q;
00122 m_basis.getRotation(q);
00123 return q;
00124 }
So it could be that you may get away with:
transform.getBasis().getRPY(roll, pitch, yaw);
right?
2 | No.2 Revision |
It seems that creating a Matrix3X3 from the quaternion is not necessary since a transform already contains the rotation matrix. If you are working with TF, inside every Quaternion there is a Matrix3x3 called m_basis. When you call Transform::getRotation(), what you get is
From http://docs.ros.org/indigo/api/tf/html/c++/Transform_8h_source.html :
00120 Quaternion getRotation() const {
00121 Quaternion q;
00122 m_basis.getRotation(q);
00123 return q;
00124 }
So it could be that you may get away with:
transform.getBasis().getRPY(roll, pitch, yaw);
right?