ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

stewart menday's profile - activity

2023-04-19 09:23:02 -0500 marked best answer 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

2022-03-18 07:43:01 -0500 received badge  Popular Question (source)
2021-02-12 09:55:02 -0500 received badge  Famous Question (source)
2021-01-12 10:48:08 -0500 received badge  Famous Question (source)
2021-01-03 18:41:52 -0500 received badge  Famous Question (source)
2020-12-22 05:27:54 -0500 received badge  Notable Question (source)
2020-12-21 09:37:41 -0500 received badge  Student (source)
2020-12-21 09:36:07 -0500 received badge  Popular Question (source)
2020-12-21 00:59:43 -0500 asked a question How to update a ROS2 package

How to update a ROS2 package Hi I was following the ros2 doctor tutorial (https://index.ros.org/doc/ros2/Tutorials/Getti

2020-12-16 03:57:03 -0500 received badge  Notable Question (source)
2020-12-16 03:57:03 -0500 received badge  Popular Question (source)
2020-11-27 05:15:52 -0500 asked a question RQT_plot filter

RQT_plot filter Hi Is it possible to filter the data plotted in RQT_plot by another value on the topic? I have a topic t

2020-11-19 04:01:28 -0500 received badge  Enthusiast
2020-11-05 00:37:19 -0500 received badge  Notable Question (source)
2020-10-29 19:51:51 -0500 commented answer how to include library header files

Thank you for your answer. I have been able to get it to work as follows, In my CMakeList.txt file I originally had fin

2020-10-29 19:35:34 -0500 received badge  Popular Question (source)
2020-10-28 19:30:14 -0500 commented question How to create a ROS2 library

With the above your library file should end up in ros_ws/install/common_log/lib and your includes should end up in ros_w

2020-10-28 09:46:45 -0500 asked a question how to include library header files

how to include library header files Hi I am new to colcon and ros in general, so please forgive my newby question. I co

2020-10-28 09:46:44 -0500 answered a question colcon can not find my package

This error was caused by a cut and paste error in the package.xml file. I had copied some older source code and didn't u

2020-10-28 09:46:44 -0500 asked a question colcon can not find my package

colcon can not find my package I have been writing some ROS2 code in c++ using colcon on Ubuntu 20.04, all has been work

2020-10-27 22:50:01 -0500 received badge  Rapid Responder (source)
2020-10-27 22:27:30 -0500 received badge  Supporter (source)