# tr2jac

## rpy2jac

Compute Jacobian from homogeneous transform, euler, or RPY angles

### Syntax

• J = tr2jac(T)
• J = eul2jac(eul)
• J = rpy2jac(rpy)

### Input Arguments

• T — 4×4 homogeneous transformation matrix
• eul — 1 x 3 vector of euler angles (in radian)
• rpy — 1 x 3 vector of Roll-Pitch-Yaw angles (in radian)

### Output Arguments

• J — 3 x 1 Jacobian matrix

### Description

• J = tr2jac(T) is a Jacobian matrix (6×6) that maps spatial velocity or differential motion from the world frame to the frame represented by the homogeneous transform T.
• J = eul2jac(eul) is a Jacobian matrix (3×3) that maps Euler angle rates to angular velocity at the operating point eul =[phi, theta, psi].
• J = rpy2jac(rpy) is a Jacobian matrix (3×3) that maps roll-pitch-yaw angle rates to angular velocity at the operating point rpy=[R,P,Y].

### Examples

 -->T = transl([1 0 0])*troty(pi/2); -->J = tr2jac(T) J = 0. 0. - 1. 0. 1. 0. 0. 1. 0. 0. 0. 1. 1. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. - 1. 0. 0. 0. 0. 1. 0. 0. 0. 0. 1. 0. 0.   -->J = eul2jac([pi/3 -pi/4 pi/6]) J = - 0.6123724 - 0.5 0. - 0.3535534 0.8660254 0. 0.7071068 0. 1.   -->J = rpy2jac([0.1 0.2 0.3]) J = 1. 0. 0.1986693 0. 0.9950042 - 0.0978434 0. 0.0998334 0.9751703