Ask Your Question
1

Issues with packages recognizing external header files

asked 2013-07-09 05:28:25 -0500

mwd gravatar image

So I am currently trying to get a given catkin package(description) to recognize header files stored in another catkin package(cat_ball). However, when I attempt to run catkin_make I get this error

fatal error: simulation/ControllerSimulator.h: No such file or directory
compilation terminated.

(Note: simulation/ControllerSimulator.h does exist in cat_ball/include)

Below is the CMakeLists.txt file and yes I have made sure that description is both run_dependent and build_dependent on cat_ball in the package.xml and that cat_ball is also a catkin package.

   cmake_minimum_required(VERSION 2.8.3)
project(description)

find_package(catkin REQUIRED COMPONENTS roscpp gazebo_ros cat_ball)

# Find gazebo
include (FindPkgConfig)
if (PKG_CONFIG_FOUND)
  pkg_check_modules(GAZEBO gazebo)
endif()

link_directories(${GAZEBO_LIBRARY_DIRS})
include_directories(include ${Boost_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS} ${GAZEBO_INCLUDE_DIRS})

add_library(${PROJECT_NAME} src/plugin.cpp)
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES})

catkin_package(DEPENDS roscpp gazebo_ros CATKIN_DEPENDS cat_ball)

If anyone could help me with this problem I would be very grateful, thanks.

edit retag flag offensive close merge delete

Comments

Please post additional information. Especially the CMakeLists.txt of the "cat_ball" package. I guess you have both packages in a single workspace and invoked catkin_make for it?

Dirk Thomas gravatar image Dirk Thomas  ( 2013-07-09 06:28:24 -0500 )edit

Sorry about that, I'll remember it in the future.

mwd gravatar image mwd  ( 2013-07-09 06:49:12 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-07-09 06:36:47 -0500

tbh gravatar image

find_package() should add all the INCLUDE_DIRS from the specified packages into the INCLUDE_DIRS of the current package. So I'd suspect that cat_ball isn't properly exporting its include folder. You should check the cat_ball/CMakeLists.txt and make sure it has a line like this:

catkin_package(INCLUDE_DIRS include)
edit flag offensive delete link more

Comments

That was the correct fix, thanks.

mwd gravatar image mwd  ( 2013-07-09 06:49:35 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-07-09 05:28:25 -0500

Seen: 857 times

Last updated: Jul 09 '13