Open SLrepo opened 4 years ago
FCL cannot compute the penetration between a non-convex mesh and anything else, for several reasons.
FCL cannot compute the penetration between a non-convex mesh and anything else, for several reasons.
- BVHModel may not even be closed so the interior or exterior is not well defined. Thus BVHModel are surface only.
- Even if you define conventionally an interior, for a non-convex model, computing the penetration depth is not a local problem any more and is thus hard (read time-consuming) to compute. This isn't implemented in FCL.
Does it mean if the meshes are convex, fcl would work? Since a non-convex shape can be decomposed into several convex shapes.
Correct. The key being that convex shapes, by definition, must be closed. :) There is no ambiguity about inside/outside and there will be a well-defined minimum-translational distance (even though the "nearest point" may not be unique.)
According to the reference, collision distance should be negative when objects are in collision. However, when the objects are not primitive shapes (e.g. when a loaded .obj file object is in collision with some other objects), the min_distance returned by DistanceResult is always 0. Below is an example.
When I change the first axis of "tf1" from 0 to 20, the returned min_distance gradually become smaller, at some point, it should become negative (objects in collision). However, it never becomes negative and stayed at 0. The .obj file I used is from here, the 'loadOBJFile' function is the same as the one used in fcl/test.