RPY Rotations

RTSX Help:Roll-Pitch-Yaw Rotations

rpy2r, rpy2t

tr2rpy

Convert beween Row-Pitch-Yaw angles and rotation/homogeneous transformation matrix.

Syntax

  • [R] = rpy2r(rpy)
  • [T] = rpy2t(rpy)    
  • [rpy] = tr2eul(R)    
  • [rpy]= tr2eul(T)

Input/Output Arguments

  • rpy —   1×3 vector representing Row-Pitch-Yaw angle (default in radian)
  • R — 3×3 rotation matrix
  • T — 4×4 homogeneous transformation matrix

Options

  • ‘zyx’ — return solution for sequential rotations about Z,Y,X axes
  • ‘deg’ — input and output argument values in degrees instead of radians

Description

rpy2r(), rpy2t() returns a rotation and homogeneous transformation matrix representing row,pitch, yaw angles corresponding to rotations about X,Y,Z axes respectively (or Z,Y,X if ‘zyx’ option is selected) . tr2rpy() receives a rotation or homogeneous transformation matrix and solves for row-pitch-yaw angles.

Examples

-->R=rpy2r([0.1 0.2 0.3])
 R  = 
    0.9362934  - 0.2896295    0.1986693  
    0.3129918    0.9447025  - 0.0978434  
  - 0.1593451    0.153792     0.9751703  
 
-->rpy=tr2rpy(R)
 rpy  =
    0.1    0.2    0.3

See Also