Clear Filters
Clear Filters

quat2angle r2 rotation threshold

8 views (last 30 days)
Pierre
Pierre on 6 Nov 2013
Answered: arushi on 12 Aug 2024 at 6:28
I am using the function quat2angle with IMUs, and when I am doing a motion around the r2 axis of 90°, I see a saturation in the r2 curve (pitch) and suddenly r1(yaw) and r3(roll) compensate to reach the desired rotation. However, I don't want to see this biased phenomenon and I would like just to see the normal r2 angle that I actually do with the IMU. Would you have any suggestions ?

Answers (1)

arushi
arushi on 12 Aug 2024 at 6:28
Hi Pierre,
The phenomenon you're experiencing is likely due to the issue of gimbal lock, which occurs when two of the three axes in a 3D rotation system become aligned, causing a loss of one degree of freedom.
To avoid this issue and get a more accurate representation of the rotation around the r2 axis (pitch), you can use alternative representations of rotations that do not suffer from gimbal lock. Here are a few suggestions:
1. Use Quaternions Directly
Instead of converting quaternions to Euler angles, you can work with quaternions directly. Quaternions provide a robust and gimbal-lock-free way to represent rotations. If you need to visualize or interpret the rotation, you can extract the relevant information directly from the quaternion.
2. Use Rotation Matrices
Another approach is to use rotation matrices, which also do not suffer from gimbal lock. You can convert the quaternion to a rotation matrix and then analyze the matrix to understand the rotation.
3. Use Alternative Angle Representations
If you need to work with angles, consider using other representations such as tilt angles or axis-angle representation, which can provide more intuitive and gimbal-lock-free descriptions of rotations.
Hope this helps.

Categories

Find more on Aerospace Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!