pytransform3d.rotations.axis_angle_from_quaternion

pytransform3d.rotations.axis_angle_from_quaternion(q)[source]

Compute axis-angle from quaternion.

This operation is called logarithmic map.

We usually assume active rotations.

Parameters
qarray-like, shape (4,)

Unit quaternion to represent rotation: (w, x, y, z)

Returns
aarray-like, shape (4,)

Axis of rotation and rotation angle: (x, y, z, angle). The angle is constrained to [0, pi) so that the mapping is unique.

Examples using pytransform3d.rotations.axis_angle_from_quaternion