How to convert Quaternion to Euler in ROS C++?

Hi, someone knows what library it’s the same but for c++?
I want to use for Real Basic Project C++

from tf.transformations import euler_from_quaternion

Hi @Voltedge ,

You would use #include <tf/tf.h>.
You must first convert quaternion to a matrix and then use matrix.getRPY(...) function.
Refer: Transform Quaternion - ROS Answers: Open Source Q&A Forum

Regards,
Girish

PS: Please change the title to an appropriate title. Your current title does not hint what you want!
A better title would be “How to convert Quaternion to Euler in ROS C++?”.

1 Like