0
点赞
收藏
分享

微信扫一扫

ROS编译时报错Project ‘cv_bridge‘ specifies ‘/usr/include/opencv‘ as an include dir, which is not found.

使用catkin_make编译ROS代码时报错如下:

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.

解决办法:在根目录下搜索OPENCV的安装路径
ROS编译时报错Project ‘cv_bridge‘ specifies ‘/usr/include/opencv‘ as an include dir, which is not found._opencv
我的路径如下:在​​​/usr/include/opencv4/opencv2​​​路径下
ROS编译时报错Project ‘cv_bridge‘ specifies ‘/usr/include/opencv‘ as an include dir, which is not found._深度学习_02

然后打开报错中提示的文件​​/opt/ros/melodic/share/cv_bridge/cmake/cv_bridgeConfig.cmake​​​,在其中搜索​​/usr/include/opencv​​​,并用自己的路径​​/usr/include/opencv4/opencv2​​替换,如下:

ROS编译时报错Project ‘cv_bridge‘ specifies ‘/usr/include/opencv‘ as an include dir, which is not found._自动驾驶_03
然后重新编译即可


举报

相关推荐

0 条评论