Registered Member
|
I realized Eigen had Euler angles and jumped up and down a few times happy that I didn't have to write and debug the math myself.
I'm writing some unit tests and am having issues reproducing rotation sign. It may be my failure to understand Euler angles or I could be doing the math wrong. For my first pass attempt I'm trying to replicate the documentation http://eigen.tuxfamily.org/dox/group__Geometry__Module.html#gad118fececd448d7485ffea4858775e5a Here's my test code
and I get the following output
I am interested in having reversible Euler angles within 360, 180, 180 degrees respectively for phi, theta, and psi as defined https://en.wikipedia.org/wiki/Euler_angles. Is this possible? EDIT: for reference, originally I was going to implement this by unabashedly copying from Wiki (as we use right hand as well) http://en.wikipedia.org/wiki/Rotation_formalisms_in_three_dimensions#Conversion_formulae_between_formalisms |
Registered Member
|
I solved half the problem.
I thought about it some more and realized that I might be generating LH transformations. Now my MAT > ANG > MAT works (for RH transformations) but my ANG > MAT > ANG code is not working. I can fix the MAT > ANG > MAT code above by adding this check after the random generation.
Suggestions for solutions to the original problem are still very welcome. I've checked and the first pass ANG > MAT is generating RH transforms (with the Z,X,Z scheme) |
Registered Member
|
Diving into this a little more, I found this paper which comments on the implementation from Graphics Gems (as indicated by the Eigen source comments) and suggests some additional modifications to avoid gimbal lock.
It looks reasonable to me and the Eigen code does not appear to adopt these methods. Can someone related to this code in Eigen make an intelligent comment here? https://d3cw3dd2w32x2b.cloudfront.net/w ... angles.pdf |
Moderator
|
I don't have time to look very carefully at this issue, but the proposed strategy in your link sounds much better than what we currently have. Patch welcome;)
|
Registered Member
|
This was resolved recently by the Eigen team. thanks!
http://eigen.tuxfamily.org/bz/show_bug.cgi?id=609 |
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]