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
include_directories()

This is most likely your problem.

Even though you first do this:

find_package(catkin REQUIRED COMPONENTS roscpp)

You never update the include path with the contents of catkin_INCLUDE_DIRS, leading the compiler (or actually: the preprocessor) to not be able to find the headers.

You'll need to change that statement to at least something like the following:

include_directories(${catkin_INCLUDE_DIRS})

Note that this is not really a ROS issue, but a CMake one.

include_directories()

This is most likely your problem.

Even though you first do this:

find_package(catkin REQUIRED COMPONENTS roscpp)

You never update the include path with the contents of catkin_INCLUDE_DIRS, leading causing the compiler (or actually: the preprocessor) to not be able to find the headers.

You'll need to change that statement to at least something like the following:

include_directories(${catkin_INCLUDE_DIRS})

Note that this is not really a ROS issue, but a CMake one.