Express rotations in different coordinate frames

29 vues (au cours des 30 derniers jours)
Laura Coyle
Laura Coyle le 5 Août 2021
I have a question related to 3D orientation transformations.
Say I have a nominal coordiate system, XYZ. I have three rotations defined about those axes, dRX, dRy, dRZ.
I also have a second coordinate system X',Y',Z' that is rotated a known amount with respect to XYZ and shares its origin. I'd like to define new rotations about these axes (dRX',dRY',dRZ') that give an equivalent absolute position as the first set of rotations (aka I'd like to express the rotations in a new coordinate frame).
I understand how to do this transformation with 3D points (XYZ) using 3D rotation matrices, but I don't think you apply the same rotation matrices to actual rotations (dRX,dRY,dRZ). I've been reading about quaternions but don't quite understand how to accomplish this. I also don't have the toolboxes for the 'quaternion' function even if I could use it blindly.
  1 commentaire
J. Alex Lee
J. Alex Lee le 6 Août 2021
Wouldn't you just rotate your rotations?
I only know just enough to be dangerous, but either you are asking how to apply rotations to tensorial quantities (e.g., other rotations) because it is not the same "formula" as for vectorial quantities, or you are asking why expressing rotations in rotated frames is not the same as rotating the rotations.
If you are asking the latter, sorry ignore me because I guess I do not understand the situation as well as I thought!
If you are asking about the former though and you really can just rotate the rotation, then to rotate a rotation you not only left-multiply by your 2nd rotation but you also have to right-multiply by the inverse (in this case transpose) of the rotation.

Connectez-vous pour commenter.

Réponses (2)

Matt J
Matt J le 6 Août 2021
Modifié(e) : Matt J le 6 Août 2021
I don't know in which order you plan to apply dRx,dRy,dRz, but let's say you just compose them into a single 3x3 rotation matrix dR. Also, let T be the rotation matrix that maps [X,Y,Z] to [Xp,Yp,Zp]. Then to re-express dR in the coordinate system [Xp,Yp,Zp] you would do,
dRp=T.'*dR*T
You can then decompose dRp into whichever of the 6 possible Tait-Bryan combinations dRpx,dRpy,dRpz is your favorite. The attached file should help with that step.

Eric Frater
Eric Frater le 6 Août 2021
Consider a point in cartesian coordinates (X, Y, Z) with orientation defined by a unit vector that extends from that point to coordinate (X+dX, Y+dY, Z+dZ). The vector which defines orientation may either be defined by a sequence of right-handed rotations (RX, RY, RZ) with respect to a specified axis, or by direction cosines (A, B, C). In this example, the direction cosines would be,
A = dX; B= dY; C = dZ
with associated angles relative to X, Y, and Z axes,
theta_x = arccos(A); theta_y = arccos(B); arccos_z(C) .
NOTE: These angles are not directly relatable to RX, RY, RZ except in special cases, such as the case where only one angle is non-zero.
Taking all the above into account,
STEP 1: convert a given set of (RX, RY, RZ) rotations to direction cosine "coordinates" (A, B, C)
STEP 2: transform those coordinates with a 3x3 rotation matix as you would (X, Y, Z) coordinates to produce the direction cosines in the transformed coordinate system, (A', B', C').
STEP 3: convert the direction cosines back to the equivalent (RX', RY', RZ') rotation sequence that you would impose in the new coordinate system to construct that vector.
Given that an orientation defined by rotations RX, RY, RZ is by definition with respect to an initial axis (where you rotate from) and sequence (order in which you construct the 3x3 rotation matrix), we would need additional information to make an exacting answer to this question.

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by