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

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.

@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
@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
@guest43
Copy link

guest43 commented Jul 12, 2024

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

Thanks for the info. If I wanted to use this feature in advance of its official release, do you know how I would go about that?

If I'm reading this PR and status board correctly, it looks like this feature has been merged into gz-sim7 (Garden). I have installed both the stable and nightly binary releases of Garden in a container. The gz-physics6 version installed in the container is 6.6.0. I am assuming this corresponds to the gz-physics6 branch of the github repo. However, I still can't run the new feature. Can you point me in the right direction?

@iche033
Copy link
Contributor Author

iche033 commented Jul 12, 2024

The changes in gz-sim7 has not been released yet. To test this you'll need to build gz-sim7 from source

I don't think we are currently building nightlies for gz-sim7 so I think the gz-sim7 nightly you have is probably quite old now.

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
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants