Closed k2shah closed 4 months ago
@k2shah I am very sorry for the belated reply. I think the problem comes from numerical round-off error. As you point out, the check assert(isOutsidePolytopeFace(&polytope, &f, &query_point));
fails. I think I put this sanity check there to catch the numerical precision problem.
Now I think if this isOutsidePolytopeFace
check fails, then it indicates that the query point is on the face. In that case we should report that the two objects are touching each other.
@SeanCurtis-TRI would you like to help me fix this bug when you come back to TRI? Thanks! Maybe I can send the PR and you could review the code?
closing since no update
I'm running into an issue with FCL box <-> box signed distance where distance queries can hang forever. I believe the issue stems from this line.
https://github.com/flexible-collision-library/fcl/blob/master/include/fcl/narrowphase/detail/convexity_based_algorithm/gjk_libccd-inl.h#L1779
while(1)
I think the break condition is never met. Also when we run this in debug mode, a particular assertion fails.
in line 1327 of
gjk_solver_libccd-inl.h
this lineassert(isOutsidePolytopeFace(&polytope, &f, &query_point));
fails.Some preliminary findings tell me that the two objects that are failing the EPA expansion are both boxes (). and the query_point is on the same plane of the face f. I was able to look at the face normal and the query_point location. When ShapeSignedDistanceLibccdImpl is called. Likely, the
f
or thequery_point
is incorrect due to numerical precision.Below is a reproducible case as a
gtest
case. This is built with gcc 7 and against fcl 0.7.0. This is built in Debug mode, with flags-U_FORTIFY_SOURCE -fstack-protector -fno-omit-frame-pointer -g '-std=c++0x' -MD -fPIC '-std=c++17' -fno-canonical-system-headers -c fcl_test.cc