-
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
Boundingbox on Link API #2353
Comments
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 Please let me know if I'm missing something, I hope this could be helpful to others. |
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 |
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 Please, let me know what would be the best path forward. |
I think getting the bounding box info from the physics system is preferred because it has the information already, and there is no need for a custom mesh bounding box calculator. In the rare case the the users does not load a physics system in Gazebo (or a particular physics engine does not support the bounding box feature), we could then fall back to using the SDF API. I think the first step is to implement a similar logic for populating a model AxisAlignedBox for links in the physics system. The expected usage here is that plugin writers would need to manually create the We can then update the Link class to add the If you're ok with this approach, could you do the changes in the physics system in a separate PR? Mainly just to make the review process easier. Thanks for the contributions so far! |
Yeah, I like the suggested approach. As soon as I have some free cycles, I will make the changes to the open PR and open a new one for the physics.
My pleasure :) |
* 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>
There is an alternative of Gazebo-classic's Link API Boundingbox function for ignition?
API reference page still shows a "TODO"
thanks!
The text was updated successfully, but these errors were encountered: