当前位置:   article > 正文

catkin_make:Project ‘cv_bridge‘ specifies ‘/usr/include/opencv‘ as an include dir, which is not fo_project 'cv_bridge' specifies '/usr/include/opencv

project 'cv_bridge' specifies '/usr/include/opencv' as an include dir, which

编译darknet_ros时遇到的问题

报错信息:

- Found OpenCV: /usr (found version "4.1.1") 
CMake Error at /opt/ros/melodic/share/cv_bridge/cmake/cv_bridgeConfig.cmake:113 (message):
  Project 'cv_bridge' specifies '/usr/include/opencv' as an include dir,
  which is not found.  It does neither exist as an absolute directory nor in
  '${{prefix}}//usr/include/opencv'.  Check the issue tracker
  'https://github.com/ros-perception/vision_opencv/issues' and consider
  creating a ticket if the problem has not been reported yet.
Call Stack (most recent call first):
  /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:76 (find_package)
  darknet_ros/darknet_ros/CMakeLists.txt:52 (find_package)


-- Configuring incomplete, errors occurred!
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13

错误原因:

opencv版本较高,编译程序寻找/usr/include/opencv,但本机并没有
cd /usr/include
ll opencv*
只能发现opencv4这个目录,因为本机安装的较高版本的opencv

解决办法:

cd /usr/include
#你的本机目录对应你的opencv版本,设置链接后解决,不必再改CMakeList
ln -s opencv4 opencv
  • 1
  • 2
  • 3
声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号