-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Compute maximum depth collision points with Bullet dispatch #2543
Compute maximum depth collision points with Bullet dispatch #2543
Conversation
…hCollisionPoints2 Conflicts: drake/CMakeLists.txt drake/systems/plants/collision/bullet_model.cc
@amcastro-tri, this says do not review; is that still current? |
It is. I pushed this on Friday and I din't have the time I thought to work on it during the weekend. This is one of my tasks for today. |
For this PR I had implemented Since the original Therefore this PR actually became more like a bug fix + a refactor. Now hopefully the Matlab tests don't break... |
+@sherm1 for feature review.
|
Review status: 0 of 6 files reviewed at latest revision, 3 unresolved discussions. drake/systems/plants/collision/bullet_model.cc, line 729 [r4] (raw file):
This is the bug fix I am referring to. Bullet's persistent behavior is a bug. Good for games maybe but an undesired feature for physically accurate simulations. drake/systems/plants/collision/test/model_test.cc, line 677 [r4] (raw file):
Here the single, maximum depth, collision point return is tested. drake/systems/plants/collision/test/model_test.cc, line 691 [r4] (raw file):
This is the test removed. Now the correct behavior is "always" a single (deepest penetration) contact point. Comments from Reviewable |
This PR passed CI in 334ea0b (I just merged master again in 532cbb5 with no conflicts). Thus this PR is ready for review. Review status: 0 of 6 files reviewed at latest revision, 3 unresolved discussions. Comments from Reviewable |
My understanding is that this eliminates altogether the multi-point contact that Drake was able to get out of Bullet and which then caused physical simulation problems due to the introduction of new points at arbitrary locations -- is that right? So now a block on the ground will be supported only by a single deepest point and will thus rattle around if simulated with Drake's current contact methods. I'm fine with that if that was your intent since this at least works in a predictable way. We will need to quickly develop a non-buggy multi-point contact capability in that case. Other than the above caveat, the changes . Reviewed 4 of 4 files at r4, 2 of 2 files at r5. Comments from Reviewable |
@sherm1: This PR does not eliminate previously implemented functionality (even if buggy). The multi-point contact implementation (with random samples) is implemented by This PR does remove the apparent multi-point contact returns from (the now refactored) I do agree we need a true multi-contact implementation. My plan is to explore polyhedral convex hulls in Bullet (I wonder if applicable to convex geometries only). Review status: all files reviewed at latest revision, 3 unresolved discussions. Comments from Reviewable |
OK -- just need platform review now. Friday: +@ggould-tri Review status: all files reviewed at latest revision, 3 unresolved discussions. Comments from Reviewable |
Took me a little while to get my head around this one, but I think I understand now. Reviewed 4 of 4 files at r4, 2 of 2 files at r5. Comments from Reviewable |
Thanks, Grant! Merging. |
PR #2521 identified a "persistent" behavior in the method
BulletModel::collisionPointsAllToAll
and introducedModel::ClearCachedResults
. This persistent behavior is a bug and this PR removes it by usingModel::ClearCachedResults
.Method
BulletModel::collisionPointsAllToAll
does not implement an all-to-all dispatch but uses instead Bullet's dispatching. Therefore this PR refactors its name toModel::ComputeMaximumDepthCollisionPoints
which more appropriately describes its functionality (I am open to suggestions here).model_test.cc
is then updated to reflect this corrected functionality by removing the last set of tests inSmallBoxSittingOnLargeBox.ClearCachedResults
.This PR solves #2004.
This change is