Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
I have Rotation Matrix, I want the order of the rotation angle by angle

Subject: I have Rotation Matrix, I want the order of the rotation angle by angle

From: Carlos Junior

Date: 1 Apr, 2011 17:51:05

Message: 1 of 6

Hi,
I would like to put a subject on the table to the friends of the Forum that I have a suspection how to do, but the way I think is a bit complicated!

The DOUBT: I have a rotation matrix 3x3 with all the 9 elements known and I would like to know the order of rotation and the angles of rotation.

The practical example:
       v = [ 0.245 ; -0.563 ; -0.055 ] ;
       u = [ 0.3 ; -0.5 ; -0.2 ] ;

       v = R * u ;
       And R is found to be:
R =[ 0.9766 0.1555 0.1487 ;
       -0.0887 0.9208 -0.3797 ;
       -0.1960 0.3576 0.9131 ] ;

My idea to solve the doubt:
       There are 12 possibilities of order of rotation : ( theta_x,theta_y,theta_z ),( theta_x,theta_z,theta_y ),( theta_y,theta_x,theta_z ),( theta_y,theta_z,theta_x ),( theta_z,theta_x,theta_y ),( theta_z,theta_y,theta_x ) and the more possibilities: ( theta_x,theta_y,theta_x ),( theta_x,theta_z,theta_x ),( theta_y,theta_x,theta_y ),( theta_y,theta_z,theta_y ),( theta_z,theta_x,theta_z ),( theta_z,theta_y,theta_z ) .
       My idea to know the angles and order of rotation of matrix R (the origin of the matrix) is to test one by one the 12 possibilities shown above with the nine elements of matrix R and eliminate the possibilities that returns incoherences. But, I think it is not a smart method and I think it can return me more than one possibility.

Is there a way to know the unique angles and order of rotation of matrix R ?

Very thanks,

Carlos
carlosjunior@gmail.com

Subject: I have Rotation Matrix, I want the order of the rotation angle by angle

From: Matt J

Date: 1 Apr, 2011 18:07:05

Message: 2 of 6

"Carlos Junior" <carlosjunior@gmail.com> wrote in message <in53a9$27m$1@fred.mathworks.com>...
>
> My idea to know the angles and order of rotation of matrix R (the origin of the matrix) is to test one by one the 12 possibilities shown above with the nine elements of matrix R and eliminate the possibilities that returns incoherences. But, I think it is not a smart method and I think it can return me more than one possibility.
>
> Is there a way to know the unique angles and order of rotation of matrix R ?
==============

You will not find that 1 out of the 12 possibilities are correct. All 12 possibilities are equally valid, but result in different theta_x,y,z.

Subject: I have Rotation Matrix, I want the order of the rotation angle by angle

From: Bruno Luong

Date: 1 Apr, 2011 18:32:05

Message: 3 of 6

"Carlos Junior" <carlosjunior@gmail.com> wrote in message <in53a9$27m$1@fred.mathworks.com>...
> Hi,
> I would like to put a subject on the table to the friends of the Forum that I have a suspection how to do, but the way I think is a bit complicated!
>
> The DOUBT: I have a rotation matrix 3x3 with all the 9 elements known and I would like to know the order of rotation and the angles of rotation.

The order must be decided by YOU.

Bruno

Subject: I have Rotation Matrix, I want the order of the rotation angle by angle

From: Carlos Junior

Date: 1 Apr, 2011 22:55:24

Message: 4 of 6

"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <in55n5$fg6$1@fred.mathworks.com>...
> "Carlos Junior" <carlosjunior@gmail.com> wrote in message <in53a9$27m$1@fred.mathworks.com>...
> > Hi,
> > I would like to put a subject on the table to the friends of the Forum that I have a suspection how to do, but the way I think is a bit complicated!
> >
> > The DOUBT: I have a rotation matrix 3x3 with all the 9 elements known and I would like to know the order of rotation and the angles of rotation.
>
> The order must be decided by YOU.
>
> Bruno

Yes, Bruno is correct . I can decide the order I want of rotation and then find theta_x,theta_y and theta_z, based on the matrix R and its nine elements found before!

I will post, here, the angles I found for all the 12 rotation possibilities to help who reads this post with a numerical (practical) example...

Only a correction: the value of the vector u should be u = [ 0.3 ; -0.5 ; +0.2 ] ; and not u = [ 0.3 ; -0.5 ; -0.2 ] ; as I have posted above !

Very Thanks one more time Bruno ...

Subject: I have Rotation Matrix, I want the order of the rotation angle by angle

From: James Tursa

Date: 3 Apr, 2011 14:19:05

Message: 5 of 6

"Carlos Junior" <carlosjunior@gmail.com> wrote in message <in5l4r$35e$1@fred.mathworks.com>...
> "Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <in55n5$fg6$1@fred.mathworks.com>...
> > "Carlos Junior" <carlosjunior@gmail.com> wrote in message <in53a9$27m$1@fred.mathworks.com>...
> > > Hi,
> > > I would like to put a subject on the table to the friends of the Forum that I have a suspection how to do, but the way I think is a bit complicated!
> > >
> > > The DOUBT: I have a rotation matrix 3x3 with all the 9 elements known and I would like to know the order of rotation and the angles of rotation.
> >
> > The order must be decided by YOU.
> >
> > Bruno
>
> Yes, Bruno is correct . I can decide the order I want of rotation and then find theta_x,theta_y and theta_z, based on the matrix R and its nine elements found before!
>
> I will post, here, the angles I found for all the 12 rotation possibilities to help who reads this post with a numerical (practical) example...
>
> Only a correction: the value of the vector u should be u = [ 0.3 ; -0.5 ; +0.2 ] ; and not u = [ 0.3 ; -0.5 ; -0.2 ] ; as I have posted above !
>
> Very Thanks one more time Bruno ...

See this conversion tool by John Fuller in the FEX:

http://www.mathworks.com/matlabcentral/fileexchange/20696-function-to-convert-between-dcm-euler-angles-quaternions-and-euler-vectors

James Tursa

Subject: I have Rotation Matrix, I want the order of the rotation angle by angle

From: Husam Aldahiyat

Date: 3 Apr, 2011 17:28:04

Message: 6 of 6

See this GUI:

http://www.mathworks.com/matlabcentral/fileexchange/24247-eulerfixed-angles-properties

Put the rotation matrix and decide the order you like. They all reach the same conclusion.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us