gazebosim / gz-physics

Abstract physics interface designed to support simulation and rapid development of robot applications.
https://gazebosim.org
Apache License 2.0
63 stars 38 forks source link

bullet-featherstone: Fix removing model with joints #577

Closed iche033 closed 7 months ago

iche033 commented 7 months ago

🦟 Bug fix

Fixes https://github.com/gazebosim/gz-physics/issues/573

Summary

When a btMultiBody is removed, its joint constraints are never actually removed, causing invalid pointers to be accessed when processing these btMultiBodyConstraints in bullet in the next world step. This PR makes sure all multi body constraints associated with a model are removed properly.

Updated world_features test to capture this case. To run the test:

ctest -R COMMON_TEST_world_features_bullet-featherstone

Checklist

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.

codecov[bot] commented 7 months ago

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (1e2bcdd) 78.20% compared to head (1f1c856) 78.23%.

:exclamation: Current head 1f1c856 differs from pull request most recent head 8e9a658. Consider uploading reports for the commit 8e9a658 to get more accurate results

Files Patch % Lines
bullet-featherstone/src/Base.hh 77.77% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## bullet_nested_model #577 +/- ## ======================================================= + Coverage 78.20% 78.23% +0.03% ======================================================= Files 143 143 Lines 7514 7516 +2 ======================================================= + Hits 5876 5880 +4 + Misses 1638 1636 -2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.