pytransform3d.rotations.quaternion_diff

pytransform3d.rotations.quaternion_diff(q1, q2)[source]

Compute the rotation in angle-axis format that rotates q2 into q1.

\omega = 2 \log (q_1 * \overline{q_2})

Parameters:
q1array-like, shape (4,)

First quaternion

q2array-line, shape (4,)

Second quaternion

Returns:
aarray-like, shape (4,)

The rotation in angle-axis format that rotates q2 into q1