opencv2 and raspberry pi
Hellow,
I'm trying to install cv_bridge on my raspberry Pi using Ros Hydro. I installed OpenCV following this link and when I try to compile ROS I have the following :
WARNING: package "opencv_tests" should not depend on metapackage "ros" but on its packages instead
And
/home/pi/tobot_ws/ros_mobile_ws/src/cv_bridge/cv_bridge/src/cv_bridge.cpp: In function ‘std::map<std::pair<cv_bridge::Format, cv_bridge::Format>, std::vector<int> > cv_bridge::getConversionCodes()’:
/home/pi/tobot_ws/ros_mobile_ws/src/cv_bridge/cv_bridge/src/cv_bridge.cpp:133:44: error: ‘CV_GRAY2RGB’ was not declared in this scope
I installed OpenCV into /usr/lib/include and everything. I guess some files are not found and I'm wondering how can I link it correctly ?
EDIT :
I did a source install of opencv2 this way :
Need to source install like this :
- cd ros_mobile_ws/src
- rosinstall_generator opencv2 --deps | rosws merge -
- rosws update
- cd ..
- rosdep install --from-paths src --ignore-src --rosdistro hydro -y --os=debian:wheezy
- ./src/catkin/bin/catkin_make_isolated --install
This install went fine and everything compile but now when I want to compile this I have this error :
Linking CXX executable /home/pi/tobot_ws/catkin_ws2/devel/lib/openni2_camera/openni2_camera_node
/usr/bin/ld: warning: libopencv_videostab.so.3.0, needed by /home/pi/tobot_ws/ros_mobile_ws/install_isolated/lib/libcv_bridge.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libopencv_video.so.3.0, needed by /home/pi/tobot_ws/ros_mobile_ws/install_isolated/lib/libcv_bridge.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libopencv_superres.so.3.0, needed by /home/pi/tobot_ws/ros_mobile_ws/install_isolated/lib/libcv_bridge.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libopencv_stitching.so.3.0, needed by /home/pi/tobot_ws/ros_mobile_ws/install_isolated/lib/libcv_bridge.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libopencv_softcascade.so.3.0, needed by /home/pi/tobot_ws/ros_mobile_ws/install_isolated/lib/libcv_bridge.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libopencv_shape.so.3.0, needed by /home/pi/tobot_ws/ros_mobile_ws/install_isolated/lib/libcv_bridge.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libopencv_photo.so.3.0, needed by /home/pi/tobot_ws/ros_mobile_ws/install_isolated/lib/libcv_bridge.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libopencv_optim.so.3.0, needed by /home/pi/tobot_ws/ros_mobile_ws/install_isolated/lib/libcv_bridge.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libopencv_objdetect.so.3.0, needed by /home/pi/tobot_ws/ros_mobile_ws/install_isolated/lib/libcv_bridge.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libopencv_nonfree.so.3.0, needed by /home/pi/tobot_ws/ros_mobile_ws/install_isolated/lib/libcv_bridge.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libopencv_ml.so.3.0, needed by /home/pi/tobot_ws/ros_mobile_ws/install_isolated/lib/libcv_bridge.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libopencv_legacy.so.3.0, needed by /home/pi/tobot_ws/ros_mobile_ws/install_isolated/lib/libcv_bridge.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libopencv_imgproc.so.3.0, needed by ...