速腾激光雷达 xavier环境驱动配置踩坑记录

换上arm架构下面的ubuntu专用源

deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-updates main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-security main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-security main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-backports main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main universe restricted
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main universe restricted

C++ Yaml库安装


参考链接

然后再编译的过程中,make报错了,经查勘是问题是:
  std::string input{-58, -1, -99, 109};
narrowing conversion of 'XXX' from 'int' to 'char' inside{}
就是把int 转成char的过程中报错了,尤其是负数转char报错了。(https://blog.csdn.net/xiadeliang1111/article/details/86699071)

解决方法:  全部加上char,对其进行强制类型转换,std::string input{char(-58), char(-1), char(-99), char(109)};

pcl安装

报错1 缺少conversions.h
解决:
sudo apt-get install ros-melodic-pcl-conversions

链接:参考网站

报错2:缺少pcl_ros库
原因:arm版本的ros库不完整,x86的是完整的。
解决:通过rosdep安装ros_pcl
如何完成rosdep init :https://blog.csdn.net/u013468614/article/details/102917569
安装ros_pcl:https://blog.csdn.net/fcts1230/article/details/107880414
[最终解决方案]:上面的解决方案要换源,比较麻烦,最简单粗暴的方案就是安装 ros-melodic-destop-full版本,装上之后就有所有的库了。


雷达驱动编译

报错1:
提示缺少yaml的库。需要修改Cmakelist.txt,增加yaml-cpp的依赖,参考这个文章,在对应位置增加语句即可。
参考网站:https://blog.csdn.net/hola_tom/article/details/122011136


报错2:
include 没有找到
解决:
cd ~/catkin_ws
gedit src/rslidar_sdk/src/msg/rs_msg/lidar_point_cloud_msg.h 
第36行,#include 改成 #include

你可能感兴趣的:(自动驾驶,人工智能,机器学习)