pytransform3d.rotations.check_quaternion#

pytransform3d.rotations.check_quaternion(q, unit=True)[source]#

Input validation of quaternion representation.

Parameters:
qarray-like, shape (4,)

Quaternion to represent rotation: (w, x, y, z)

unitbool, optional (default: True)

Normalize the quaternion so that it is a unit quaternion

Returns:
qarray, shape (4,)

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

Raises:
ValueError

If input is invalid