Closed vastsoun closed 3 months ago
Hi @vastsoun,
You can check out https://github.com/humanoid-path-planner/hpp-fcl/pull/574 to see how to compute multiple contact points.
More processing is required to go from collision detection (computing the contact normal and a pair of contact points) to contact surface computation (computing multiple pairs of contact points that all share the same contact normal). Therefore, the contact surface computation uses the computeContactPatch
function.
The num_max_contacts
parameter in the CollisionRequest
is the maximum number of contact normals that collide
can compute. Since primitives are convex in hpp-fcl (box, sphere, ellipsoid, cones, convex meshes etc.), there is only one normal per call to collide
.
The num_max_contacts
is therefore only useful for non-convex objects such as BVHModel
shapes.
Hi there,
I've been trying to set up a box-on-box collision, one for a cube and another for a floor/ground, but have been getting only a single contact when performing collision checking. I used the unit test provided in
test/box_box_collision.cpp
as a sanity check against my own code, but it yields the same result:My question is: is it expected or intended to only issue a single contact for box-box or am I doing something wrong? What I wanted to get was four (4) contacts.
Here is the modified version of the code I used to verify:
I compiled and built the current version on the
devel
branch.