Ubuntu18.04 ros-melodic opencv版本冲突问题解决
2022/3/27 7:23:17
本文主要是介绍Ubuntu18.04 ros-melodic opencv版本冲突问题解决,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
原链接:https://blog.csdn.net/Shushan1/article/details/116588614
问题描述
ros自带的opencv版本和自己安装的opencv版本冲突导致如下报错
解决办法
修改cv_bridge指定的opencv版本
sudo gedit /opt/ros/melodic/share/cv_bridge/cmake/cv_bridgeConfig.cmake
修改如下两个地方
#if(NOT "include;/usr/include;/usr/include/opencv " STREQUAL " ") if(NOT "include;/usr/local/include/opencv;/usr/local/include/opencv2 " STREQUAL " ") set(cv_bridge_INCLUDE_DIRS "") #set(_include_dirs "include;/usr/include;/usr/include/opencv") set(_include_dirs "include;/usr/local/lib;/usr/local/include/opencv;/usr/local/include/opencv2;/usr/local/include;/usr/include")
这里注意改成自己的版本
#set(libraries "cv_bridge;/usr/lib/x86_64-linux-gnu/libopencv_core.so.3.2.0;/usr/lib/x86_64-linux-gnu/libopencv_imgproc.so.3.2.0;/usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.3.2.0") set(libraries "cv_bridge;/usr/local/lib/libopencv_core.so.3.4.16;/usr/local/lib/libopencv_imgproc.so.3.4.16;/usr/local/lib/libopencv_imgcodecs.so.3.4.16")
然后重新catkin_make即可
这篇关于Ubuntu18.04 ros-melodic opencv版本冲突问题解决的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-14Fetch / Axios学习:入门教程与实战指南
- 2024-11-14Typescript 类型课程入门教程
- 2024-11-14Fetch / Axios课程:初学者必看的网络请求教程
- 2024-11-14Styled-components课程:初学者指南
- 2024-11-13pre-commit 自动化测试课程:入门教程与实践指南
- 2024-11-13什么是AIGC?如何使用AIGC技术辅助办公?
- 2024-11-13Slicm 框架怎么进行用户认证?-icode9专业技术文章分享
- 2024-11-13在查询时将 map_coord 列的值转换为字符串有哪些方法?-icode9专业技术文章分享
- 2024-11-13如何将微信地区改成自定义文案?-icode9专业技术文章分享
- 2024-11-13DNS 缓存存在问题有哪些症状和解决方法?-icode9专业技术文章分享