Which parameter I should use to check for collision detection
Hi,
I am using the fcl library to detect collisions between two objects I used the following code:
bool flag = false ;
collisionObject co0(Shpere0, tf0);
std::vector<CollisionObject*> boxes;
generateBoxesFromOctomap(boxes, *st_tree);
for(size_t i = 0; i < boxes.size(); ++i)
{
bool res2 = solver.shapeIntersect(*Shpere0, tf0, *boxes[i], tf1, &contact_points, &penetration_depth, &normal);
static const int num_max_contacts = std::numeric_limits<int>::max();
static const bool enable_contact = true;
fcl::CollisionResult result;
fcl::CollisionRequest request(num_max_contacts, enable_contact);
// flag = fcl::collide(&co0, &co1, request, result);
// OR
// flag = res1 ;
}
Which value is the right one ? I want if flag = true then there is a collision and if flag == false then there is no collision .. so which one is the write one ????
// flag = fcl::collide(&co0, &co1, request, result);
// OR
// flag = res1