matrix determined by eul2rotm does not match a matrix calculated by euler angles using rotm2eul
Afficher commentaires plus anciens
I calcurated euler angles from a rotation matrix using "rotm2eul".
And I tried to confirm if a matrix calculated from the euler angles using "eul2rotm" corresponds to the original matrix.
However, the recalculated matrix did not correspond to the original one.
I used a sequence "XYZ" for both calcurations.
Is this conformation process wrong?
I would like to reproduce a rotation matrix using euler angles.
If anyone knows solutions about this, please let me know.
Sincerely,
7 commentaires
James Tursa
le 19 Nov 2020
Please post your example.
Yiping Liu
le 19 Nov 2020
An example case of the rotation matrix you used would be helpful.
Imura Akiko
le 19 Nov 2020
David Goodmanson
le 21 Nov 2020
Hello Akiko,
Since I don't have the appropriate toolbox, it's hard to check this directly.
(Maybe someday Mathworks will have a "buy 80 different toolboxes, get one free" sale. Or maybe someday they will get justly concerned about the balkanization of their product and do some sensible consolodation).
It's easy to figure out the eul2rotm function, but not so easy for rotm2eul. Until you get an answer on this, you might want to try
eul2 = rotm2eul(R2, 'XYZ');
RR2 = eul2rotm(eul2, 'ZYX'); % reversed
just to see what happens. Or other variations on this theme, such as reversing the order of eul2 before feeding it to eul2rotm. For seeing the differences, your case 2 is better than case 1, since one of the angles in case 1 is quite small.
Imura Akiko
le 22 Nov 2020
Imura Akiko
le 22 Nov 2020
David Goodmanson
le 22 Nov 2020
Hello Akiko, it might be a small problem, but it's an interesting one, the finding that det = -1 changes things so radically.
Réponses (1)
Yiping Liu
le 23 Mai 2021
0 votes
When you feed in a rotation matrix to rotm2eul, if the matrix is not orthonormal, the rotm2eul will try to find the closest orthonormal matrix first. In that case if you try to convert the Euler angles back to rotation matrix, you won't get back the original one.
Catégories
En savoir plus sur Coordinate Transformations and Trajectories dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!