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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set max contacts for collision pairs #2270

Merged
merged 4 commits into from
Jun 26, 2024
Merged

Set max contacts for collision pairs #2270

merged 4 commits into from
Jun 26, 2024

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Dec 20, 2023

馃帀 New feature

Depends on gazebosim/gz-physics#582

Summary

Set max_contacts physics parameter in physics engines that support this feature. See gazebosim/gz-physics#582 for support in dartsim's ode collision detector.

Test it

Here's an example test world: contacts.sdf.

The test world has a large box with an ellipsoid inside. The contact points are visualized in blue:

Before: No max contacts set. Many contacts detected. Low RTF (~30%)

max_contacts_none

After: Max contacts set based on SDF default value (20). Limited to 20 contacts. High RTF (~9X%)

max_contacts

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

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.

Signed-off-by: Ian Chen <ichen@openrobotics.org>
@iche033 iche033 requested a review from azeey as a code owner December 20, 2023 00:21
@github-actions github-actions bot added the 馃尡 garden Ignition Garden label Dec 20, 2023
@iche033 iche033 added needs upstream release Blocked by a release of an upstream library 馃尡 garden Ignition Garden and removed 馃尡 garden Ignition Garden labels Dec 20, 2023
Signed-off-by: Ian Chen <ichen@openrobotics.org>
Signed-off-by: Ian Chen <ichen@openrobotics.org>
@azeey
Copy link
Contributor

azeey commented Jun 10, 2024

@caguero to make a release of gz-physics6 to unblock this PR.

@guest43
Copy link

guest43 commented Jun 23, 2024

Hi, when I run this example in Gazebo Harmonic, i don't get the "after" result with only 20 contacts. It still appears as the before result. This is true if I explicitly state the <max_contacts> in the world file as well. I am running gz physics from ROS2 installed vendor packages which appears to be the latest release (gz-physics 7.2.0). From a look at the gz-physics repo, max_contacts appears to be implemented.. has this feature indeed been released? Am I missing something?

-User

@iche033
Copy link
Contributor Author

iche033 commented Jun 24, 2024

has this feature indeed been released?

we still need to merge this PR, forward port to the gz-sim8 branch, and make another gz-sim8 release for Harmonic

@iche033 iche033 merged commit a02e891 into gz-sim7 Jun 26, 2024
8 checks passed
@iche033 iche033 deleted the max_contacts branch June 26, 2024 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
馃尡 garden Ignition Garden needs upstream release Blocked by a release of an upstream library
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants