当前位置: 首页 > news >正文

autoware.ai中检测模块lidar_detector caffe

lidar_apollo_cnn_seg_detect模块:该模块主要是调用百度apollo的目标分割。
1.需要安装caffe进行实现:
caffe安装步骤:

git clone https://github.com/BVLC/caffe
cd caffe && mdkir build && cd build
cmake ..

出现报错:

CMake Error at cmake/Cuda.cmake:227 (message):   cuDNN version >3 is required.

修改方法:

in Openpose change the cmake/cuda.cmake file and the /cmake/modules/FindCuDNN.cmake file.
Find the line that reads:
file(READ {CUDNN_INCLUDE}/cudnn.h CUDNN_VERSION_FILE_CONTENTS) change to: file(READ {CUDNN_INCLUDE}/cudnn_version.h CUDNN_VERSION_FILE_CONTENTS)

出现报错:

Could NOT find Atlas (missing: Atlas_CLAPACK_INCLUDE_DIRAtlas_CBLAS_LIBRARY Atlas_BLAS_LIBRARY)
Call Stack (most recent call first):/usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)cmake/Modules/FindAtlas.cmake:43 (find_package_handle_standard_args)cmake/Dependencies.cmake:121 (find_package)CMakeLists.txt:49 (include)

解决方法:

sudo apt-get install libatlas-base-dev

出现报错:

Please set them or make sure they are set and tested correctly in the CMake files:
CUDA_cublas_device_LIBRARY (ADVANCED)linked by target "caffe" in directory

解决方法:出现该问题是因为cmake版本不匹配:
cuda10 可以用cmake-3.14.3
cuda10.2 可以用cmake-3.17
我安装的是cuda 11.6,对应的cmake版本为cmake3.18.1,最新版本3.27.4不可用
由于安装ros后存在cmake,如果进行删除将会导致大量ros依赖被卸载,因此并未进行卸载,执行步骤为:

wget https://cmake.org/files/v3.18/cmake-3.18.1-Linux-x86_64.tar.gz
tar zxvf cmake-3.18.1-Linux-x86_64.tar.gz
mv cmake-3.18.1-Linux-x86_64 /opt/cmake-3.18.1
ln -sf /opt/cmake-3.18.1/bin/*  /usr/bin/
cmake --version  # 应该显示3.18.1

caffe 需要用make进行安装:
关于hdf5的问题:
Makefile中

LIBRARIES +=  hdf5_hl hdf5

改为

LIBRARIES += hdf5_serial_hl hdf5_serial

将Makefile.config中的路径:

INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include 
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib

改为

INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial/
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib

执行make报错:编译Caffe时遇到的错误:leveldb/db.h文件找不到

sudo apt-get update
sudo apt-get install libleveldb-dev

寻找Makefile文件

LIBRARIES += leveldb
make clean
make

/usr/bin/ld: cannot find -lleveldb
/usr/bin/ld: cannot find -lsnappy
/usr/bin/ld: cannot find -lcblas
/usr/bin/ld: cannot find -latlas

sudo apt-get install libsnappy-devsudo apt-get install libatlas-base-dev

注:如果不清楚自己opencv版本型号,输入下面命令产看版本

pkg-config opencv --modversion

如果opencv有报错把这个解开

改为(根据自己OpenCV版本来,我的是3.2.0):
OPENCV_VERSION :=3

CUDA_ARCH := -gencode需要改成自己型号
https://developer.nvidia.com/cuda-gpus

运行lidar_apollo_cnn_seg_detect.launch 报错:

error while loading shared libraries: libcaffe.so.1.0.0: cannot open shared object file: No such file or directory 运行时报错(caffe)

caffe安装好后lib没有配置到/usr/lib或/usr/local/lib中,需手动配置:

 export LD_LIBRARY_PATH=/path_to_your_caffe/distribute/lib/:$LD_LIBRARY_PATH

lidar_euclidean_cluster_detect模块:该模块主要是用的欧式聚类算法进行聚类
出现报错:

error while loading shared libraries: libopencv_imgcodecs.so.4.3: cannot open shared object file : No such file or directory

解决办法:

$ find ~/ -name "libopencv_imgcodecs.so.407"

结果

/home/xxx/xxx/opencv-4.7.0/build/lib/libopencv_imgcodecs.so.407

将exprot LD_LIBRARY_PATH 插在~/.bashrc最后

export LD_LIBRARY_PATH=/home/xxx/xxx/opencv-4.7.0/build/lib/libopencv_imgcodecs.so.407
export LD_LIBRARY_PATH=*******:$LD_LIBRARY_PATH                                             

*******为之前的路径

http://www.lryc.cn/news/212424.html

相关文章:

  • CentOS安装Ruby环境
  • 力扣第509题 斐波那契数 新手动态规划(推荐参考) c++
  • canvas绘制签名并保存
  • Android渲染流程
  • 牛客-【237题】算法基础精选题单-第二章 递归、分治
  • leetcode-字符串
  • 多线程---synchronized特性+原理
  • Qt实现卡牌对对碰游戏
  • 【3D 图像分割】基于 Pytorch 的 VNet 3D 图像分割7(数据预处理)
  • 极米科技H6 Pro 4K、H6 4K高亮定焦版——开启家用投影4K普及时代
  • 软考系统架构师知识点集锦九:数据库系统
  • IOC课程整理-6 Spring IoC 依赖注入
  • FANUC机器人PRIO-621和PRIO-622设备和控制器没有运行故障处理
  • 《动手深度学习》线性回归简洁实现实例
  • 国家数据局正式揭牌,数据专业融合型人才迎来发展良机
  • 基于springboot实现休闲娱乐代理售票平台系统项目【项目源码+论文说明】
  • 3.AUTOSAR OS分析(一)
  • AB试验(七)利用Python模拟A/B试验
  • Go语言入门-流程控制语句
  • 深入探究ASEMI肖特基二极管MBR60100PT的材质
  • python类模拟“对战游戏”
  • Maven第二章:Maven基本概念与生命周期
  • <蓝桥杯软件赛>零基础备赛20周--第3周--填空题
  • 【Linux】VM及WindowsServer安装
  • 【实用教程】MySQL内置函数
  • 第十二节——ref
  • 少儿编程 2023年9月中国电子学会图形化编程等级考试Scratch编程四级真题解析(判断题)
  • 【设计模式三原则】
  • 600MW发电机组继电保护自动装置的整定计算及仿真
  • 【蓝桥每日一题]-字符串(保姆级教程 篇1)#atcoder324C~E题