skrobot.coordinates.math.rotation_matrix_to_axis_angle_vector
- skrobot.coordinates.math.rotation_matrix_to_axis_angle_vector(m)[source]
Convert rotation matrix to axis-angle representation as a vector.
The magnitude of the returned vector represents the rotation angle, and its direction represents the rotation axis.
- Parameters:
m (list or numpy.ndarray) – 3x3 rotation matrix
- Returns:
axis_angle_vector – Axis-angle representation as a vector of shape (3,). The vector’s magnitude is the rotation angle in radians [-pi, pi], and its direction is the rotation axis.
- Return type:
Examples
>>> import numpy as np >>> from skrobot.coordinates.math import rotation_matrix_to_axis_angle_vector >>> rotation_matrix_to_axis_angle_vector(np.eye(3)) array([0., 0., 0.])