-
Notifications
You must be signed in to change notification settings - Fork 83
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
euler2mat bug? #17
Comments
@cgohlke - any thoughts here? I haven't modified that part of the code from |
I started looking into the code to see if I could be any help. I noticed that in mat2euler the axes sequence specified does not seem to match up with the i,j, and k axes listed for all axes. I've assumed that axis 0 is x, then axis 1 is y, and axis 2 is z. If that doesn't hold, then my observations are probably irrelevant. I modified the euler.py file to test all of the Euler axis combinations listed (attached as a .txt file) as a standalone program. The output is below.
|
Hi - sorry for the flying feedback - but I'm sure you gathered that the angles are in the order specified by the axis labels, so if you have |
Yup, I agree that the angles are in the order given by the axis labels. I should have been more clear on my comment.
It looks like for many axis labels, the axis listed as the rotation axis does not match the order I expect. For example, if I state ‘rzyz’ for the axis labels, by my reading of the function eluer2mat in the Euler code, the rotation axes are set as i=2, j=1, and k=0; based upon the _NEXT_AXIS function. Assuming 2, 1, and 0 are Z, Y, X axes, this seems to imply that the rotation axes are ‘rzyx’, not ‘rzyz’.
|
However, I think I may have found a bug in euler2mat. The code I’ve used is
attached below.
My impression is that the intrinsic and extrinsic rotation matrices are
inverses of each other. And since they are orthogonal tensors, the inverse
is equal to the transpose. However, when I invert the rotation matrix
generated from 3 Euler angles using the rzxz convention, I do not get the
same rotation matrix as if I perform the ‘szxz’ rotation. Nor does the
transpose of the rzxz rotation match the szxz rotation. The values are
correct, but the negative signs are in the wrong position. In addition,
the axis/angle pair calculated from the szxz rotation has a different axis
than the rzxz rotation.
Did I miss something, or are my observations correct?
Thanks!
Code example:
Output:
The text was updated successfully, but these errors were encountered: