dji-sdk/Guidance-SDK-ROS

Problem in catkin_make the package

Opened this issue · 2 comments

/usr/bin/ld: warning: libpcre.so.1, needed by //home/li/anaconda2/lib/libgobject-2.0.so.0, not found (try using -rpath or -rpath-link) CMakeFiles/guidanceNodeCalibration.dir/src/GuidanceNodeCalibration.cpp.o: In function my_callback(int, int, char*)':
GuidanceNodeCalibration.cpp:(.text+0x9a7): undefined reference to cv::imshow(cv::String const&, cv::_InputArray const&)' GuidanceNodeCalibration.cpp:(.text+0xb9e): undefined reference to cv::imshow(cv::String const&, cv::InputArray const&)'
GuidanceNodeCalibration.cpp:(.text+0xddf): undefined reference to cv::imshow(cv::String const&, cv::_InputArray const&)' /opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFReadRGBAStrip@LIBTIFF_4.0'
/opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFReadDirectory@LIBTIFF_4.0' /opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFWriteEncodedStrip@LIBTIFF_4.0'
/opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFIsTiled@LIBTIFF_4.0' /opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFWriteScanline@LIBTIFF_4.0'
/opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFGetField@LIBTIFF_4.0' /opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFNumberOfStrips@LIBTIFF_4.0'
/opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFScanlineSize@LIBTIFF_4.0' /opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFReadEncodedTile@LIBTIFF_4.0'
/opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFReadRGBATile@LIBTIFF_4.0' /opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFClose@LIBTIFF_4.0'
/opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFClientOpen@LIBTIFF_4.0' /opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFRGBAImageOK@LIBTIFF_4.0'
/opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFOpen@LIBTIFF_4.0' /opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFReadEncodedStrip@LIBTIFF_4.0'
/opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFSetField@LIBTIFF_4.0' /opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFSetWarningHandler@LIBTIFF_4.0'
/opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFSetErrorHandler@LIBTIFF_4.0' collect2: error: ld returned 1 exit status Guidance-SDK-ROS-master/CMakeFiles/guidanceNodeCalibration.dir/build.make:146: recipe for target '/home/li/catkin_ws/devel/lib/guidance/guidanceNodeCalibration' failed make[2]: *** [/home/li/catkin_ws/devel/lib/guidance/guidanceNodeCalibration] Error 1 CMakeFiles/Makefile2:357: recipe for target 'Guidance-SDK-ROS-master/CMakeFiles/guidanceNodeCalibration.dir/all' failed make[1]: *** [Guidance-SDK-ROS-master/CMakeFiles/guidanceNodeCalibration.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... /usr/bin/ld: warning: libpcre.so.1, needed by //home/li/anaconda2/lib/libgobject-2.0.so.0, not found (try using -rpath or -rpath-link) CMakeFiles/guidanceNode.dir/src/GuidanceNode.cpp.o: In function my_callback(int, int, char*)':
GuidanceNode.cpp:(.text+0x1ce): undefined reference to cv::imshow(cv::String const&, cv::_InputArray const&)' GuidanceNode.cpp:(.text+0x382): undefined reference to cv::imshow(cv::String const&, cv::InputArray const&)'
GuidanceNode.cpp:(.text+0x580): undefined reference to cv::imshow(cv::String const&, cv::_InputArray const&)' /opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFReadRGBAStrip@LIBTIFF_4.0'
/opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFReadDirectory@LIBTIFF_4.0' /opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFWriteEncodedStrip@LIBTIFF_4.0'
/opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFIsTiled@LIBTIFF_4.0' /opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFWriteScanline@LIBTIFF_4.0'
/opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFGetField@LIBTIFF_4.0' /opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFNumberOfStrips@LIBTIFF_4.0'
/opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFScanlineSize@LIBTIFF_4.0' /opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFReadEncodedTile@LIBTIFF_4.0'
/opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFReadRGBATile@LIBTIFF_4.0' /opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFClose@LIBTIFF_4.0'
/opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFClientOpen@LIBTIFF_4.0' /opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFRGBAImageOK@LIBTIFF_4.0'
/opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFOpen@LIBTIFF_4.0' /opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFReadEncodedStrip@LIBTIFF_4.0'
/opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFSetField@LIBTIFF_4.0' /opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFSetWarningHandler@LIBTIFF_4.0'
/opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFSetErrorHandler@LIBTIFF_4.0' collect2: error: ld returned 1 exit status Guidance-SDK-ROS-master/CMakeFiles/guidanceNode.dir/build.make:146: recipe for target '/home/li/catkin_ws/devel/lib/guidance/guidanceNode' failed make[2]: *** [/home/li/catkin_ws/devel/lib/guidance/guidanceNode] Error 1 CMakeFiles/Makefile2:394: recipe for target 'Guidance-SDK-ROS-master/CMakeFiles/guidanceNode.dir/all' failed make[1]: *** [Guidance-SDK-ROS-master/CMakeFiles/guidanceNode.dir/all] Error 2 /usr/bin/ld: warning: libpcre.so.1, needed by //home/li/anaconda2/lib/libgobject-2.0.so.0, not found (try using -rpath or -rpath-link) CMakeFiles/guidanceNodeTest.dir/src/GuidanceNodeTest.cpp.o: In function left_image_callback(boost::shared_ptr<sensor_msgs::Image
<std::allocator > const> const&)':
GuidanceNodeTest.cpp:(.text+0xa9): undefined reference to cv::imshow(cv::String const&, cv::_InputArray const&)' CMakeFiles/guidanceNodeTest.dir/src/GuidanceNodeTest.cpp.o: In function right_image_callback(boost::shared_ptr<sensor_msgs::Image
<std::allocator > const> const&)':
GuidanceNodeTest.cpp:(.text+0x37a): undefined reference to cv::imshow(cv::String const&, cv::_InputArray const&)' CMakeFiles/guidanceNodeTest.dir/src/GuidanceNodeTest.cpp.o: In function depth_image_callback(boost::shared_ptr<sensor_msgs::Image_<std::allocator > const> const&)':
GuidanceNodeTest.cpp:(.text+0x6d0): undefined reference to cv::imshow(cv::String const&, cv::_InputArray const&)' /opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFReadRGBAStrip@LIBTIFF_4.0'
/opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFReadDirectory@LIBTIFF_4.0' /opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFWriteEncodedStrip@LIBTIFF_4.0'
/opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFIsTiled@LIBTIFF_4.0' /opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFWriteScanline@LIBTIFF_4.0'
/opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFGetField@LIBTIFF_4.0' /opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFNumberOfStrips@LIBTIFF_4.0'
/opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFScanlineSize@LIBTIFF_4.0' /opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFReadEncodedTile@LIBTIFF_4.0'
/opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFReadRGBATile@LIBTIFF_4.0' /opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFClose@LIBTIFF_4.0'
/opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFClientOpen@LIBTIFF_4.0' /opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFRGBAImageOK@LIBTIFF_4.0'
/opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFOpen@LIBTIFF_4.0' /opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFReadEncodedStrip@LIBTIFF_4.0'
/opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFSetField@LIBTIFF_4.0' /opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFSetWarningHandler@LIBTIFF_4.0'
/opt/ros/lunar/lib/libopencv_imgcodecs3.so.3.3.1: undefined reference to TIFFSetErrorHandler@LIBTIFF_4.0' collect2: error: ld returned 1 exit status Guidance-SDK-ROS-master/CMakeFiles/guidanceNodeTest.dir/build.make:120: recipe for target '/home/li/catkin_ws/devel/lib/guidance/guidanceNodeTest' failed make[2]: *** [/home/li/catkin_ws/devel/lib/guidance/guidanceNodeTest] Error 1 CMakeFiles/Makefile2:655: recipe for target 'Guidance-SDK-ROS-master/CMakeFiles/guidanceNodeTest.dir/all' failed make[1]: *** [Guidance-SDK-ROS-master/CMakeFiles/guidanceNodeTest.dir/all] Error 2 Makefile:138: recipe for target 'all' failed make: *** [all] Error 2 Invoking "make -j4 -l4" failed
Then when I try to rosrun guidance guidanceNode,
[rosrun] Couldn't find executable named GuidanceNode below /home/li/catkin_ws/src/Guidance-SDK-ROS-master
What would go wrong? Please help me. I will offer more information if needed.

Did you solve the problem?

I think you should check the version of opencv, the version of opencv in the Guidance- SDK-ROS/CMakeList.txt is Opencv 2, you should change the version which you intsall on your computer.