ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
For anyone who stumbles upon this in the future, now there is a function available in the tf_transformations library called euler_from_quaternion in ROS2 Humble and above.
You can use it by importing it first from tf_transformations import euler_from_quaternion
Then convert the quaternion to roll, pitch, yaw by
orientation_list = [orientation_q.x, orientation_q.y, orientation_q.z, orientation_q.w]
(roll, pitch, yaw) = euler_from_quaternion(orientation_list)
self.pose_yaw = yaw