Linking between two workspaces

asked 2020-08-07 05:56:04 -0600

TheBee gravatar image

updated 2020-08-09 01:28:20 -0600

Hey there!

To keep everything neat and clean I decided to have a dev_ws with my packages and a tools_ws containing all other packages (for example vision_opencv and perception_pcl).

Now I´m not sure why but whenever I try to include header files from packages in tools_ws in my own packages in dev_ws colcon is unable to find those headers. So if I try to add #include <pcl_conversions pcl_conversions.h=""> in my header file the error message will read

/home/test_ws/src/test_pkg/include/CameraAdapter.h:8:10: fatal error: pcl_conversions/pcl_conversions.h: No such file or directory
 #include <pcl_conversions/pcl_conversions.h>

I usually just add < depend>pcl_conversions< /depend> in my package.xml and find_package(pcl_conversions REQUIRED) in my CMakeList.txt

The tools_ws is sourced and ros2 is able to find launchfiles etc in there. I´m quite sure the answer is really simple but I didn´t manage to find anything in the Ros2 Documentation or via googling.

Do you have any idea what I´m missing here?

PS: Using these packages in python works fine (only tested it with cv_bridge though)

PPS: I know how to link between workspaces in Ros1 but because Ros2 doesn´t use catkin I´m unable to use certain lines in my CMakeList and i don´t know the proper substitutes

edit retag flag offensive close merge delete