You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Hi @vastsoun,
You can check out #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.
lmontaut
changed the title
Problem with Box-Box collision
Computing multiple contact points for Box-Box collision
Aug 9, 2024
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:Running 1 test case... Num. Collisions: 1 Num. Collisions: 1 Num. Collisions: 0 Num. Collisions: 0
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.The text was updated successfully, but these errors were encountered: