Numerical error of the determinant is (only a bit) larger than the error in individual components of the rotation matrix multiplied with its transpose.
def test_rotation_matrix_precision_error():
R = pr.active_matrix_from_extrinsic_roll_pitch_yaw([0.5, 0.5, 0.5])
for _ in range(40):
R = R.dot(R)
det_error = abs(1.0 - np.linalg.det(R))
RRT_error = np.max(R.dot(R.T) - np.eye(3))
assert RRT_error <= det_error
Hence, we don't have to check whether det(R) is 1. We just have to check for reflection.
Fixes #218
Numerical error of the determinant is (only a bit) larger than the error in individual components of the rotation matrix multiplied with its transpose.
Hence, we don't have to check whether det(R) is 1. We just have to check for reflection.