-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interpretation of Assertions #380
Comments
I guess this is related to an ill-formated shape with degenerated faces (e.g., aligned points belonging to a triangle). |
Hi @cologne86, The asserts correspond to degenerate cases that can happen with a valid input. This assert failing is due to GJK currently using a relative convergence criterion making the value This assert signals a rare behavior when computing nearest points between two shapes, related to how GJK constructs the simplex leading to the computation of nearest points. The code after the assert is the fallback behavior of hppfcl. The computed nearest points remain valid however. This assert can trigger if the simplex is degenerate (a tetrahedron with 0 volume). |
Thanks a lot for your quick replies, code and mesh generation is included in a larger context. |
It seems i was wrong about: Created a pull request that adds a test |
I have another question regarding this statement:
Is there a risk in the current implementation, that the algorithm wont converge? |
It will converge as it is a convex optimization problem, and we have a limit on the number of iterations. It is just that the check values are not properly aligned together and they are mostly here for developing purposes. |
No, the algorithm will converge. At the end of the day GJK is an algorithm with solves a convex optimization problem, up to a certain tolerance w.r.t the optimal solution of this optimization problem. At the end of the day using an absolute convergence criterion rather than a relative one makes it much easier to work with in the code and it is also much simpler to interpret geometrically, I have already done some tests in the past and this seems to resolve a lot of the asserts I have encountered. |
Similar as @cologne86 I am getting these assertions when the library is compiled in debug mode. Specifically from the
when is it expected that |
Hi,
Using this library without
NDEBUG
set i am experiencing crashes caused byassert
calls.I am getting assertions using two
hpp::fcl::BVHModel<hpp::fcl::OBBRSS>
objects as inputcalling
hpp::fcl::collide
. Depending on transformations those would sometimes cause one of the following asserts:https://github.com/humanoid-path-planner/hpp-fcl/blob/893d57c6e08434fd482a656977c5376cb360e6b4/src/narrowphase/gjk.cpp#L331
https://github.com/humanoid-path-planner/hpp-fcl/blob/893d57c6e08434fd482a656977c5376cb360e6b4/src/narrowphase/gjk.cpp#L558
https://github.com/humanoid-path-planner/hpp-fcl/blob/893d57c6e08434fd482a656977c5376cb360e6b4/src/narrowphase/gjk.cpp#L1264
However, when looking at the surrounding code here:
it seems that these assertions are not explicitly error states,but the algorithm does handle the input in that case. Constraints in other cases also seem to me quite strict.
When building the software with
NDEBUG
, results still look valid and i have not experienced any crashes.The question is:
Should the assertions never be triggered with a valid input, or is it OK to go on without debug information?
The text was updated successfully, but these errors were encountered: