I am migrating a node from Fuerte to Hydro that uses the message_filters ApproximateTime sync policy. The code being used for this is functionally identical to the example on the message_filters wiki page, and worked great in Fuerte. But now when I try to build, I get the following linker errors:
CMakeFiles/vo_rgbd_node.dir/src/ros_server.cpp.o: In function `message_filters::Synchronizer >, sensor_msgs::Image_ >, sensor_msgs::CameraInfo_ >, message_filters::NullType, message_filters::NullType, message_filters::NullType, message_filters::NullType, message_filters::NullType, message_filters::NullType> >::disconnectAll()': ros_server.cpp:(.text._ZN15message_filters12SynchronizerINS_13sync_policies15ApproximateTimeIN11sensor_msgs6Image_ISaIvEEES6_NS3_11CameraInfo_IS5_EENS_8NullTypeES9_S9_S9_S9_S9_EEE13disconnectAllEv[message_filters::Synchronizer >, sensor_msgs::Image_ >, sensor_msgs::CameraInfo_ >, message_filters::NullType, message_filters::NullType, message_filters::NullType, message_filters::NullType, message_filters::NullType, message_filters::NullType> >::disconnectAll()]+0x41): undefined reference to `message_filters::Connection::disconnect()' CMakeFiles/vo_rgbd_node.dir/src/ros_server.cpp.o: In function `message_filters::Connection message_filters::SimpleFilter > >::registerCallback > const> const&>(boost::function > const> const&)> const&)': ros_server.cpp:(.text._ZN15message_filters12SimpleFilterIN11sensor_msgs6Image_ISaIvEEEE16registerCallbackIRKN3ros12MessageEventIKS4_EEEENS_10ConnectionERKN5boost8functionIFvT_EEE[message_filters::Connection message_filters::SimpleFilter > >::registerCallback > const> const&>(boost::function > const> const&)> const&)]+0x9a): undefined reference to `message_filters::Connection::Connection(boost::function const&)' CMakeFiles/vo_rgbd_node.dir/src/ros_server.cpp.o: In function `message_filters::Connection message_filters::SimpleFilter > >::registerCallback > const> const&>(boost::function > const> const&)> const&)': ros_server.cpp:(.text._ZN15message_filters12SimpleFilterIN11sensor_msgs11CameraInfo_ISaIvEEEE16registerCallbackIRKN3ros12MessageEventIKS4_EEEENS_10ConnectionERKN5boost8functionIFvT_EEE[message_filters::Connection message_filters::SimpleFilter > >::registerCallback > const> const&>(boost::function > const> const&)> const&)]+0x9a): undefined reference to `message_filters::Connection::Connection(boost::function const&)' collect2: ld returned 1 exit status
The contents of my CMakeLists.txt are as follows:
cmake_minimum_required(VERSION 2.8.3) project(vo_rgbd) find_package(catkin REQUIRED COMPONENTS cv_bridge geometry_msgs relative_nav_msgs roscpp sensor_msgs ) find_package(Boost REQUIRED) find_package(Eigen REQUIRED) find_package(OpenCV REQUIRED) catkin_package() include_directories( include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${Eigne_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS} ) add_executable(vo_rgbd_node src/vo_rgbd_node.cpp src/ros_server.cpp src/pose_estimator.cpp) add_dependencies(vo_rgbd_node relative_nav_msgs_generate_messages_cpp) target_link_libraries(vo_rgbd_node ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${Eigen_LIBRARIES} ${OpenCV_LIBRARIES} )
Am I possibly missing something in my CMakeLists.txt that could be causing these errors, or might there be a different cause?
Thanks
Originally posted by dpkoch on ROS Answers with karma: 132 on 2013-12-05
Post score: 1