pytransform3d.rotations.check_matrix

pytransform3d.rotations.check_matrix(R, tolerance=1e-06, strict_check=True)[source]

Input validation of a rotation matrix.

We check whether R multiplied by its inverse is approximately the identity matrix and the determinant is approximately 1.

Parameters
Rarray-like, shape (3, 3)

Rotation matrix

tolerancefloat, optional (default: 1e-6)

Tolerance threshold for checks. Default tolerance is the same as in assert_rotation_matrix(R).

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.

Returns
Rarray, shape (3, 3)

Validated rotation matrix

Raises
ValueError

If input is invalid

Examples using pytransform3d.rotations.check_matrix