Does RViz convert quaternion to euler angles and then visualize a frame?
I'm wondering how does RViz
visualize a quaternion with a frame? Does it convert a quaternion to euler angles and then visualize the frame according to those euler angles? If yes, can someone point me to the code of this quaternion-to-euler conversion?
I'm asking because I noticed that if I use tf.transformations.euler_from_quaternion()
function provided by the ROS tf
library, the roll angle will drift a lot when pitch is close to ±90°. However, if I provide the same quaternion to RViz
, there's no such drifting problem. The visualized frame moves smoothly with any roll/pitch/yaw angles.