pytransform3d.rotations.axis_angle_from_matrix

pytransform3d.rotations.axis_angle_from_matrix(R, strict_check=True, check=True)[source]

Compute axis-angle from rotation matrix.

This operation is called logarithmic map. Note that there are two possible solutions for the rotation axis when the angle is 180 degrees (pi).

We usually assume active rotations.

Parameters
Rarray-like, shape (3, 3)

Rotation matrix

strict_checkbool, optional (default: True)

Raise a ValueError if the rotation matrix is not numerically close enough to a real rotation matrix. Otherwise we print a warning.

checkbool, optional (default: True)

Check if rotation matrix is valid

Returns
aarray-like, shape (4,)

Axis of rotation and rotation angle: (x, y, z, angle). The angle is constrained to [0, pi].

Examples using pytransform3d.rotations.axis_angle_from_matrix