Commit ab44d479 authored by Joseph Mirabel's avatar Joseph Mirabel
Browse files

[Test] update thresholds.

parent 43e40c05
......@@ -217,7 +217,7 @@ template <typename Sa, typename Sb> void compareShapeDistance (
BOOST_AUTO_TEST_CASE(compare_convex_box)
{
FCL_REAL extents [6] = {0, 0, 0, 10, 10, 10};
FCL_REAL l = 1, w = 1, d = 1;
FCL_REAL l = 1, w = 1, d = 1, eps = 1e-4;
Box box(l*2, w*2, d*2);
Convex<Quadrilateral> convex_box (buildBox (l, w, d));
......@@ -225,16 +225,16 @@ BOOST_AUTO_TEST_CASE(compare_convex_box)
Transform3f tf2;
tf2.setTranslation (Vec3f (3, 0, 0));
compareShapeIntersection(box, convex_box, tf1, tf2);
compareShapeDistance (box, convex_box, tf1, tf2);
compareShapeIntersection(box, convex_box, tf1, tf2, eps);
compareShapeDistance (box, convex_box, tf1, tf2, eps);
tf2.setTranslation (Vec3f (0, 0, 0));
compareShapeIntersection(box, convex_box, tf1, tf2);
compareShapeDistance (box, convex_box, tf1, tf2);
compareShapeIntersection(box, convex_box, tf1, tf2, eps);
compareShapeDistance (box, convex_box, tf1, tf2, eps);
for (int i = 0; i < 1000; ++i) {
generateRandomTransform(extents, tf2);
compareShapeIntersection(box, convex_box, tf1, tf2);
compareShapeDistance (box, convex_box, tf1, tf2);
compareShapeIntersection(box, convex_box, tf1, tf2, eps);
compareShapeDistance (box, convex_box, tf1, tf2, eps);
}
}
......@@ -471,7 +471,7 @@ BOOST_AUTO_TEST_CASE(shapeIntersection_boxbox)
tf1 = Transform3f();
tf2 = Transform3f(Vec3f(15, 0, 0));
normal << 1, 0, 0;
SET_LINE; testShapeIntersection(s1, tf1, s2, tf2, true, NULL, NULL, &normal);
SET_LINE; testShapeIntersection(s1, tf1, s2, tf2, true, NULL, NULL, &normal, false, 1e-8);
tf1 = Transform3f();
tf2 = Transform3f(Vec3f(15.01, 0, 0));
......@@ -3023,7 +3023,7 @@ BOOST_AUTO_TEST_CASE(shapeIntersectionGJK_boxbox)
tf1 = Transform3f();
tf2 = Transform3f(Vec3f(15, 0, 0));
normal << 1, 0, 0;
SET_LINE; testShapeIntersection(s1, tf1, s2, tf2, true, NULL, NULL, &normal);
SET_LINE; testShapeIntersection(s1, tf1, s2, tf2, true, NULL, NULL, &normal, false, 1e-8);
tf1 = transform;
tf2 = transform * Transform3f(Vec3f(15.01, 0, 0));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment