How to get right form of the Euler angle through collected quaternion?
Posted: Thu Jun 03, 2021 10:13 am
Hello, everyone,
Currently I can get some pose data from Motive, including the position and quaternion data. I use the python sample client in the SDK3.1 to receive and record the pose data. According to the official documentation https://v22.wiki.optitrack.com/index.ph ... ate_System, we can know that the default coordinate of the Motive2.2.0(the version I am using now) is right-handed Y-up coordinate system, and the order is 'XYZ' order. But in the Motive, we can change it to the right-handed Z-up coordinate system(XYZ order), and this is also the setting that I am currently using.
However, when I use the following Matlab code to convert the quaternion to Euler Angle, the pitch and yaw is in the right form. The roll angle is is flipping between +3.14 to -3.14 rad, but the right value should be around 0 rad. Also, I tried to use the WinFormTestApp.exe to receive the data, and under this case, the roll angle is in the right form. or
The Motive setting and orientation data is attached here. How can I get the right form of the roll angle(the right value should be around 0 rad)? any suggestion is helpful.
Currently I can get some pose data from Motive, including the position and quaternion data. I use the python sample client in the SDK3.1 to receive and record the pose data. According to the official documentation https://v22.wiki.optitrack.com/index.ph ... ate_System, we can know that the default coordinate of the Motive2.2.0(the version I am using now) is right-handed Y-up coordinate system, and the order is 'XYZ' order. But in the Motive, we can change it to the right-handed Z-up coordinate system(XYZ order), and this is also the setting that I am currently using.
However, when I use the following Matlab code to convert the quaternion to Euler Angle, the pitch and yaw is in the right form. The roll angle is is flipping between +3.14 to -3.14 rad, but the right value should be around 0 rad. Also, I tried to use the WinFormTestApp.exe to receive the data, and under this case, the roll angle is in the right form.
Code: Select all
[roll, pitch, yaw] = quat2angle(quat,'XYZ');
Code: Select all
RPY = quat2eul(quat,'XYZ')';