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 \[\boldsymbol{R}\boldsymbol{R}^T = \boldsymbol{I}\]- and whether the determinant is positive \[det(\boldsymbol{R}) > 0\]- 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 
 
 - See also - norm_matrix
- Enforces orthonormality of a rotation matrix. 
- robust_polar_decomposition
- A more expensive orthonormalization method that spreads the error more evenly between the basis vectors. 
 
