gazebosim / gz-physics

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

bullet-featherstone: Fix bounding box for collisions with pose offset #647

Closed iche033 closed 1 month ago

iche033 commented 1 month ago

🦟 Bug fix

hide whitespace changes for better diff: https://github.com/gazebosim/gz-physics/pull/647/files?w=1

Summary

Currently if a collision has a pose offset, the bullet-featherstone plugin return an incorrect axis aligned bounding box for the link containing the collision. This is found to be caused by incorrect frame data pose computed for collisions - It currently ignores the collision pose offset.

This PR makes a few changes to KinematicsFeatures::FrameDataRelativeToWorld in bullet-featherstone plugin:

The link_features's bounding box test was previously skipped for bullet-featherstone plugin. This PR enables this test for bullet-featherstone by requiring only a minimal set of features needed to run the test.

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 1 month ago

Codecov Report

Attention: Patch coverage is 92.30769% with 3 lines in your changes missing coverage. Please review.

Project coverage is 79.06%. Comparing base (92e02c3) to head (4f35c1e). Report is 17 commits behind head on gz-physics7.

:exclamation: Current head 4f35c1e differs from pull request most recent head 84054fa

Please upload reports for the commit 84054fa to get more accurate results.

Files Patch % Lines
bullet-featherstone/src/KinematicsFeatures.cc 92.30% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## gz-physics7 #647 +/- ## =============================================== + Coverage 78.32% 79.06% +0.74% =============================================== Files 140 140 Lines 8069 8235 +166 =============================================== + Hits 6320 6511 +191 + Misses 1749 1724 -25 ```

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

iche033 commented 1 month ago

Thanks for adding the test. I'm tracking all frame data issues in https://github.com/gazebosim/gz-physics/issues/648

iche033 commented 1 month ago

I think there's still an issue with model FrameData calculation, but I think it would be best to address in a separate PR.

Follow-up PR: #649