difference between euler angles and rotation vector

조회 수: 28 (최근 30일)
YunYuan XIONG
YunYuan XIONG 2021년 1월 25일
편집: James Tursa 2021년 2월 2일
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