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

Use package format 3 with conditional dependency on catkin. #536

Merged

Conversation

nuclearsandwich
Copy link
Contributor

@nuclearsandwich nuclearsandwich commented May 20, 2021

I'd like to release fcl into ROS 2, starting with ROS 2 Rolling.

catkin isn't used or available in ROS 2. The recommended dependency on catkin for non-ROS packages released on the build farm is covered by the universally injected dependency on the ros_workspace package.


This change is Reviewable

catkin isn't used or available in ROS 2. The recommended dependency on catkin
for non-ROS packages released on the build farm is covered by the universally
injected dependency on the ros_workspace package.
nuclearsandwich added a commit to ros2-gbp/fcl-release that referenced this pull request May 20, 2021
I've also proposed this change upstream in
flexible-collision-library/fcl#536 if that
merges then we can drop this overlay.
Copy link
Member

@sherm1 sherm1 left a comment

Choose a reason for hiding this comment

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

Can you review this, @jamiesnape ?

Reviewable status: 0 of 1 files reviewed, all discussions resolved

@jamiesnape jamiesnape self-assigned this May 20, 2021
Copy link
Contributor

@jamiesnape jamiesnape left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 1 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @nuclearsandwich)

@wxmerkt
Copy link
Contributor

wxmerkt commented May 20, 2021

@nuclearsandwich For octomap, there was a community request to add an additional entry to add the library to the ament_index. We also added a conditional dependency on ament_cmake, yet, it wasn't clear if that was strictly necessary. This is what we ended up with:
https://github.com/OctoMap/octomap/blob/bdb1c3757e370db93457d710772ab85e8bd44dd4/octomap/package.xml#L16-L23
and
https://github.com/OctoMap/octomap/blob/bdb1c3757e370db93457d710772ab85e8bd44dd4/octomap/CMakeLists.txt#L72-L77
Does it make sense to add this correspondingly for FCL as part of this PR or was it completed incorrectly in Octomap? Any insights highly appreciated :-).

@sherm1 sherm1 merged commit 809dc40 into flexible-collision-library:master May 20, 2021
@sherm1
Copy link
Member

sherm1 commented May 20, 2021

Thanks for this PR! Can you move the octomap discussion to another PR or issue?

@wxmerkt
Copy link
Contributor

wxmerkt commented May 20, 2021

Apologies for being unclear - my question was whether extending on this PR similar to how it's been accomplished for Octomap in the two snippets linked above is desired/required to amend (1) the package.xml touched in this PR to include a conditional dependency on ament_cmake [which based on the original post may be redundant] and (2) to add a registration to the ament_index in the CMakeLists [which may be better as a release patch]. Downstream projects have requested these in the past. If @nuclearsandwich can confirm whether this is necessary (or not), I am happy to make a PR

@nuclearsandwich
Copy link
Contributor Author

(2) to add a registration to the ament_index in the CMakeLists

Registering fcl in the ament resource index would move it closer to the behavior of "native" ROS 2 packages which simplifies usage for ROS 2 consumers of fcl. However this has also re-sparked a discussion of which packages MUST be registered in an ament index versus which packages MAY be registered. At best registering in the ament index is an expedient and may not ultimately be the recommended path for non-ROS packages however I do not yet have any guidance on an alternative recommended path.

If you're willing to contribute a change similar to https://github.com/OctoMap/octomap/blob/bdb1c3757e370db93457d710772ab85e8bd44dd4/octomap/CMakeLists.txt#L75-L77 that seems like a good "little copying". It would be up to the fcl maintainers to accept it or not.

nuclearsandwich added a commit to nuclearsandwich/octomap that referenced this pull request May 20, 2021
REP-136 recommends that third-party (non-ROS) packages add a runtime
dependency on catkin so that the setup scripts provided by the catkin
package which set up a ROS environment are installed along with that
package. In ROS 2, those scripts are provided by the ros_workspace
package and bloom transparently injects a dependency on ros_workspace
into every released package.

It would be possible to use ament_cmake (or more likely the individual
ament_cmake_core package to optionally provide the package.xml and
ament resource index registration but since what you have is working
fine I think just removing the unecessary dependency is a good next
step. As mentioned in
flexible-collision-library/fcl#536 (comment)
we haven't produced a definitive recommendation for third party packages
in ROS 2 but I've added it to a meeting agenda and we'll document the
conclusions of that discussion and share them as well.
@jamiesnape jamiesnape removed their assignment Jun 22, 2021
@nuclearsandwich nuclearsandwich deleted the ros2-package-xml branch July 1, 2021 20:56
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