-
Notifications
You must be signed in to change notification settings - Fork 297
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
Add support to get link AABB from its collisions #2787
base: gz-sim9
Are you sure you want to change the base?
Conversation
38b52d4
to
9c45098
Compare
Signed-off-by: Gabriel Pacheco <gabriel.fpacheco@gmail.com>
Signed-off-by: Gabriel Pacheco <gabriel.fpacheco@gmail.com>
Signed-off-by: Gabriel Pacheco <gabriel.fpacheco@gmail.com>
Signed-off-by: Gabriel Pacheco <gabriel.fpacheco@gmail.com>
* Following gazebosim#2353 (comment) * This allows to use the ECM as cache if bounding box doesn't have to be recomputed and is more suitable so that other systems can determine the AABB if necessary (e.g. physics system if checks are enabled) Signed-off-by: Gabriel Pacheco <gabriel.fpacheco@gmail.com>
469a446
to
2885b7a
Compare
took a quick look at the logic for enabling and computing AxisAlignedBox in the Link class. I think overall the approach looks fine. I see that the AxisAlignedBox component is first initialized with results computed from SDF, then later the component will be updated with the value from the physics system. I'm curious to see how similar or different the two values are. If they are very different, it could be confusing to the users. We should have a test to verify that the values are similar within some reasonable tolerance. |
🎉 New feature
Summary
This PR adds AABB support to the Link API. It computes the overall link aligned bounding box (in local and world coordinates) by merging all collision bounding boxes obtained from their geometry shapes. Plus, it adds utility functions to transform AABB coordinates and calculate mesh AABB using utilities from
gz::common::Mesh
.Test it
gz-sim
andsdformat
branches$ colcon build --packages-select sdformat15 gz-sim9 --merge-install
gz-sim9
tests:$ ./build/gz-sim9/bin/UNIT_Util_TEST && ./build/gz-sim9/bin/INTEGRATION_link
Checklist
codecheck
passed (See contributing)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.