40 #include <gtest/gtest.h>
54 static std::array<S, 6> static_extents{ {0, 0, 0, 10, 10, 10} };
55 return static_extents;
89 for(std::size_t i = 0; i < 10; ++i)
98 distance(&s1, pose1, &s2, pose2, request, res);
99 distance(&s1_rss, pose1, &s2_rss, pose2, request, res1);
103 distance(&s1, pose1, &s2_rss, pose2, request, res1);
107 distance(&s1_rss, pose1, &s2, pose2, request, res1);
127 for(std::size_t i = 0; i < 10; ++i)
136 distance(&s1, pose1, &s2, pose2, request, res);
137 distance(&s1_rss, pose1, &s2_rss, pose2, request, res1);
141 distance(&s1, pose1, &s2_rss, pose2, request, res1);
145 distance(&s1_rss, pose1, &s2, pose2, request, res1);
150 GTEST_TEST(FCL_SHAPE_MESH_CONSISTENCY, consistency_distance_spheresphere_libccd)
153 test_consistency_distance_spheresphere_libccd<double>();
156 template <
typename S>
187 for(std::size_t i = 0; i < 10; ++i)
196 distance(&s1, pose1, &s2, pose2, request, res);
197 distance(&s1_rss, pose1, &s2_rss, pose2, request, res1);
201 distance(&s1, pose1, &s2_rss, pose2, request, res1);
205 distance(&s1_rss, pose1, &s2, pose2, request, res1);
224 for(std::size_t i = 0; i < 10; ++i)
233 distance(&s1, pose1, &s2, pose2, request, res);
234 distance(&s1_rss, pose1, &s2_rss, pose2, request, res1);
238 distance(&s1, pose1, &s2_rss, pose2, request, res1);
242 distance(&s1_rss, pose1, &s2, pose2, request, res1);
247 GTEST_TEST(FCL_SHAPE_MESH_CONSISTENCY, consistency_distance_ellipsoidellipsoid_libccd)
250 test_consistency_distance_ellipsoidellipsoid_libccd<double>();
253 template <
typename S>
285 for(std::size_t i = 0; i < 10; ++i)
294 distance(&s1, pose1, &s2, pose2, request, res);
295 distance(&s1_rss, pose1, &s2_rss, pose2, request, res1);
299 distance(&s1, pose1, &s2_rss, pose2, request, res1);
303 distance(&s1_rss, pose1, &s2, pose2, request, res1);
322 for(std::size_t i = 0; i < 10; ++i)
331 distance(&s1, pose1, &s2, pose2, request, res);
332 distance(&s1_rss, pose1, &s2_rss, pose2, request, res1);
336 distance(&s1, pose1, &s2_rss, pose2, request, res1);
340 distance(&s1_rss, pose1, &s2, pose2, request, res1);
345 GTEST_TEST(FCL_SHAPE_MESH_CONSISTENCY, consistency_distance_boxbox_libccd)
348 test_consistency_distance_boxbox_libccd<double>();
351 template <
typename S>
383 for(std::size_t i = 0; i < 10; ++i)
392 distance(&s1, pose1, &s2, pose2, request, res);
393 distance(&s1_rss, pose1, &s2_rss, pose2, request, res1);
397 distance(&s1, pose1, &s2_rss, pose2, request, res1);
401 distance(&s1_rss, pose1, &s2, pose2, request, res1);
420 for(std::size_t i = 0; i < 10; ++i)
429 distance(&s1, pose1, &s2, pose2, request, res);
430 distance(&s1_rss, pose1, &s2_rss, pose2, request, res1);
434 distance(&s1, pose1, &s2_rss, pose2, request, res1);
438 distance(&s1_rss, pose1, &s2, pose2, request, res1);
443 GTEST_TEST(FCL_SHAPE_MESH_CONSISTENCY, consistency_distance_cylindercylinder_libccd)
446 test_consistency_distance_cylindercylinder_libccd<double>();
449 template <
typename S>
480 for(std::size_t i = 0; i < 10; ++i)
489 distance(&s1, pose1, &s2, pose2, request, res);
490 distance(&s1_rss, pose1, &s2_rss, pose2, request, res1);
494 distance(&s1, pose1, &s2_rss, pose2, request, res1);
498 distance(&s1_rss, pose1, &s2, pose2, request, res1);
517 for(std::size_t i = 0; i < 10; ++i)
526 distance(&s1, pose1, &s2, pose2, request, res);
527 distance(&s1_rss, pose1, &s2_rss, pose2, request, res1);
531 distance(&s1, pose1, &s2_rss, pose2, request, res1);
535 distance(&s1_rss, pose1, &s2, pose2, request, res1);
540 GTEST_TEST(FCL_SHAPE_MESH_CONSISTENCY, consistency_distance_conecone_libccd)
543 test_consistency_distance_conecone_libccd<double>();
546 template <
typename S>
579 for(std::size_t i = 0; i < 10; ++i)
588 distance(&s1, pose1, &s2, pose2, request, res);
589 distance(&s1_rss, pose1, &s2_rss, pose2, request, res1);
593 distance(&s1, pose1, &s2_rss, pose2, request, res1);
597 distance(&s1_rss, pose1, &s2, pose2, request, res1);
617 for(std::size_t i = 0; i < 10; ++i)
626 distance(&s1, pose1, &s2, pose2, request, res);
627 distance(&s1_rss, pose1, &s2_rss, pose2, request, res1);
631 distance(&s1, pose1, &s2_rss, pose2, request, res1);
635 distance(&s1_rss, pose1, &s2, pose2, request, res1);
640 GTEST_TEST(FCL_SHAPE_MESH_CONSISTENCY, consistency_distance_spheresphere_GJK)
643 test_consistency_distance_spheresphere_GJK<double>();
646 template <
typename S>
679 for(std::size_t i = 0; i < 10; ++i)
688 distance(&s1, pose1, &s2, pose2, request, res);
689 distance(&s1_rss, pose1, &s2_rss, pose2, request, res1);
693 distance(&s1, pose1, &s2_rss, pose2, request, res1);
697 distance(&s1_rss, pose1, &s2, pose2, request, res1);
717 for(std::size_t i = 0; i < 10; ++i)
726 distance(&s1, pose1, &s2, pose2, request, res);
727 distance(&s1_rss, pose1, &s2_rss, pose2, request, res1);
731 distance(&s1, pose1, &s2_rss, pose2, request, res1);
735 distance(&s1_rss, pose1, &s2, pose2, request, res1);
740 GTEST_TEST(FCL_SHAPE_MESH_CONSISTENCY, consistency_distance_ellipsoidellipsoid_GJK)
743 test_consistency_distance_ellipsoidellipsoid_GJK<double>();
746 template <
typename S>
779 for(std::size_t i = 0; i < 10; ++i)
788 distance(&s1, pose1, &s2, pose2, request, res);
789 distance(&s1_rss, pose1, &s2_rss, pose2, request, res1);
793 distance(&s1, pose1, &s2_rss, pose2, request, res1);
797 distance(&s1_rss, pose1, &s2, pose2, request, res1);
816 for(std::size_t i = 0; i < 10; ++i)
825 distance(&s1, pose1, &s2, pose2, request, res);
826 distance(&s1_rss, pose1, &s2_rss, pose2, request, res1);
830 distance(&s1, pose1, &s2_rss, pose2, request, res1);
834 distance(&s1_rss, pose1, &s2, pose2, request, res1);
839 GTEST_TEST(FCL_SHAPE_MESH_CONSISTENCY, consistency_distance_boxbox_GJK)
842 test_consistency_distance_boxbox_GJK<double>();
845 template <
typename S>
878 for(std::size_t i = 0; i < 10; ++i)
887 distance(&s1, pose1, &s2, pose2, request, res);
888 distance(&s1_rss, pose1, &s2_rss, pose2, request, res1);
895 distance(&s1, pose1, &s2_rss, pose2, request, res1);
902 distance(&s1_rss, pose1, &s2, pose2, request, res1);
924 for(std::size_t i = 0; i < 10; ++i)
933 distance(&s1, pose1, &s2, pose2, request, res);
934 distance(&s1_rss, pose1, &s2_rss, pose2, request, res1);
938 distance(&s1, pose1, &s2_rss, pose2, request, res1);
942 distance(&s1_rss, pose1, &s2, pose2, request, res1);
947 GTEST_TEST(FCL_SHAPE_MESH_CONSISTENCY, consistency_distance_cylindercylinder_GJK)
950 test_consistency_distance_cylindercylinder_GJK<double>();
953 template <
typename S>
986 for(std::size_t i = 0; i < 10; ++i)
995 distance(&s1, pose1, &s2, pose2, request, res);
996 distance(&s1_rss, pose1, &s2_rss, pose2, request, res1);
1000 distance(&s1, pose1, &s2_rss, pose2, request, res1);
1004 distance(&s1_rss, pose1, &s2, pose2, request, res1);
1023 for(std::size_t i = 0; i < 10; ++i)
1032 distance(&s1, pose1, &s2, pose2, request, res);
1033 distance(&s1_rss, pose1, &s2_rss, pose2, request, res1);
1037 distance(&s1, pose1, &s2_rss, pose2, request, res1);
1041 distance(&s1_rss, pose1, &s2, pose2, request, res1);
1046 GTEST_TEST(FCL_SHAPE_MESH_CONSISTENCY, consistency_distance_conecone_GJK)
1049 test_consistency_distance_conecone_GJK<double>();
1052 template <
typename S>
1111 pose_aabb.translation() =
Vector3<S>(40, 0, 0);
1112 pose_obb.translation() =
Vector3<S>(40, 0, 0);
1143 pose_aabb.translation() =
Vector3<S>(30, 0, 0);
1144 pose_obb.translation() =
Vector3<S>(30, 0, 0);
1175 pose_aabb.translation() =
Vector3<S>(29.8, 0, 0);
1176 pose_obb.translation() =
Vector3<S>(29.8, 0, 0);
1207 pose.translation() =
Vector3<S>(-29.9, 0, 0);
1208 pose_aabb.translation() =
Vector3<S>(-29.8, 0, 0);
1209 pose_obb.translation() =
Vector3<S>(-29.8, 0, 0);
1240 pose_aabb.translation() =
Vector3<S>(-30, 0, 0);
1241 pose_obb.translation() =
Vector3<S>(-30, 0, 0);
1272 GTEST_TEST(FCL_SHAPE_MESH_CONSISTENCY, consistency_collision_spheresphere_libccd)
1275 test_consistency_collision_spheresphere_libccd<double>();
1278 template <
typename S>
1337 pose_aabb.translation() =
Vector3<S>(40, 0, 0);
1338 pose_obb.translation() =
Vector3<S>(40, 0, 0);
1369 pose_aabb.translation() =
Vector3<S>(30, 0, 0);
1370 pose_obb.translation() =
Vector3<S>(30, 0, 0);
1404 pose_aabb.translation() =
Vector3<S>(29.9, 0, 0);
1405 pose_obb.translation() =
Vector3<S>(29.9, 0, 0);
1435 pose.translation() =
Vector3<S>(-29.9, 0, 0);
1436 pose_aabb.translation() =
Vector3<S>(-29.9, 0, 0);
1437 pose_obb.translation() =
Vector3<S>(-29.9, 0, 0);
1468 pose_aabb.translation() =
Vector3<S>(-30, 0, 0);
1469 pose_obb.translation() =
Vector3<S>(-30, 0, 0);
1500 GTEST_TEST(FCL_SHAPE_MESH_CONSISTENCY, consistency_collision_ellipsoidellipsoid_libccd)
1503 test_consistency_collision_ellipsoidellipsoid_libccd<double>();
1506 template <
typename S>
1564 pose.translation() =
Vector3<S>(15.01, 0, 0);
1565 pose_aabb.translation() =
Vector3<S>(15.01, 0, 0);
1566 pose_obb.translation() =
Vector3<S>(15.01, 0, 0);
1596 pose.translation() =
Vector3<S>(14.99, 0, 0);
1597 pose_aabb.translation() =
Vector3<S>(14.99, 0, 0);
1598 pose_obb.translation() =
Vector3<S>(14.99, 0, 0);
1629 GTEST_TEST(FCL_SHAPE_MESH_CONSISTENCY, consistency_collision_boxbox_libccd)
1632 test_consistency_collision_boxbox_libccd<double>();
1635 template <
typename S>
1694 pose_aabb.translation() =
Vector3<S>(22.4, 0, 0);
1695 pose_obb.translation() =
Vector3<S>(22.4, 0, 0);
1725 pose.translation() =
Vector3<S>(22.51, 0, 0);
1726 pose_aabb.translation() =
Vector3<S>(22.51, 0, 0);
1727 pose_obb.translation() =
Vector3<S>(22.51, 0, 0);
1758 GTEST_TEST(FCL_SHAPE_MESH_CONSISTENCY, consistency_collision_spherebox_libccd)
1761 test_consistency_collision_spherebox_libccd<double>();
1764 template <
typename S>
1790 pose_aabb.translation() =
Vector3<S>(9.99, 0, 0);
1791 pose_obb.translation() =
Vector3<S>(9.99, 0, 0);
1821 pose.translation() =
Vector3<S>(10.01, 0, 0);
1822 pose_aabb.translation() =
Vector3<S>(10.01, 0, 0);
1823 pose_obb.translation() =
Vector3<S>(10.01, 0, 0);
1854 GTEST_TEST(FCL_SHAPE_MESH_CONSISTENCY, consistency_collision_cylindercylinder_libccd)
1857 test_consistency_collision_cylindercylinder_libccd<double>();
1860 template <
typename S>
1886 pose_aabb.translation() =
Vector3<S>(9.9, 0, 0);
1887 pose_obb.translation() =
Vector3<S>(9.9, 0, 0);
1918 pose_aabb.translation() =
Vector3<S>(10.1, 0, 0);
1919 pose_obb.translation() =
Vector3<S>(10.1, 0, 0);
1950 pose_aabb.translation() =
Vector3<S>(0, 0, 9.9);
1951 pose_obb.translation() =
Vector3<S>(0, 0, 9.9);
1982 pose_aabb.translation() =
Vector3<S>(0, 0, 10.1);
1983 pose_obb.translation() =
Vector3<S>(0, 0, 10.1);
2014 GTEST_TEST(FCL_SHAPE_MESH_CONSISTENCY, consistency_collision_conecone_libccd)
2017 test_consistency_collision_conecone_libccd<double>();
2020 template <
typename S>
2081 pose_aabb.translation() =
Vector3<S>(40, 0, 0);
2082 pose_obb.translation() =
Vector3<S>(40, 0, 0);
2113 pose_aabb.translation() =
Vector3<S>(30, 0, 0);
2114 pose_obb.translation() =
Vector3<S>(30, 0, 0);
2145 pose_aabb.translation() =
Vector3<S>(29.8, 0, 0);
2146 pose_obb.translation() =
Vector3<S>(29.8, 0, 0);
2177 pose.translation() =
Vector3<S>(-29.9, 0, 0);
2178 pose_aabb.translation() =
Vector3<S>(-29.8, 0, 0);
2179 pose_obb.translation() =
Vector3<S>(-29.8, 0, 0);
2210 pose_aabb.translation() =
Vector3<S>(-30, 0, 0);
2211 pose_obb.translation() =
Vector3<S>(-30, 0, 0);
2242 GTEST_TEST(FCL_SHAPE_MESH_CONSISTENCY, consistency_collision_spheresphere_GJK)
2245 test_consistency_collision_spheresphere_GJK<double>();
2248 template <
typename S>
2309 pose_aabb.translation() =
Vector3<S>(40, 0, 0);
2310 pose_obb.translation() =
Vector3<S>(40, 0, 0);
2341 pose_aabb.translation() =
Vector3<S>(30, 0, 0);
2342 pose_obb.translation() =
Vector3<S>(30, 0, 0);
2373 pose_aabb.translation() =
Vector3<S>(29.9, 0, 0);
2374 pose_obb.translation() =
Vector3<S>(29.9, 0, 0);
2405 pose.translation() =
Vector3<S>(-29.9, 0, 0);
2406 pose_aabb.translation() =
Vector3<S>(-29.9, 0, 0);
2407 pose_obb.translation() =
Vector3<S>(-29.9, 0, 0);
2438 pose_aabb.translation() =
Vector3<S>(-30, 0, 0);
2439 pose_obb.translation() =
Vector3<S>(-30, 0, 0);
2470 GTEST_TEST(FCL_SHAPE_MESH_CONSISTENCY, consistency_collision_ellipsoidellipsoid_GJK)
2473 test_consistency_collision_ellipsoidellipsoid_GJK<double>();
2476 template <
typename S>
2536 pose.translation() =
Vector3<S>(15.01, 0, 0);
2537 pose_aabb.translation() =
Vector3<S>(15.01, 0, 0);
2538 pose_obb.translation() =
Vector3<S>(15.01, 0, 0);
2568 pose.translation() =
Vector3<S>(14.99, 0, 0);
2569 pose_aabb.translation() =
Vector3<S>(14.99, 0, 0);
2570 pose_obb.translation() =
Vector3<S>(14.99, 0, 0);
2601 GTEST_TEST(FCL_SHAPE_MESH_CONSISTENCY, consistency_collision_boxbox_GJK)
2604 test_consistency_collision_boxbox_GJK<double>();
2607 template <
typename S>
2668 pose_aabb.translation() =
Vector3<S>(22.4, 0, 0);
2669 pose_obb.translation() =
Vector3<S>(22.4, 0, 0);
2699 pose.translation() =
Vector3<S>(22.51, 0, 0);
2700 pose_aabb.translation() =
Vector3<S>(22.51, 0, 0);
2701 pose_obb.translation() =
Vector3<S>(22.51, 0, 0);
2732 GTEST_TEST(FCL_SHAPE_MESH_CONSISTENCY, consistency_collision_spherebox_GJK)
2735 test_consistency_collision_spherebox_GJK<double>();
2738 template <
typename S>
2766 pose_aabb.translation() =
Vector3<S>(9.99, 0, 0);
2767 pose_obb.translation() =
Vector3<S>(9.99, 0, 0);
2797 pose.translation() =
Vector3<S>(10.01, 0, 0);
2798 pose_aabb.translation() =
Vector3<S>(10.01, 0, 0);
2799 pose_obb.translation() =
Vector3<S>(10.01, 0, 0);
2830 GTEST_TEST(FCL_SHAPE_MESH_CONSISTENCY, consistency_collision_cylindercylinder_GJK)
2833 test_consistency_collision_cylindercylinder_GJK<double>();
2836 template <
typename S>
2864 pose_aabb.translation() =
Vector3<S>(9.9, 0, 0);
2865 pose_obb.translation() =
Vector3<S>(9.9, 0, 0);
2896 pose_aabb.translation() =
Vector3<S>(10.1, 0, 0);
2897 pose_obb.translation() =
Vector3<S>(10.1, 0, 0);
2928 pose_aabb.translation() =
Vector3<S>(0, 0, 9.9);
2929 pose_obb.translation() =
Vector3<S>(0, 0, 9.9);
2960 pose_aabb.translation() =
Vector3<S>(0, 0, 10.1);
2961 pose_obb.translation() =
Vector3<S>(0, 0, 10.1);
2992 GTEST_TEST(FCL_SHAPE_MESH_CONSISTENCY, consistency_collision_conecone_GJK)
2995 test_consistency_collision_conecone_GJK<double>();
3001 ::testing::InitGoogleTest(&argc, argv);
3002 return RUN_ALL_TESTS();