Skip to content
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

Resolve a new GJK/EPA real world error #446

Conversation

SeanCurtis-TRI
Copy link
Contributor

@SeanCurtis-TRI SeanCurtis-TRI commented Feb 19, 2020

This PR has two commits -- the failing test in the first commit and the "fix" in the second commit. They will be squashed upon merging.

The solution to this particular failure was cleaning up one aspect of the conversion from simplex to polytope. Specifically, the conversion of a 3-simplex into a tetrahedron.

  • Comparisons were being done between squared distance and epsilon. These were changed to be squared distance and squared epsilon (this was sufficient to allow the regression test to pass).
  • Simultaneously, a TODO was resolved, removing redundant work when degenerate simplices are provided.

resolves #445


This change is Reviewable

box-box regression 6 in signed distance test.
Copy link
Contributor Author

@SeanCurtis-TRI SeanCurtis-TRI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+@hongkai-dai for feature review, please.

Reviewable status: 0 of 2 files reviewed, all discussions resolved (waiting on @hongkai-dai)

Copy link
Contributor

@hongkai-dai hongkai-dai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm: +@sherm1 for platform review please.

Reviewed 2 of 2 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @sherm1)

@SeanCurtis-TRI SeanCurtis-TRI force-pushed the PR_more_epa_regression_tests branch from d6ed943 to ac40c37 Compare February 19, 2020 22:28
Copy link
Contributor Author

@SeanCurtis-TRI SeanCurtis-TRI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI hopefully resolved by loosening the threshold in the new test parameter.

Reviewable status: 1 of 2 files reviewed, all discussions resolved (waiting on @hongkai-dai and @sherm1)

Copy link
Member

@sherm1 sherm1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm: with a couple of minor comments

Reviewed 1 of 2 files at r1, 1 of 1 files at r2.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @SeanCurtis-TRI)


include/fcl/narrowphase/detail/convexity_based_algorithm/gjk_libccd-inl.h, line 374 at r2 (raw file):

// Compares the given `value` against a _squared epsilon_. This is particularly
// important when testing some squared quantity (e.g., distance) to see if it

nit: (e.g., distance²)


include/fcl/narrowphase/detail/convexity_based_algorithm/gjk_libccd-inl.h, line 376 at r2 (raw file):

// important when testing some squared quantity (e.g., distance) to see if it
// is zero. Comparing distance squared directly against zero means that the
// distance is considered zero with only half the precision (e.g., it is

minor: I'm not sure what you mean by "comparing directly against zero". Did you mean "comparing directly against epsilon"? That would make more sense in this context as I understand it.

This specifically addresses issues when converting a 3-simplex into a
tetrahedron. It was inspired by a real-world failure case which revealed
that a conversion was performed that broke EPA assumptions. The changes
consist of:

1. Superficial formatting changes.
2. Added documentation.
3. Testing squared distance against epsilon _squared_ (instead of epsilon).
   (This last led to the example failure case to pass.)
4. Eliminate redundant degeneracy tests; if the origin lies on one face,
   simply demote to that triangle and continue.
@SeanCurtis-TRI SeanCurtis-TRI force-pushed the PR_more_epa_regression_tests branch from ac40c37 to b4cda6a Compare February 21, 2020 15:36
Copy link
Contributor Author

@SeanCurtis-TRI SeanCurtis-TRI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments addressed. I did some more significant rephrasing of the isAbsValueLessThanEpsSquared() function.

Reviewable status: 1 of 2 files reviewed, all discussions resolved (waiting on @hongkai-dai and @sherm1)

Copy link
Contributor

@hongkai-dai hongkai-dai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r2, 1 of 1 files at r3.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

Copy link
Member

@sherm1 sherm1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r3.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@SeanCurtis-TRI SeanCurtis-TRI merged commit c368089 into flexible-collision-library:master Feb 21, 2020
@SeanCurtis-TRI SeanCurtis-TRI deleted the PR_more_epa_regression_tests branch February 21, 2020 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[GJK-EPA] Another real-world signed distance failure
3 participants