I have two IMU sensors giving me Euler angles. I convert them to Quaternion by following
quaternion_angle_1=tf.transformations.quaternion_from_euler(roll_1,pitch_1,yaw_1)
quaternion_angle_2=tf.transformations.quaternion_from_euler(roll_2,pitch_2,yaw_2)
Now I want to caculate the angle between these measurements from the IMU sensors. How can I do that?
Sounds like you want the relative rotation between two quaternions. You could simple calculate the angle between the euler angles, then convert that to a quaternion. But if you need to do it strictly with quaternions
tf
allows you to do this directly: