Skip to content

Commit

Permalink
extractClosestPoints() from simplex made more robust to degenerate si…
Browse files Browse the repository at this point in the history
…mplex (flexible-collision-library#296)

* Expose numerical errors in gjk_libccd-inl.h extractClosestPoints()

If the simplex is degenerate, it can lead to divide-by-zero errors. This
test is drawn from the real world and exposes such a problem - nearest
points are returned as NaN. See
flexible-collision-library#293
for the discussion

* Make extractClosestPoints more robust

For simplex of size n, if the simplex is degenerate, extracts from a
simplex of size n - 1 (to prevent returning NaN).

1. Refactor point extraction into independently callable methods.
2. At each level, add method for downgrading the simplex.
3. Add unit tests on the local methods.
4. Add integration test with motivating example.
5. Update documentation of this implementation.
  • Loading branch information
SeanCurtis-TRI authored and Nico van Duijn committed Jul 5, 2018
1 parent 0556190 commit de2e541
Show file tree
Hide file tree
Showing 4 changed files with 886 additions and 124 deletions.
Loading

0 comments on commit de2e541

Please sign in to comment.