skrobot.coordinates.math.rpy_angle¶
- skrobot.coordinates.math.rpy_angle(matrix)[source]¶
Decomposing a rotation matrix to yaw-pitch-roll.
- Parameters:
matrix (list or numpy.ndarray) – 3x3 rotation matrix
- Returns:
rpy – pair of rpy in yaw-pitch-roll order.
- Return type:
Examples
>>> import numpy as np >>> from skrobot.coordinates.math import rpy_matrix >>> from skrobot.coordinates.math import rpy_angle >>> yaw = np.pi / 2.0 >>> pitch = np.pi / 3.0 >>> roll = np.pi / 6.0 >>> rot = rpy_matrix(yaw, pitch, roll) >>> rpy_angle(rot) (array([1.57079633, 1.04719755, 0.52359878]), array([ 4.71238898, 2.0943951 , -2.61799388]))