euclid icon indicating copy to clipboard operation
euclid copied to clipboard

Give full precision for `NotARotationMatrixException` message

Open calvertdw opened this issue 2 years ago • 2 comments

I rarely get the following exception and without the full precision, a unit test cannot be created.

Exception in thread "main" us.ihmc.euclid.exceptions.NotARotationMatrixException: Caught exception, this frame: LEFT_SHIN_LINKCoM, other frame: LEFT_THIGH_LINKCoM, exception:
The matrix is not a rotation matrix: 
/ 1.000,  0.000,  0.001 \
|-0.000,  1.000, -0.000 |
\-0.001,  0.000,  1.000 /
	at us.ihmc.euclid.referenceFrame.ReferenceFrame.getTransformToDesiredFrame(ReferenceFrame.java:936)

calvertdw avatar Jul 25 '23 23:07 calvertdw

I think this code will do it:

public static String toStringFullPrecision(RigidBodyTransform rigidBodyTransform)
{
   return EuclidCoreIOTools.getRigidBodyTransformString(EuclidCoreIOTools.getStringFormat(18, 18), rigidBodyTransform);
}

calvertdw avatar Aug 11 '23 19:08 calvertdw

I got 3 more NotARotationMatrixExceptions today. This feature would still be awesome.

calvertdw avatar Feb 16 '24 04:02 calvertdw