Euler Angle Rotations

RTSX Help:Euler Angle Rotations

eul2r, eul2t

tr2eul

Convert beween euler angle (ZYZ sequence) and rotation/homogeneous transformation matrix.

Syntax

  • [R] = eul2r(eul)
  • [T] = eul2t(eul)    
  • [eul] = tr2eul(R)    
  • [eul]= tr2eul(T)

Input/Output Arguments

  • eul —   1×3 vector representing euler angle (default in radian)
  • R — 3×3 rotation matrix
  • T — 4×4 homogeneous transformation matrix

Options

  • Put ‘deg’ as last argument to input angle value in degree. For example,
    • T=eul2t([30 45 60],’deg’)
    • eul = tr2eul(T,’deg’)

Description

eul2r(), eul2t() returns a rotation and homogeneous transformation matrix representing euler rotation of [phi theta psi] (ZYZ sequence is used.) tr2eul() just does the opposite. It receives a rotation or homogeneous transformation matrix and solves for a set of euler angle.

Examples

-->R=eul2r([30 45 90],'deg')
 R  = 
  - 0.5        - 0.6123724    0.6123724  
    0.8660254  - 0.3535534    0.3535534  
    0.           0.7071068    0.7071068  
 
-->tr2eul(R,'deg')
 ans  =
    30.    45.    90.

See Also