upkie  11.0.0
Open-source wheeled biped robots

◆ quaternion_from_rotation_matrix()

np.ndarray upkie.utils.rotations.quaternion_from_rotation_matrix ( np.ndarray  rotation_matrix)

Convert a rotation matrix to a unit quaternion for the same rotation.

Parameters
rotation_matrixRotation matrix to convert.
Returns
Unit quaternion in [w, x, y, z] format.