35 #define BOOST_TEST_MODULE FCL_SECURITY_MARGIN
36 #include <boost/test/included/unit_test.hpp>
60 #define MATH_SQUARED(x) (x * x)
70 const double tol = 1e-8;
80 computeBV(s2, tf2_collision, bv2_transformed);
83 bv1.
overlap(bv2_transformed, collisionRequest, sqrDistLowerBound);
85 BOOST_CHECK_CLOSE(sqrDistLowerBound, 0, tol);
95 computeBV(s2, tf2_no_collision, bv2_transformed);
98 bv1.
overlap(bv2_transformed, collisionRequest, sqrDistLowerBound);
110 AABB bv2_transformed;
111 computeBV(s2, tf2_no_collision, bv2_transformed);
114 bv1.
overlap(bv2_transformed, collisionRequest, sqrDistLowerBound);
116 BOOST_CHECK_SMALL(sqrDistLowerBound, tol);
126 AABB bv2_transformed;
130 bv1.
overlap(bv2_transformed, collisionRequest, sqrDistLowerBound);
132 BOOST_CHECK_SMALL(sqrDistLowerBound, tol);
140 AABB bv2_transformed;
141 computeBV(s2, tf2_collision, bv2_transformed);
144 bv1.
overlap(bv2_transformed, collisionRequest, sqrDistLowerBound);
170 AABB bv2_transformed;
171 computeBV(s2, tf2_collision, bv2_transformed);
174 bv1.
overlap(bv2_transformed, collisionRequest, sqrDistLowerBound);
179 BOOST_CHECK(!bv1.
overlap(bv3));
193 collide(s1.get(),
tf1, s2.get(), tf2_collision, collisionRequest,
207 collide(s1.get(),
tf1, s2.get(), tf2_no_collision, collisionRequest,
221 collide(s1.get(),
tf1, s2.get(), tf2_no_collision, collisionRequest,
237 collide(s1.get(),
tf1, s2.get(),
tf2, collisionRequest, collisionResult);
249 collide(s1.get(),
tf1, s2.get(), tf2_collision, collisionRequest,
268 collide(c1.get(),
tf1,
c2.get(), tf2_collision, collisionRequest,
282 collide(c1.get(),
tf1,
c2.get(), tf2_no_collision, collisionRequest,
296 collide(c1.get(),
tf1,
c2.get(), tf2_no_collision, collisionRequest,
312 collide(c1.get(),
tf1,
c2.get(),
tf2, collisionRequest, collisionResult);
324 collide(c1.get(),
tf1,
c2.get(), tf2_collision, collisionRequest,
338 const double tol = 1e-3;
344 collide(b1.get(),
tf1, b2.get(), tf2_collision, collisionRequest,
359 collide(b1.get(),
tf1, b2.get(), tf2_no_collision, collisionRequest,
371 collide(b1.get(),
tf1, b2.get(), tf2_collision, collisionRequest,
384 collide(b1.get(),
tf1, b2.get(), tf2_collision, collisionRequest,
402 collide(b1.get(),
tf1, b2.get(),
tf2, collisionRequest, collisionResult);
410 template <
typename ShapeType1,
typename ShapeType2>
412 const ShapeType2& shape2,
418 collide(&shape1,
tf1, &shape2, tf2_collision, collisionRequest,
433 collide(&shape1,
tf1, &shape2, tf2_no_collision, collisionRequest,
445 collide(&shape1,
tf1, &shape2, tf2_collision, collisionRequest,
458 collide(&shape1,
tf1, &shape2, tf2_collision, collisionRequest,
479 collide(&shape1,
tf1, &shape2,
tf2, collisionRequest, collisionResult);
499 const double tol = 1e-6;