-
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
quat2euler gives negative values for second angle in symmetric sequences #53
Comments
Am I right in saying that we do not guarantee postive angles? In which case, why would we prefer the positive angles - just for consistency with Scipy? I am not sure how much to worry about this - but returning different angles for the same query would be an API break. I can't easily see why that would matter to a user, but I guess it could. |
Basically, while the first and third angles have a span of For asymmetric axes, this second angle should be between For symmetric axes, this second angle should be between In this case, a whole different set of Euler angles are chosen, but I think this is probably inconsistent with other implementations, not only Scipy. And I'd argue it is also inconsistent with what one might expect: having this angle only be negative seems like an unnatural choice! |
Hey there again, if you're interested, there's some discussion about this exact problem in Eigen's Gitlab repo now. |
I noticed that quat2euler gives negative values for the middle angle in every symmetric sequence.
By symmetric sequence, I mean sequences like
zyz
,xyx
, etc.This is inconsistent, for example, with
SciPy
. Applying this simple correction solves the problem:Here's how the code I used to show that my correction makes it consistent with SciPy:
The text was updated successfully, but these errors were encountered: