/** * Asserts on a per component basis that the two frame vectors represent the same geometry to an * {@code epsilon}. * <p> * Note: the two arguments are considered to be equal if they are both equal to {@code null}. * </p> * * @param expected the expected frame vector. Not modified. * @param actual the actual frame vector. Not modified. * @param epsilon the tolerance to use. * @throws AssertionError if the two frame vectors do not represent the same geometry or not * expressed in the reference frame. If only one of the arguments is equal to * {@code null}. */ public static void assertFrameVector3DGeometricallyEquals(FrameVector3DReadOnly expected, FrameVector3DReadOnly actual, double epsilon) { assertFrameVector3DGeometricallyEquals(null, expected, actual, epsilon); }
/** * Asserts on a per component basis that the two frame vectors represent the same geometry to an * {@code epsilon}. * <p> * Note: the two arguments are considered to be equal if they are both equal to {@code null}. * </p> * * @param messagePrefix prefix to add to the automated message. * @param expected the expected frame vector. Not modified. * @param actual the actual frame vector. Not modified. * @param epsilon the tolerance to use. * @throws AssertionError if the two frame vectors do not represent the same geometry or not * expressed in the reference frame. If only one of the arguments is equal to * {@code null}. */ public static void assertFrameVector3DGeometricallyEquals(String messagePrefix, FrameVector3DReadOnly expected, FrameVector3DReadOnly actual, double epsilon) { assertFrameVector3DGeometricallyEquals(messagePrefix, expected, actual, epsilon, DEFAULT_FORMAT); }
public void assertEpsilonEquals(PoseTrajectoryState other, double epsilon) { EuclidFrameTestTools.assertFramePoint3DGeometricallyEquals(position, other.position, epsilon); EuclidFrameTestTools.assertFrameQuaternionGeometricallyEquals(orientation, other.orientation, epsilon); EuclidFrameTestTools.assertFrameVector3DGeometricallyEquals(linearVelocity, other.linearVelocity, epsilon); EuclidFrameTestTools.assertFrameVector3DGeometricallyEquals(angularVelocity, other.angularVelocity, epsilon); EuclidFrameTestTools.assertFrameVector3DGeometricallyEquals(linearAcceleration, other.linearAcceleration, epsilon); EuclidFrameTestTools.assertFrameVector3DGeometricallyEquals(angularAcceleration, other.angularAcceleration, epsilon); } }
EuclidFrameTestTools.assertFrameVector3DGeometricallyEquals(angularVelocity, currentAngularVelocity, 1.0e-2); EuclidFrameTestTools.assertFrameVector3DGeometricallyEquals(angularVelocity, currentAngularAcceleration, 1.0e-2);
EuclidFrameTestTools.assertFrameVector3DGeometricallyEquals(expectedCoMVelocity, actualCoMVelocity, EPSILON); EuclidFrameTestTools.assertFrameVector3DGeometricallyEquals(expectedCoMAcceleration, actualCoMAcceleration, EPSILON);