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

Revision history [back]

click to hide/show revision 1
initial version
...
find_package(catkin REQUIRED COMPONENTS sensor_msgs)
...
find_package(catkin REQUIRED COMPONENTS roscpp)
find_package(catkin REQUIRED COMPONENTS tf)
...

I'm not sure this is actually the cause of your issue, but afaik multiple calls to find_package(catkin ..) will either not work (ie: the later calls won't actually do anything, as the result for catkin has already been cached), or will overwrite results of earlier invocations. Just list all your catkin dependencies after COMPONENTS in the first find_package(catkin ..).

catkin_package(DEPENDS system_lib)

Unless you have a specific reason for not doing it, this should also list all the catkin pkgs you depend on. So CATKIN_DEPENDS sensor_msgs roscpp tf.

include_directories(${catkin_INCLUDE_DIRS} src/sbg_ins/)

Minor, but it is convention to list the include dir of the current package before any other includes. That would work around identically named headers existing in other packages getting resolved before your own.

...
find_package(catkin REQUIRED COMPONENTS sensor_msgs)
...
find_package(catkin REQUIRED COMPONENTS roscpp)
find_package(catkin REQUIRED COMPONENTS tf)
...

I'm This is most likely not sure this is actually really the cause of your issue, but afaik multiple calls to find_package(catkin ..) will either not work (ie: the later calls won't actually do anything, as the result for catkin has already been cached), or will overwrite results of earlier invocations. Just list all your catkin dependencies after COMPONENTS in the first find_package(catkin ..).

catkin_package(DEPENDS system_lib)

Unless you have a specific reason for not doing it, this should also list all the catkin pkgs you depend on. So CATKIN_DEPENDS sensor_msgs roscpp tf.

include_directories(${catkin_INCLUDE_DIRS} src/sbg_ins/)

Minor, but it is convention to list the include dir of the current package before any other includes. That would work around identically named headers existing in other packages getting resolved before your own.