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

[ROS2] Porting bodies::Body::computeBoundingBox changes from noetic to ROS2 #239

Open
wants to merge 35 commits into
base: ros2
Choose a base branch
from

Conversation

spelletier1996
Copy link

This is the ROS2 port of the changes from #210

Needed to eventually port robot_body_filter to ROS2

We initially tried to git cherry-pick directly but ran into issues hence the extra commits.

Adds fcl to the build, the obb files, computeBoundingBox (obb version), mergeBoundingBoxesApprox, and related boundingbox tests

Copy link
Contributor

@peci1 peci1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR looks good to me in general.

It needs a few changes I left as review comments. Most importantly, getting rid of the code complications needed to support FCL 0.5 .

Note for maintainers: This PR contains the original #210 PR adding OBBs as well as all the later fixups required to make it work.

Also, this PR breaks ABI. I'm not sure if that is a problem or not. If it is a problem, we can implement the same temporary workarounds that were done in b00b1e5 .

@@ -240,6 +241,10 @@ class Body
pose. Scaling and padding are accounted for. */
virtual void computeBoundingBox(AABB& bbox) const = 0;

/** \brief Compute the oriented bounding box for the body, in its current
pose. Scaling and padding are accounted for. */
virtual void computeBoundingBox(OBB& bbox) const = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will break ABI (the virtual keyword). Not sure what is the current policy regarding ABI breakages.

include/geometric_shapes/obb.h Outdated Show resolved Hide resolved
include/geometric_shapes/body_operations.h Outdated Show resolved Hide resolved
package.xml Outdated Show resolved Hide resolved
src/aabb.cpp Show resolved Hide resolved
src/obb.cpp Outdated Show resolved Hide resolved
src/obb.cpp Outdated Show resolved Hide resolved
src/obb.cpp Outdated Show resolved Hide resolved
src/obb.cpp Outdated Show resolved Hide resolved
src/obb.cpp Outdated Show resolved Hide resolved
@spelletier1996
Copy link
Author

spelletier1996 commented May 3, 2024

I've removed to and from FCL and the related 0.5 checks

Copy link
Contributor

@peci1 peci1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes. I went through one more round of reviews and you'll find them again as code comments.

src/aabb.cpp Outdated Show resolved Hide resolved
src/obb.cpp Outdated Show resolved Hide resolved
CMakeLists.txt Outdated
@@ -66,6 +67,7 @@ set(THIS_PACKAGE_EXPORT_DEPENDS
resource_retriever
shape_msgs
visualization_msgs
fcl
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think fcl needs to be exported as a dependency. It is only used from .cpp files and not from the .h files. So it should only be build and export dependency, not build_export dependency.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im still newer to cmake, in that case would I just remove it from this export set and the rest can remain the same?

@@ -30,14 +30,16 @@

#include <geometric_shapes/aabb.h>

#include <fcl/config.h>
#include <fcl/geometry/shape/utility.h>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These includes now seem irrelevant.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With switching to the correct ifdef as you mentioned below I believe that #include <fcl/geometry/shape/utility.h>
is still required?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, some fcl include is still required. This seems good.

package.xml Show resolved Hide resolved
@peci1
Copy link
Contributor

peci1 commented May 26, 2024

@rhaschke @henningkayser Is support for Foxy and Galactic still required? If so, their underlying Ubuntu 20.04 still distributes FCL 0.5, which would mean this PR would need to retain all the FCL 0.5 checks.

@henningkayser
Copy link
Member

@rhaschke @henningkayser Is support for Foxy and Galactic still required? If so, their underlying Ubuntu 20.04 still distributes FCL 0.5, which would mean this PR would need to retain all the FCL 0.5 checks.

we just merged support for Jazzy and dropped Foxy and Galactic. Could you update this branch to rerun CI @spelletier1996?

@peci1
Copy link
Contributor

peci1 commented Nov 16, 2024

@spelletier1996 Please, do the one update of package.xml I asked. With that done, I hope this PR would be ready for merging.

@tmayoff
Copy link

tmayoff commented Nov 17, 2024

I'm not sure how available @spelletier1996 is to make changes, so I went ahead and modified the package.xml file to re-add the libfcl-dev

If the linked rosdistro PR for libfcl gets merged let me know and I can edit this again to remove the -dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants