diff --git a/test/test_fcl_signed_distance.cpp b/test/test_fcl_signed_distance.cpp index 6a89c522d..60f1c7dec 100644 --- a/test/test_fcl_signed_distance.cpp +++ b/test/test_fcl_signed_distance.cpp @@ -404,6 +404,19 @@ void test_distance_box_box_regression3() { } +// This is a *specific* case that has cropped up in the wild. This error was +// reported in https://github.com/flexible-collision-library/fcl/issues/398 +template +void test_distance_box_box_regression4() { + const Vector3 box1_size(0.614, 3, 0.37); + Transform3 X_WB1 = Transform3::Identity(); + X_WB1.translation() << -0.675, 0, 0.9115; + const Vector3 box2_size(0.494, 0.552, 0.01); + Transform3 X_WB2 = Transform3::Identity(); + X_WB2.translation() << -0.692, 0, 0.935; + test_distance_box_box_helper(box1_size, X_WB1, box2_size, X_WB2); +} + //============================================================================== GTEST_TEST(FCL_NEGATIVE_DISTANCE, sphere_sphere_ccd) { @@ -436,6 +449,7 @@ GTEST_TEST(FCL_SIGNED_DISTANCE, RealWorldRegression) { test_distance_box_box_regression1(); test_distance_box_box_regression2(); test_distance_box_box_regression3(); + test_distance_box_box_regression4(); } //==============================================================================