-
Notifications
You must be signed in to change notification settings - Fork 41
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
Support setting max contacts in dartsim's ODE collision detector #582
Conversation
Signed-off-by: Ian Chen <ichen@openrobotics.org>
Signed-off-by: Ian Chen <ichen@openrobotics.org>
Signed-off-by: Ian Chen <ichen@openrobotics.org>
Signed-off-by: Ian Chen <ichen@openrobotics.org>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## gz-physics6 #582 +/- ##
===============================================
+ Coverage 78.59% 78.64% +0.04%
===============================================
Files 140 141 +1
Lines 7654 7713 +59
===============================================
+ Hits 6016 6066 +50
- Misses 1638 1647 +9 ☔ View full report in Codecov by Sentry. |
I see the upstream Ode collision detector has the option to limit contacts https://github.com/dartsim/dart/blob/b7f5dd1cee755fe0e7a43c8c83794f22452501c1/dart/collision/ode/OdeCollisionDetector.cpp#L317. Is it not possible to use that? |
That's the flag we're setting in EntityManagementFeatures.cc. I noticed that it limits the max number of contacts for all entities instead of max contacts per collision pair. As a quick test, I tried setting it to 10 and then inserting boxes in shapes.sdf world. Eventually objects will start sinking and then falling through the ground plane. |
Signed-off-by: Ian Chen <ichen@openrobotics.org>
Ah, I think I understand now. So, this PR makes it so that each collision pair will have the same number of max contacts. This as opposed to the total number of contacts in the world being limited to the max contact parameter. Is that right? I think Gazebo-classic also had a way to set the max contact parameter for each |
yes that's correct
yeah that's a related feature which gives users finer control of max contacts for a specific collision. |
@azeey to review. |
I think we should be careful about naming the features and APIs to make it clear which interpretation of max contacts is being used. Here's some suggested feature names:
|
Signed-off-by: Ian Chen <ichen@openrobotics.org>
Great, thanks for the suggestions. For the feature in this PR, I renamed it from |
thanks; I just wrote the first thing that came to mind; we can see if @azeey has any different naming suggestions. At risk of bike-shedding, I think I only meant to include |
Signed-off-by: Ian Chen <ichen@openrobotics.org>
ok no problem. @azeey any thoughts on naming? I'll make the change if Addisu agrees. |
|
Signed-off-by: Ian Chen <ichen@openrobotics.org>
ok updated! b140329 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a few places where the documentation could be cleaned up
🎉 New feature
Summary
Support setting max number of contacts between collision pairs.
MaxContacts
feature.collide
function in dartsim'sOdeCollisionDetector
class to post process the contact results. Not ideal as it involves copying contact data. It would be nice if dart provides some hooks / callback into their collision checking process e.g. here so we can avoid the copy.Added test to make sure the max contact value does limit the no. of contacts.
See gazebosim/gz-sim#2270 for testing with gz-sim.
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.