Extracting yaw, pitch, roll from transformation matrix

Click For Summary

Discussion Overview

The discussion revolves around the extraction of yaw, pitch, and roll from a transformation matrix representing two reference frames, A and B. Participants explore methods for determining these angles, including the implications of different Euler angle sequences and the challenges associated with gimbal lock.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant describes a transformation matrix T that includes a rotation submatrix and translation components, seeking a method to derive yaw, pitch, and roll from it.
  • Another participant suggests looking up "Euler angles" as a potential resource for understanding the relationship between rotation matrices and these angles.
  • A warning is issued regarding the distinction between roll-pitch-yaw and yaw-pitch-roll sequences, emphasizing the importance of agreeing on a sequence when communicating.
  • Concerns are raised about gimbal lock, particularly in roll-pitch-yaw sequences, and the need to handle special cases when the pitch angle approaches 0 or 180 degrees.
  • A reference is provided to an algorithm that can handle various configurations of axes for converting between rotation matrices and Euler angles, although the implementation details are not discussed.
  • Another participant mentions a book on robotics that offers a comprehensive treatment of transformation matrices and poses, including the 12 Euler sequences, but notes they do not own the book.

Areas of Agreement / Disagreement

Participants express varying views on the methods for extracting yaw, pitch, and roll, with no consensus reached on a single approach. The discussion includes multiple competing perspectives on the implications of Euler angle sequences and the challenges of gimbal lock.

Contextual Notes

Participants highlight the complexity of converting between transformation matrices and Euler angles, noting that different representations exist and that gimbal lock poses significant challenges in certain configurations.

top40
Messages
5
Reaction score
0
There are two references frames, A and B.

Let A's reference frame be denoted by the columns of the identity matrix, and let A's origin be (0,0,0).

Let B's reference frame and origin be denoted by a transformation matrix T, where T =

R11 R12 R13 x
R21 R22 R23 y
R31 R32 R33 z
0 0 0 1

(Sorry, I don't know how to make it fancy as this is my first post). So basically the R sub matrix is the rotation matrix, and x,y,z is the translation of the origin.

Now, I have the values of the elements of T. From this, how do I determine the yaw, pitch, and roll? Roll is defined to be the rotation about the x-axis; pitch is defined to be the rotation about the y-axis; and yaw is defined to be the rotation about the z-axis.

EDIT:

I have already seen this http://en.wikipedia.org/wiki/Rotation_matrix#General_rotations and know that I can just set R_x(gamma) * R_y(beta) * R_z(\alpha) * (a column of the R matrix) = <1,0,0> and then solve for gamma, beta, and alpha, but I was wondering if there was an easier, more direct way.
 
Last edited:
Physics news on Phys.org
Perhaps look up "Euler angles"
 
A couple of warnings:

1. Note that a roll-pitch-yaw sequence is not the same as a yaw-pitch-roll sequence. There are 12 such Euler sequences: The six aeronautic sequences, the standard Euler sequence (z-x-z), plus five others similar to z-x-z (z-y-z, x-y-z, ...). When you are communicating with others you had dang well better agree on a sequence.

2. You will have to worry about (near) gimbal lock versus non-gimbal lock situations. Gimbal lock occurs when the middle angle of the sequence pitch in a roll-pitch-yaw sequence is 0 or 180 degrees. Near gimbal lock is when that angle is close to 0 or 180. You need to treat those cases specially.Going from an Euler sequence to a transformation matrix is simple. Going from a matrix to a sequence is not so simple.
 
Last edited by a moderator:
monea83 said:
This kind of conversion is rather ugly... a nice algorithm that handles all possible configurations of axes (including roll-pitch-yaw) very compactly is given here:
I didn't say how to implement it. Whether you want to do something compact as is done in the reference or a slew of separate algorithms is somewhat orthogonal to the basic issue that there several representations do exist. The reference you provided also does not address the issue of gimbal lock. As anyone who works in the field of aviation, aerospace, or robotics can attest, failing to worry about gimbal lock opens a door so wide as to let Murphy (as in Murphy's law) and all his evil henchmen pass through in unison.
 
Craig's book on robotics (the title is either "Introduction to..." or "Fundamentals of...") has a nice treatment of moving back and forth between transformation matrices and poses (x, y, z, rx, ry, rz), as well as a detailed explanation of the 12 sequences. It was a good starting point for me, but unfortunately I don't own the book.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 2 ·
Replies
2
Views
5K
  • · Replies 6 ·
Replies
6
Views
11K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 18 ·
Replies
18
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K