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

2019-09-16 15:27发布

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.

2条回答
Evening l夕情丶
2楼-- · 2019-09-16 15:51

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.

查看更多
小情绪 Triste *
3楼-- · 2019-09-16 16:07

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.

查看更多
登录 后发表回答