0
$\begingroup$

Rosanswers logo

Dear Ros Users, following the tutorial described at http://wiki.ros.org/cv_bridge/Tutorials/UsingCvBridgeToConvertBetweenROSImagesAndOpenCVImages I'm experimenting problem on compiling:

In function ImageConverter::ImageConverter()': converter_demo.cpp:(.text._ZN14ImageConverterC2Ev[_ZN14ImageConverterC5Ev]+0x62): undefined reference to image_transport::ImageTransport::ImageTransport(ros::NodeHandle const&)'

In the package.xml file, I declared the followind dependencies:

buildtool_depend: catkin, roscpp, rospy, std_msgs, image_transport, cv_bridge

run_depend: roscpp, rospy, std_msgs, image_transport, cv_bridge

Thank you!


Originally posted by Rahndall on ROS Answers with karma: 133 on 2014-10-29

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

buildtool_depend must only be catkin. The others mentioned there have to be build_depend

E.g.:

  <buildtool_depend>catkin</buildtool_depend>

  <build_depend>roscpp</build_depend>
  <build_depend>rospy</build_depend>
  <build_depend>std_msgs</build_depend>
  <build_depend>image_transport</build_depend>
  <build_depend>cv_bridge</build_depend>
  
  <run_depend>roscpp</run_depend>
  <run_depend>rospy</run_depend>
  <run_depend>std_msgs</run_depend>
  <run_depend>image_transport</run_depend>
  <run_depend>cv_pridge</run_depend>

Further, you have to find_package them in your CMakeLists.txt (in case you not yet have):

find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs image_transport cv_bridge)

Originally posted by Wolf with karma: 7555 on 2014-10-29

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Rahndall on 2014-10-29:
I "missed" the find package :) Now it works, thank you!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.