1

When i try to calculate roll, pitch, yaw values from a rotation matrix given below:

enter image description here

i get math error in my calculator. But, matlab (using peter corke's robotics toolbox) gives me some values as result.

%Rotation Matrix 5
R = [-0.9122 0.4098 0; -0.4098 -0.9122 0; 0 0 1];
tr2rpy(R,'deg')


Output:  0         0        -155.8083

Does that mean the rotation matrix is invalid ? Can i believe the matlab output ?

Thanks and regards !

  • Have you tried calculating the rotation matrix for a rotation of -155.8083 degrees about the z-axis and see if it comes out the same as `R`? – beaker Aug 12 '17 at 14:37

1 Answers1

2

This is correct answer, so you have only roll, you can see it from rotation matrix, last row-column is [0,0,1] meaning that no change in z axis, meaning no pitch or yaw applied. (In case of roll only, the roll angle is arccos(R(1,1)) )

Mendi Barel
  • 3,350
  • 1
  • 23
  • 24