how to include library header files
Hi
I am new to colcon and ros in general, so please forgive my newby question. I completed the all the beginner ROS2 tutorials and all went well.
Now I am trying to compile some third party code into a library (feetech_driver) to use in another ROS package (ft_joint). I have been able to compile the library and the output files are copied to
ros_ws/install/feetech_driver
|-include
|-lib
|-share
All the header files are in the ros_ws/install/feetech_driver/include/feetech_driver directory
My other ROS package (ft_joint) that is trying to use this library package cannot find the required header file, I am including it like so,
#include "feetech_driver/SCSCL.h"
As part of my ft_joint package I also include files from the tutorial_interfaces tutorial and I can include those without error, like so,
#include "tutorial_interfaces/msg/num.hpp"
My CMakeList.txt has a find_package for both packages, like so
find_package(tutorial_interfaces REQUIRED)
find_package(feetech_driver REQUIRED)
The error that I get when I run
colcon build --packages-select ft_joint
is
/home/stewart/ros/dev_ws/src/ft_joint/src/joint_node.cpp:6:10: fatal error: feetech_driver/SCSCL.h: No such file or directory
6 | #include "feetech_driver/SCSCL.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~
Any suggestions would be greatly appreciated.
Thanks Stew