ros can't find OpenCV , the path /usr/local/

随声附和 提交于 2019-12-12 03:28:29

问题


I am working with ros and OpenCV. I installed OpenCV in the default path /usr/local, but when I build programs with catkin_make in my workstation, it shows Project cv_bridge specifies /usr/include/opencv as an include dir, which is not found.

Can you show me what can I do to solve the problem? Thank you.


回答1:


I recommend you use the opencv2_catkin package that automatically finds and links your package to OpenCV. As per the Readme, just add the following dependency to your own package:

<build_depend>opencv2_catkin</build_depend>

You would also need to download catkin_simple to use opencv2_catkin.




回答2:


I found you said you use catkin_make, so in new version of ROS, opencv and pcl are no longer integrate in ROS, so you need find you opencv yourself. For example, in your workspace, the CMakeLists.txt file, you should add something like find_package(OpenCV REQUIRED), and add include dir and libs to your project. If you also have problems, please paste your details of errors.



来源:https://stackoverflow.com/questions/36613363/ros-cant-find-opencv-the-path-usr-local

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!