Commit a27a270d authored by jpan's avatar jpan
Browse files

add gtest for front list


git-svn-id: https://kforge.ros.org/fcl/fcl_ros@33 253336fb-580f-4252-a368-f3cef5a2a82b
parent f10f8eaa
......@@ -50,4 +50,7 @@ rosbuild_add_gtest(test_core_collision_shape_mesh_consistency test/test_core_col
target_link_libraries(test_core_collision_shape_mesh_consistency fcl)
rosbuild_add_gtest(test_core_broad_phase test/test_core_broad_phase.cpp)
target_link_libraries(test_core_broad_phase fcl)
\ No newline at end of file
target_link_libraries(test_core_broad_phase fcl)
rosbuild_add_gtest(test_core_front_list test/test_core_front_list.cpp)
target_link_libraries(test_core_front_list fcl)
\ No newline at end of file
......@@ -74,6 +74,7 @@ int collide(const CollisionObject* o1, const CollisionObject* o2,
}
else if(object_type1 == OT_GEOM && object_type2 == OT_BVH)
{
//if(!CollisionFunctionLookTable.collision_matrix[node_type1][node_type2])
if(!CollisionFunctionLookTable.collision_matrix[node_type2][node_type1])
{
std::cerr << "Warning: collision function between node type " << node_type1 << " and node type " << node_type2 << " is not supported"<< std::endl;
......
......@@ -950,7 +950,7 @@ int KDOP24PlaneCollide(const CollisionObject* o1, const CollisionObject* o2, int
MESHSHAPE_COMMON_CODE();
}
// use MESH SHAPE
/*
int BoxAABBCollide(const CollisionObject* o1, const CollisionObject* o2, int num_max_contacts, bool exhaustive, bool enable_contact, std::vector<Contact>& contacts)
{
......@@ -1325,6 +1325,7 @@ int PlaneKDOP24Collide(const CollisionObject* o1, const CollisionObject* o2, int
*/
int AABBAABBCollide(const CollisionObject* o1, const CollisionObject* o2, int num_max_contacts, bool exhaustive, bool enable_contact, std::vector<Contact>& contacts)
{
MeshCollisionTraversalNode<AABB> node;
......@@ -1493,7 +1494,8 @@ CollisionFunctionMatrix::CollisionFunctionMatrix()
collision_matrix[BV_KDOP24][GEOM_CYLINDER] = KDOP24CylinderCollide;
collision_matrix[BV_KDOP24][GEOM_CONVEX] = KDOP24ConvexCollide;
collision_matrix[BV_KDOP24][GEOM_PLANE] = KDOP24PlaneCollide;
/*
/*
collision_matrix[GEOM_BOX][BV_AABB] = BoxAABBCollide;
collision_matrix[GEOM_SPHERE][BV_AABB] = SphereAABBCollide;
collision_matrix[GEOM_CAPSULE][BV_AABB] = CapAABBCollide;
......@@ -1541,7 +1543,8 @@ CollisionFunctionMatrix::CollisionFunctionMatrix()
collision_matrix[GEOM_CYLINDER][BV_KDOP24] = CylinderKDOP24Collide;
collision_matrix[GEOM_CONVEX][BV_KDOP24] = ConvexKDOP24Collide;
collision_matrix[GEOM_PLANE][BV_KDOP24] = PlaneKDOP24Collide;
*/
*/
collision_matrix[BV_AABB][BV_AABB] = AABBAABBCollide;
collision_matrix[BV_OBB][BV_OBB] = OBBOBBCollide;
collision_matrix[BV_RSS][BV_RSS] = RSSRSSCollide;
......
......@@ -89,8 +89,6 @@ TEST(collision_test, mesh_mesh)
std::vector<Transform> transforms; // t0
std::vector<Transform> transforms2; // t1
std::vector<Transform> transforms_ccd; // t0
std::vector<Transform> transforms_ccd2; // t1
BVH_REAL extents[] = {-3000, -3000, 0, 3000, 3000, 3000};
BVH_REAL delta_trans[] = {1, 1, 1};
int n = 10;
......
Supports Markdown
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