错误:程序中使用了不同版本的opencv,要统一使用相同版本,指定某一版本的opencv
OpenCV Error: Assertion failed (tlsSlots.size() > slotIdx) in releaseSlot, file /build/opencv-L2vuMj/opencv-3.2.0+dfsg/modules/core/src/system.cpp, line 1092 terminate called after throwing an instance of ‘cv::Exception‘ what(): /build/opencv-L2vuMj/opencv-3.2.0+dfsg/modules/core/src/system.cpp:1092: error: (-215) tlsSlots.size() > slotIdx in function releaseSlot
警告:warning: libopencv_core.so.3.4, needed by /usr/local/lib/libopencv_imgcodecs.so.3.4.10, may conflict with libopencv_core.so.3.2
ros自带的opencv版本是3.2.0的,我自己装的是3.4.10的,
首先打开终端,进入cv_bridge配置文件所在目录,用gedit打开配置文件
cd /opt/ros/melodic/share/cv_bridge/cmake
sudo gedit cv_bridgeConfig.cmake
在92行附近进行修改,将本来的注释掉
第122行附近进行修改,选中的是修改后的
主要参考博客:https://blog.csdn.net/bigdog_1027/article/details/79092263