Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Computing Euler angles from rotation matrix: boundary cases

I want to compute the Euler angles from a rotation matrix in order to find out the orientation associated to that rotation. For that purpose, I am using MATLAB and the function rotm2eul that gives me the rotation first about x-axis, then about y-axis and finally the z-axis.

I am using a signal with 1000 frames and for each frame a rotation matrix is computed, as well, the three Euler angles. However, when I am going to see the Euler angles' curve, there is some "jumps" as I shown on the figures below.

enter image description here

enter image description here

On Technique 1, I think it jumps from -180º to 180º which should be the same. In fact, the upper portion of the plot seems a continuation of the lower portion. So in this case I thought I could subtract 360º to the upper portion to get the plot. But I am not sure if I do this I am falsifying the results.

On Technique 2, it makes a jump with a different reason of the previous one. I think it must be because the angle associated with the y-axis reaches 90º which should be a boundary case. But in this case I don't know how should I correct the data or , like previously, if I want to correct the plot is falsifying the euler angle result.

like image 806
Fatias7 Avatar asked Aug 23 '26 21:08

Fatias7


1 Answers

Technique 2: This is a Gimbal lock, known feature of Euler angles. You can't avoid it completely. You can change the rotation order, but it will appear in another position.

like image 68
AVK Avatar answered Aug 26 '26 12:08

AVK



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!