commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luc Maisonobe (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MATH-847) Using Rotation to convert Euler angles to Quaternions produces wrong results
Date Thu, 16 Aug 2012 19:33:38 GMT

    [ https://issues.apache.org/jira/browse/MATH-847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13436256#comment-13436256
] 

Luc Maisonobe commented on MATH-847:
------------------------------------

This is a question rather than a bug report, so it should be on the users mailing list, not
on Jira.

Nevertheless, the answer to this question is not that we use a left handed coordinate system,
it is that the angles are counted from a vectorial operator point of view, not from a frame
conversion point of view. Please read the javadoc for all methods and for the class for an
explanation.
                
> Using Rotation to convert Euler angles to Quaternions produces wrong results
> ----------------------------------------------------------------------------
>
>                 Key: MATH-847
>                 URL: https://issues.apache.org/jira/browse/MATH-847
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.0
>         Environment: 1.6
>            Reporter: M@ Dunlap
>
> import org.apache.commons.math3.geometry.euclidean.threed.Rotation;
> import org.apache.commons.math3.geometry.euclidean.threed.RotationOrder;
> public class temp {
>   public static void main(String args[]) {
>     Rotation r = new Rotation(RotationOrder.XYZ, -Math.PI / 2d, 0, 0);
>     System.out.println("(" + r.getQ0() + " " + r.getQ1() + " " + r.getQ2() + " " + r.getQ3()
+ ")");
>   }
> }
> Prints (0.707 0.707 0.0 0.0) (in-sig-figs elided), but when I type the same thing into
Wolfram Alpha I get (.707 -.707 0 0) (note the negative)  see: http://www.wolframalpha.com/input/?i=euler+angles&a=*C.euler+angles-_*Formula.dflt-&a=*FP.EulerRotation.EAS-_e123&f3=-pi%2F2+rad&f=EulerRotation.th1_-pi%2F2+rad&f4=0&f=EulerRotation.th2_0&f5=0&f=EulerRotation.th3_0
> One of the guys in the lab suggested that if Rotation is assuming the Euler angle is
in a left-handed coordinate space this is an expected result, but if that's the case the question
is, why is the less popular coordinate system the only option?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message