Packaging pure cmake project

asked 2022-11-17 13:00:56 -0500

JeffH gravatar image

updated 2022-11-18 05:05:43 -0500

ljaniec gravatar image

[ROS2 distro: Humble]

I've seen related questions, but I don't think any of them are this same question.

I have some existing external projects, built using pure cmake. Now, I'm trying to port these projects into a ros2-workspace. What I did is simply add a package.xml file to each external project, then copy the projects into the ros2-workspace src as submodules. When I run colcon build, I can see the packages building; the executables and libraries all end up in the expected install locations.

However, when I run ros2 pkg list (after source install/setup.bash), I cannot see any of the packages that were created using pure cmake, I can only see those built using ament_cmake.

I have tried the solution suggested here: https://answers.ros.org/question/3418..., but that also didn't seem to work for me.

So my question is: What are the neccesary steps to create a pure cmake ros2 package in a way which is discoverable (i.e., I can find it when I run ros2 pkg list)?

Thanks!

edit retag flag offensive close merge delete