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

Problem even catkin_make'ing my ROS Images to OpenCV node -- Library issues?

asked 2016-12-16 13:11:30 -0500

ateator1 gravatar image

I am trying to create a node that will help me take an ROS Image and convert it to an OpenCV image. I am following the "Converting between ROS images and OpenCV images" tutorial. At step 9, I have created a cakin package with the required dependencies. When I paste the code given in the tutorial, and catkin_make, I get a ton of errors of style "... undefined reference to..." (this is a truncated example of my errors)

td::char_traits<char>, std::allocator<char> > const&, unsigned int, bool)'
image_converter.cpp:(.text._ZN14ImageConverterC2Ev[_ZN14ImageConverterC5Ev]+0x799): undefined reference to `cv::namedWindow(cv::String const&, int)'
image_converter.cpp:(.text._ZN14ImageConverterC2Ev[_ZN14ImageConverterC5Ev]+0x7a1): undefined reference to `cv::String::deallocate()'
image_converter.cpp:(.text._ZN14ImageConverterC2Ev[_ZN14ImageConverterC5Ev]+0x7e6): undefined reference to `ros::NodeHandle::getParam(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const'
image_converter.cpp:(.text._ZN14ImageConverterC2Ev[_ZN14ImageConverterC5Ev]+0x841): undefined reference to `cv::String::allocate(unsigned long)'
image_converter.cpp:(.text._ZN14ImageConverterC2Ev[_ZN14ImageConverterC5Ev]+0xab3): undefined reference to `ros::NodeHandle::~NodeHandle()'
image_converter.cpp:(.text._ZN14ImageConverterC2Ev[_ZN14ImageConverterC5Ev]+0xb48): undefined reference to `image_transport::ImageTransport::~ImageTransport()'
image_converter.cpp:(.text._ZN14ImageConverterC2Ev[_ZN14ImageConverterC5Ev]+0xb50): undefined reference to `ros::NodeHandle::~NodeHandle()'
image_converter.cpp:(.text._ZN14ImageConverterC2Ev[_ZN14ImageConverterC5Ev]+0xb68): undefined reference to `ros::NodeHandle::~NodeHandle()'
image_converter.cpp:(.text._ZN14ImageConverterC2Ev[_ZN14ImageConverterC5Ev]+0xc78): undefined reference to `cv::String::deallocate()'
CMakeFiles/adam_face_detect_node.dir/src/image_converter.cpp.o: In function `main':

but I have checked and all of those included libraries exist in /usr/include, as well as other locations. What is the problem?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-01-22 01:57:12 -0500

tfoote gravatar image

Assuming you have the libraries installed, which I think is likely you need to make sure to link your node against all those libraries in you CMakeLists.txt

If you edit your question to include your CMakeLIsts.txt we might be able to help you more.

edit flag offensive delete link more

Comments

This was a downloaded package that I had working before without any changes. Maybe I downloaded the wrong version. Checking now..

ateator1 gravatar image ateator1  ( 2017-02-02 16:55:54 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2016-12-16 13:11:30 -0500

Seen: 204 times

Last updated: Jan 22 '17