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

Boundingbox on Link API #2353

Open
jfelixre opened this issue Apr 2, 2024 · 4 comments · May be fixed by #2787
Open

Boundingbox on Link API #2353

jfelixre opened this issue Apr 2, 2024 · 4 comments · May be fixed by #2787
Labels
enhancement New feature or request help wanted We accept pull requests!

Comments

@jfelixre
Copy link

jfelixre commented Apr 2, 2024

There is an alternative of Gazebo-classic's Link API Boundingbox function for ignition?

API reference page still shows a "TODO"

thanks!

@jfelixre jfelixre added the enhancement New feature or request label Apr 2, 2024
@azeey azeey moved this from Inbox to To do in Core development May 6, 2024
@azeey azeey added the help wanted We accept pull requests! label May 6, 2024
@azeey
Copy link
Contributor

azeey commented May 6, 2024

We already have the ability to get the bounding box, but it's through a component. Documenting this would be a good step as well.

@gabrielfpacheco gabrielfpacheco linked a pull request Feb 19, 2025 that will close this issue
9 tasks
@gabrielfpacheco
Copy link

gabrielfpacheco commented Feb 19, 2025

We already have the ability to get the bounding box, but it's through a component. Documenting this would be a good step as well.

@azeey, isn't that only available to get the model bounding box, since the Physics plugin set it here?

I couldn’t find any source that actually sets a gz::components::AxisAligned for a link entity. Therefore, as I had to get the bounding box of the link for a system plugin I developed, I created #2787 and gazebosim/sdformat#1547 to provide such an API.

Please let me know if I'm missing something, I hope this could be helpful to others.

@iche033
Copy link
Contributor

iche033 commented Feb 19, 2025

I think the alternative approach would be to update the the physics system populate the bounding box component for links as well? I see the API available in gz-physics, GetLinkBoundingBox

@gabrielfpacheco
Copy link

gabrielfpacheco commented Feb 26, 2025

I think the alternative approach would be to update the the physics system populate the bounding box component for links as well

Yes, I think this would probably be more straightforward. If I understood it correctly, this feature should be available for all currently supported physics engines, right?

I initially thought not to update the physics plugin because I did not want to add extra load to a critical plugin if this was not an actual requirement. However, I believe we could do the same as for the model and only update the link entities containing the corresponding components.

Maybe I could update #2787 to add this feature to the physics system and update the link API so that it only computes from the SDF if an AxisAlignedBox component does not exist for the link entity. Or I could completely remove the calculation via SDF if you think it is more adequate.

Please, let me know what would be the best path forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted We accept pull requests!
Projects
Status: To do
Development

Successfully merging a pull request may close this issue.

4 participants