-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document intrinsic vs. extrinsic rotations #281
Comments
Discussing with other people on Zulip, we can better document this theorem: |
Sorry for the late response! I was planning to answer with some visualizations after resolving #279, but that may take time a bit. julia> import Rotations
julia> import ReferenceFrameRotations
julia> ReferenceFrameRotations.angle_to_dcm(ReferenceFrameRotations.EulerAngles(1.2, 0.3, -0.8, :XYZ))
DCM{Float64}:
0.665589 -0.0680412 -0.74321
0.685316 0.450043 0.57254
0.29552 -0.890411 0.346174
julia> Rotations.RotZYX(0.8,-0.3,-1.2)
3×3 RotZYX{Float64} with indices SOneTo(3)×SOneTo(3)(0.8, -0.3, -1.2):
0.665589 -0.0680412 -0.74321
0.685316 0.450043 0.57254
0.29552 -0.890411 0.346174
julia> ReferenceFrameRotations.angle_to_dcm(ReferenceFrameRotations.EulerAngles(1.2, 0.3, -0.8, :ZYZ))
DCM{Float64}:
0.909785 0.360416 -0.205891
-0.401028 0.891199 -0.211993
0.107084 0.275436 0.955336
julia> Rotations.RotZYZ(0.8,-0.3,-1.2)
3×3 RotZYZ{Float64} with indices SOneTo(3)×SOneTo(3)(0.8, -0.3, -1.2):
0.909785 0.360416 -0.205891
-0.401028 0.891199 -0.211993
0.107084 0.275436 0.955336 |
Even inside Rotations.jl we can do that conversion with something like: RotXYZ(a1, a2, a3) # extrinsic with a3 around Z, followed by a2 around Y, followed by a1 around X
RotZYX(a1, a2, a3) # intrinsic with a1 around Z, followed by a2 around Y, followed by a3 around X We don't need to flip the signs if we read from left-to-right (intrinsic) versus right-to-left (extrinsic) |
So maybe the docs could emphasize this "reading" convention. If users seek "intrinsic" rotations they can read the struct names and angles from left-to-right. A dedicated paragraph explaining this reading convention and how angles are applied in order can really help end users. |
If I am not mistaken, the following sentence in the readme covers this now?
I am not sure if this issue is asking for more words on the topic, or if it should be closed in light of the above quote. I have to admit, I am quite fond of how Scipy allows users to specify the representation as a string, e.g. "xyz" for extrinsic x, y, z, for "XYZ" for intrinsic z, then y, then x. It frees the user from first having to understand the equivalency between the repsentations.
I actually ended up "proving" this myself recently for my master's thesis. It is not that mathematical in language and structure, making it somewhat more accasable, and I am pretty sure it holds up. The relevant page can be found here That might provide some inspiration on how to quickly prove the equivalency without invoking the heavy machinery of mathematical proofs xD |
What about a section like the following? It is rather verbose, but also extremely explicit and hopefully understandable. It also helps showing how a single rotation matrix has both an intrinsic and extrinsic interpretation, which I think the tables below do even better than the wikipedia article on euler angles. In the tables below, note that
Tait-Bryan convention:
"Proper" euler angles:
|
We recently noticed that rotations such as
RotXYZ
are extrinsic, meaning that they rotate with respect to the original xyz axis. Is it possible to rotate around z, then rotate around the new y' and finally around the new x''? The so called intrinsic rotations?https://en.wikipedia.org/wiki/Euler_angles#Chained_rotations_equivalence
We migrated from ReferenceFrameRotations.jl to Rotations.jl and noticed that some of our rotation conventions were compromised.
cc: @hyrodium
The text was updated successfully, but these errors were encountered: