From 59f86be8cd538805633284e54a8c6ac12bd0c503 Mon Sep 17 00:00:00 2001
From: Florent Lamiraux <florent@laas.fr>
Date: Wed, 26 Dec 2018 06:18:39 +0100
Subject: [PATCH] Add a test on collision between cylinder and box

  This test makes GJK fail, reaching the maximal number of iterations.
---
 test/test_fcl_geometric_shapes.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/test/test_fcl_geometric_shapes.cpp b/test/test_fcl_geometric_shapes.cpp
index 808e0b22..a095e74c 100644
--- a/test/test_fcl_geometric_shapes.cpp
+++ b/test/test_fcl_geometric_shapes.cpp
@@ -242,6 +242,15 @@ BOOST_AUTO_TEST_CASE (shapeIntersection_cylinderbox)
 
   BOOST_CHECK ((res && !p2_in_cylinder && !p1_in_box) ||
                (!res && p2_in_cylinder && p1_in_box));
+
+  s1 = Cylinder (0.06, 0.1);
+  tf1.setTranslation (Vec3f (-0.66734052046473924, 0.22219183277457269,
+                             0.76825248755616293));
+  tf1.setQuatRotation (Quaternion3f (0.52613359459338371,
+                                     0.32189408354839893,
+                                     0.70415587451837913,
+                                     -0.35175580165512249));
+  res = solver.shapeDistance (s1, tf1, s2, tf2, distance, p1, p2, normal);
 }
 
 BOOST_AUTO_TEST_CASE(shapeIntersection_spheresphere)
-- 
GitLab