Skip to content
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

Axes mixed up? #2

Closed
mortenfyhn opened this issue Oct 9, 2017 · 3 comments
Closed

Axes mixed up? #2

mortenfyhn opened this issue Oct 9, 2017 · 3 comments
Labels

Comments

@mortenfyhn
Copy link
Contributor

I just tested pose view with a sequence of simple rotations, and the box in the visualization appears to rotate the correct amount around the correct axis, but in the wrong direction.

These are the rotations I tried and the results I got:

roll pitch yaw q.x q.y q.z q.w result expectation
15° 0 0 .13 0 0 .99 neg. roll pos. roll
0 15° 0 0 .13 0 .99 neg. pitch pos. pitch
0 0 15° 0 0 .13 .99 neg. yaw pos. yaw
-15° 0 0 -.13 0 0 .99 pos. roll neg. roll
0 -15° 0 0 -.13 0 .99 pos. pitch neg. pitch
0 0 -15° 0 0 -.13 .99 pos. yaw neg. yaw

I'm assuming that the colors in pose view are (red = x), (green = y), (blue = z), and that it uses right-handed rotations. Is that correct?

(I used http://www.andre-gaschler.com/rotationconverter/ to calculate quaternions to test based on roll/pitch/yaw values. Since the rotations are simple, Euler angle convention should not matter, but I had it set to ZYX.)

@dirk-thomas
Copy link
Contributor

Thank you for reporting the problem. tf returns the matrix in row-major while OpenGL expects column-major. Please see #3 for the fix.

@mortenfyhn
Copy link
Contributor Author

Wonderful! I can confirm that your fix seems to work.

@dirk-thomas
Copy link
Contributor

Thank you for trying the patch and reporting back. The fix is available in the newly released version 0.5.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants