M-File Help: rpy2tr | View code for rpy2tr

# rpy2tr

Roll-pitch-yaw angles to homogeneous transform

T = rpy2tr(roll, pitch, yaw, options) is an SE(3) homogeneous transformation matrix (4x4) equivalent to the specified roll, pitch, yaw angles angles. These correspond to rotations about the X, Y, Z axes respectively. If roll, pitch, yaw are column vectors (Nx1) then they are assumed to represent a trajectory and R is a three-dimensional matrix (4x4xN), where the last index corresponds to rows of roll, pitch, yaw.

T = rpy2tr(rpy, options) as above but the roll, pitch, yaw angles angles angles are taken from consecutive columns of the passed matrix rpy = [roll, pitch, yaw]. If rpy is a matrix (Nx3) then they are assumed to represent a trajectory and T is a three-dimensional matrix (4x4xN), where the last index corresponds to rows of rpy which are assumed to be [roll, pitch, yaw].

## Options

'deg' | Compute angles in degrees (radians default)
'zyx' | Return solution for sequential rotations about Z, Y, X axes (Paul book)

## Note

- In previous releases (<8) the angles corresponded to rotations about ZYX. Many texts (Paul, Spong) use the rotation order ZYX. This old behaviour can be enabled by passing the option 'zyx'

## See also

tr2rpy, rpy2r, eul2tr

© 1990-2014 Peter Corke.