Skip to content

Commit

Permalink
Set numeric error epsilon value for ComputeSimilarityTransformTraject…
Browse files Browse the repository at this point in the history
…ory3D for rotations to 1e-6
  • Loading branch information
boxanm committed Feb 27, 2024
1 parent 610eecd commit 79dda58
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions utest/ui/Transformations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,16 +465,15 @@ TEST(Transformation, ComputeSimilarityTransformTrajectory3D)
const NumericType scale{ 1.9 };
const Eigen::Transform<NumericType, 3, Eigen::Affine> transformation = buildUpTransformation3D(translation, rotation, scale);
// Transform and assert on the result.
assertOnDataPointsTransformation(trajectory, transformation.matrix(), transformator);
assertOnDataPointsTransformation(trajectory, transformation.matrix(), transformator, 1e-6);
}
// Translation + rotation + Upscaling.
{
const NumericType kEpsilonNumericalError = 1e-6;
const Eigen::Matrix<NumericType, 3, 1> translation{ 1, -3, -4 };
const Eigen::Quaternion<NumericType> rotation{ 0, -2.54, 0, 0.5 };
const NumericType scale{ 1.9 };
const Eigen::Transform<NumericType, 3, Eigen::Affine> transformation = buildUpTransformation3D(translation, rotation, scale);
// Transform and assert on the result.
assertOnDataPointsTransformation(trajectory, transformation.matrix(), transformator, kEpsilonNumericalError);
assertOnDataPointsTransformation(trajectory, transformation.matrix(), transformator, 1e-6);
}
}

0 comments on commit 79dda58

Please sign in to comment.