difference between euler angles and rotation vector

31 次查看(过去 30 天)
When transform a quaternion to 3 angles, I have a confusion about 'eulerd' and 'rotvecd'. Where the difference between them ? For example:
quat = quaternion(randn(1,4));
rotationVectorDegrees = rotvecd(quat); % rotation vector (degrees)
eulerAnglesDegrees = eulerd(quat,'XYZ','frame'); % euler angles (degrees)
Why they got different results ?

采纳的回答

James Tursa
James Tursa 2021-2-2
编辑:James Tursa 2021-2-2
The rotvecd( ) function gives a scaled rotation axis. I.e., what it would take to do a single rotation of an object on all three axes simultaneously to get from one orientation to another. The direction of the vector gives the rotation axis, and the magnitude of the vector gives the total rotation angle.
The eulerd( ) function gives the angles for performing three separate sequential rotations (not simultaneous) to get from one orientation to another. E.g., rotate about the X-axis by some amount first, then from that resulting position rotate about the Y-axis by some amount, then from that resulting position rotate about the Z-axis by some amount to get to the final orientation.
In general, anytime you deal with Euler Angles you are dealing with separate rotations that are chained together sequentially.

更多回答(0 个)

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by