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

Remove detachable joints when a model is removed #2686

Merged
merged 2 commits into from
Nov 26, 2024

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Nov 23, 2024

🦟 Bug fix

Partially fixes #2624

Summary

Remove detachable joints from the ECM when a model is removed. The physics engine will then also remove any associated detachable joint physics objects. I also made a change in physics system to let physics engine remove the detachable joints first before models.

Now when you delete a model, the detachable joints should be deleted causing objects to be detached.

To test:

launch detachable_joint.sdf world

gz sim -v 4 -r ./src/gz-sim/examples/worlds/detachable_joint.sdf

Delete vehicle_blue and the breadcrumbs should now fall to the ground.

Try resetting the world it should no longer crash (#2624). However, the breadcrumbs remain detached, which I think it's a separate issue related to reset.

detach_remove

Checklist

  • Signed all commits for DCO
  • Added tests
  • 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.

@github-actions github-actions bot added 🏛️ ionic Gazebo Ionic 🪵 jetty Gazebo Jetty labels Nov 23, 2024
test/integration/entity_erase.cc Outdated Show resolved Hide resolved
Signed-off-by: Ian Chen <[email protected]>
@iche033 iche033 merged commit aa76c3e into gz-sim9 Nov 26, 2024
10 checks passed
@iche033 iche033 deleted the delete_detachable_joint branch November 26, 2024 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏛️ ionic Gazebo Ionic 🪵 jetty Gazebo Jetty
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Crash after adding model and resetting
2 participants