opencv2 indigo dependency [closed]
Hello,
I am using a ros package done by a former colleague who coded it with ubuntu 12.04 and ros hydro. Therefore, he included in manifest.xml <depend package="opencv2"/>
. I am running ubuntu 14.04 (LTS) and ROS indigo.
This question suggests to replace opencv2 with cv_bridge, but when I ran rosmake I got this error:
/opt/ros/indigo/share/linemod_ros/Linemod/LinemodWrap.cpp: In member function ‘void LinemodWrap::save(std::string)’:
/opt/ros/indigo/share/linemod_ros/Linemod/LinemodWrap.cpp:219:28: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
system(command.c_str());
^
/opt/ros/indigo/share/linemod_ros/Linemod/LinemodWrap.cpp: In member function ‘void LinemodWrap::save(std::string)’:
/opt/ros/indigo/share/linemod_ros/Linemod/LinemodWrap.cpp:219:28: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
system(command.c_str());
^
[100%] Building CXX object CMakeFiles/train_online.dir/Linemod/LinemodWrap.cpp.o
Linking CXX executable ../bin/detect_test_offline
Linking CXX executable ../bin/detect
Linking CXX executable ../bin/train_virtual
/opt/ros/indigo/share/linemod_ros/Linemod/LinemodWrap.cpp: In member function ‘void LinemodWrap::save(std::string)’:
/opt/ros/indigo/share/linemod_ros/Linemod/LinemodWrap.cpp:219:28: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
system(command.c_str());
^
make[3]: Leaving directory `/opt/ros/indigo/share/linemod_ros/build'
[100%] Built target detect_test_offline
CMakeFiles/train_virtual.dir/Linemod/VirtualModeller.cpp.o: In function `VirtualModeller::loadFile(std::string, boost::shared_ptr<pcl::PointCloud<pcl::PointXYZRGBA> >, cv::Mat*)':
/opt/ros/indigo/share/linemod_ros/Linemod/VirtualModeller.cpp:59: undefined reference to `cv::imread(cv::String const&, int)'
CMakeFiles/train_virtual.dir/Linemod/VirtualModeller.cpp.o: In function `~String':
/usr/local/include/opencv2/core/cvstd.hpp:667: undefined reference to `cv::String::deallocate()'
CMakeFiles/train_virtual.dir/Linemod/VirtualModeller.cpp.o: In function `String':
/usr/local/include/opencv2/core/cvstd.inl.hpp:81: undefined reference to `cv::String::allocate(unsigned long)'
CMakeFiles/train_virtual.dir/Linemod/VirtualModeller.cpp.o: In function `~String':
/usr/local/include/opencv2/core/cvstd.hpp:667: undefined reference to `cv::String::deallocate()'
collect2: error: ld returned 1 exit status
make[3]: *** [../bin/train_virtual] Error 1
make[3]: Leaving directory `/opt/ros/indigo/share/linemod_ros/build'
make[2]: *** [CMakeFiles/train_virtual.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
Linking CXX executable ../bin/train_online
make[3]: Leaving directory `/opt/ros/indigo/share/linemod_ros/build'
[100%] Built target detect
make[3]: Leaving directory `/opt/ros/indigo/share/linemod_ros/build'
[100%] Built target train_online
make[2]: Leaving directory `/opt/ros/indigo/share/linemod_ros/build'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/opt/ros/indigo/share/linemod_ros/build'
-------------------------------------------------------------------------------}
[ rosmake ] Output from build of package linemod_ros written to:
[ rosmake ] /home/ariel/.ros/rosmake/rosmake_output-20160315-153928/linemod_ros/build_output.log
[rosmake-6] Finished <<< linemod_ros [FAIL] [ 42.67 seconds ]
[ rosmake ] Halting due to failure in package linemod_ros.
[ rosmake ] Waiting for other threads to complete.
[ rosmake ] Results:
[ rosmake ] Cleaned 63 packages.
[ rosmake ] Built 63 packages with 1 failures.
[ rosmake ] Summary output to directory
This question also gives a suggestion ...
Can you post your files like manifest.xml? And you should probably look into using
catkin
, it's the recommended build system for IndigoI catkinized it keeping in mind all the dependencies and I have it running now. Answer closed.