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

catkin_EXPORTED_TARGETS problem

asked 2015-03-17 18:28:47 -0500

brice rebsamen gravatar image

updated 2015-03-17 21:03:31 -0500

I have a package that depends on a message package called stdr_msgs. (stdr_msgs contains only messages). Here is the begining of the corresponding CMakeLists.txt:

cmake_minimum_required(VERSION 2.8.3)
project(log_and_playback)

find_package(catkin REQUIRED COMPONENTS
  roscpp rosbag_storage urdf kdl_parser tf2_ros tf2_kdl
  stdr_msgs stdr_lib blf localize stdr_velodyne ladybug_playback
)

catkin_package(
  INCLUDE_DIRS include
  LIBRARIES ${PROJECT_NAME}
  CATKIN_DEPENDS roscpp rosbag_storage urdf kdl_parser tf2_ros tf2_kdl
    stdr_msgs stdr_lib blf localize stdr_velodyne ladybug_playback
)

include_directories(include ${catkin_INCLUDE_DIRS})

add_library(${PROJECT_NAME}
  src/bag_reader.cpp
  [...]
)
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES})
add_dependencies(${PROJECT_NAME} ${catkin_EXPORTED_TARGETS})

Note that find_package searches for stdr_msgs and that the library depends on catkin_EXPORTED_TARGETS. This follows the guidelines in http://docs.ros.org/indigo/api/catkin...

However, from time to time, the build fails because a header file from one of the messages in stdr_msgs is not found. It fails while compiling one of the cpp files from the library in this package.

Am I missing something?

EDIT: I printed the catkin_EXPORTED_TARGETS. It contained the stdr_msgs message generation targets. The list is long, it has 3842 elements from the following packages: actionlib, actionlib_msgs, bond, diagnostic_msgs, driver_base, dynamic_reconfigure, geometry_msgs, nav_msgs, nodelet, pcl_msgs, roscpp, rosgraph_msgs, sensor_msgs, std_msgs, stdr_msgs, tf2_msgs, tf, topic_tools, velodyne_msgs

edit retag flag offensive close merge delete

Comments

Did you print out the contents of catkin_EXPORTED_TARGETS? Was the target for stdr_msgs in there?

William gravatar image William  ( 2015-03-17 19:49:46 -0500 )edit

yes, the 3 message generation targets (lisp, py, cpp) for stdr_msgs were there

brice rebsamen gravatar image brice rebsamen  ( 2015-03-17 20:54:45 -0500 )edit

Hmm, not sure, that looks like it should work to me. Are you using catkin_make?

William gravatar image William  ( 2015-03-17 21:12:37 -0500 )edit

I'm using catkin_make. Well, I'll keep digging and eventually report here. Not easy to troubleshoot thought because it does not happen all the time and the testing cycle is long (lots of packages to recompile)

brice rebsamen gravatar image brice rebsamen  ( 2015-03-18 12:49:03 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-06-24 11:35:45 -0500

brice rebsamen gravatar image

problem was from an upstream package

edit flag offensive delete link more

Question Tools

3 followers

Stats

Asked: 2015-03-17 18:28:47 -0500

Seen: 1,105 times

Last updated: Jun 24 '15