Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • eigen eigen
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 664
    • Issues 664
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Custom issue tracker
    • Custom issue tracker
  • Merge requests 19
    • Merge requests 19
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • libeigenlibeigen
  • eigeneigen
  • Issues
  • #609
Closed
Open
Created Dec 04, 2019 by Eigen Bugzilla@eigenbzReporter

Euler Angles not Angle reversible, documentation example lacking, possible gimble lock issue resolveable

Submitted by joh..@..il.com

Assigned to Nobody

Link to original bugzilla bug (#609)
Version: 3.2

Description

In testing the Eigen/EulerAngles implementation I have shown that I create a matrix and go
Matrix > Angles > Matrix
but I cannot successfully go
Angles > Matrix > Angles for any matrix other than the identity matrix.

Example code
// Hand-Craft, ANG > MAT > ANG
// first quad
inputAngles << 0, 0, M_PI/4;
outputMatrix.block<3,3>(0, 0) = (Eigen::AngleAxisf(inputAngles[0], Eigen::Vector3f::UnitZ())
* Eigen::AngleAxisf(inputAngles[1], Eigen::Vector3f::UnitX())
* Eigen::AngleAxisf(inputAngles[2], Eigen::Vector3f::UnitZ())).toRotationMatrix();
outputAngles = inputMat.block<3,3>(0,0).eulerAngles(2, 0, 2); // follows Z-X-Z

with output
inputAngles == [0.78539819, 0.78539819, 0.78539819]
pi/4, pi/4, pi/4
outputAngles == [-2.3561945, -0.78539824, -2.3561945]
-3pi/4, -pi/4, -3pi/4

See this thread for more (http://forum.kde.org/viewtopic.php?f=74&t=111436&p=266230#p266230)

Obviously Euler angles have lots of different conventions -- if the Eigen documentation gave a very thorough walk through for one convention it would be very helpful. Also what the expected domain/range of the three euler angles is would be handy without having to dig through the source code.

Finally it is posited here (https://d3cw3dd2w32x2b.cloudfront.net/wp-content/uploads/2012/07/euler-angles.pdf) that according to the Graphics Gems IV method (which, according to the Eigen source code is in use) it is possible to avoid floating point instability by slightly modifying the generation method of the third coefficient

Blocking

#558 (closed)

Edited Dec 05, 2019 by Eigen Bugzilla
Assignee
Assign to
Time tracking