-
Notifications
You must be signed in to change notification settings - Fork 73
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
A question regarding Euler angles from quaternion #6
Comments
Hmm. Your sign just makes sense to me, if all rotations are mathematical positive (counter clockwise). Can this be the reason? The I would just need an explanation, why I have to choose "YXZ" in order to find my yaw at y. If I follow the Euler wiki, then there is this equivalency:
The last statement reflects my axis configuration... (z is Euler x, x is Euler y, y is Euler z). Does this make sense? I would have to change my algorithm to
Note: Only the negation of the quaternion.z and .y values has been removed. I don't really understand this, but it works and aligns yours and mine... |
I confirm having the same problem with Y value after conversion to Euler XYZ from quaternion. Using scipy I get positive Y rotation (0.71383966):
Using the online calculator at https://www.andre-gaschler.com/rotationconverter/ I get the same matrix but in the conversion to Euler XYZ the result is: |
I have an issue when converting my quaternion sample to Euler Angle. |
I'm having this quaternion (x,y,z,w):
-0.299166,-0.106895,-0.0551278,0.946591
My (C++ based) conversion gives a rotation matrix, which is pretty much identical to the R given in your page https://www.andre-gaschler.com/rotationconverter/ for the given quaternion:
R: 0.971, 0.168,-0.169,-0.040, 0.815, 0.578, 0.235,-0.555, 0.798
I'm having a doubt regarding the 'yaw' value. The coordinate system, which generates this quaternion, has the following axis convention: X is getting larger towards right, Y is getting larger towards the sky and Z is getting negative, if moving forward. Hence my code adapts to Euler Angles by sorting the values Euler like (NED, x forward/north, y right/east, z down):
The values returned for 'yaw' exactly reflect the rotation of my device around the y axis (Euler's z).
I'm now having a little doubt regarding the Euler Angle conversion of your page https://www.andre-gaschler.com/rotationconverter/: Whereas my calculation for the given quaternion gives 11.9819 degrees, which is ok for me, since I rotated right a bit, the only matching value is the Y value, if I choose "YXZ", but the sign is inverted, so -11.9818413 instead.
The same for these two examples:
Your value for yaw: Y=-50.1588726, if YXZ is selected.
Or:
Your value for yaw: Y=-148.1534521, if YXZ is selected.
In all cases your and my conversion of Q to R or R to Q give identical results. Just the yaw sign is different...
Any idea, why this might be the case?
The text was updated successfully, but these errors were encountered: