ROS学习心得——定位-SLAM-hector_mapping(RPLIDAR A2)

ROS学习心得——定位-SLAM-hector_mapping
FOR THE SIGMA
FOR THE GTINDER
FOR THE ROBOMASTER

简介:

产品相关数据与官方文档:http://www.slamtec.com/cn/Lidar/A2

操作系统版本:Ubuntu16.04(注意:不同的ROS版本对应相应的Ubuntu操作系统版本的切勿安装错误)
http://www.ubuntu.org.cn/download/desktop 桌面版ubuntu16.04 下载
http://mirror.pnl.gov/releases/xenial/ Ubuntu系列镜像文件下载列表(amd64为64位,i386为32位)

ROS版本:kinetic-火箭龟
http://www.ros.org/ ROS官网
http://wiki.ros.org/kinetic/Installation ROS-kinetic下载地址(wiki里面的教程很不错的)

激光雷达驱动-ROS包:rplidar_ros
https://github.com/robopeak/rplidar_ros
https://github.com/ncnynl/rplidar_ros
或是利用git安装
1.sudo apt-get install git
2.git clone https://github.com/robopeak/rplidar_ros.git 或是 git clone https://github.com/ncnynl/rplidar_ros.git
注意:有人会问为什么两个链接看起来都一样,实际上是两个不同的人或是组织所建立的相同的内容,不同的库。

虚拟机版本:VMware15(注意:如果可以的话尽量不要用虚拟机,容易出现崩坏显现,为啥作者要用呢?当然是没钱啊!>_<
https://my.vmware.com/cn/web/vmware/info/slug/desktop_end_user_computing/vmware_workstation_pro/15_0
15版下载,密匙百度

国内源推荐:阿里云、sohu、cn99

运行步骤

1.请先确认RPLIDAR A2是否配置完成
参考链接:https://blog.csdn.net/whl970831/article/details/88097321
ROS学习心得——正确运行RPLIDAR A2激光雷达(让它转起来吧!)

2.下载并安装hector_mapping (注意ROS版本)
sudo apt-get install ros-kinetic-hector-slam
ROS学习心得——定位-SLAM-hector_mapping(RPLIDAR A2)_第1张图片
3.在rplidar_ros/launch/目录下新建hector_mapping_demo.launch文件
内容如下:




  
    
    
    
    
    


    
    
    


    
    
    
    
    
    
    
    


    
    
    
    
    
    

    
    
    
    


    
    
    
    
  


  
    
    
    
    
    
  


  
  



最后保存下来。
ROS学习心得——定位-SLAM-hector_mapping(RPLIDAR A2)_第2张图片
4.插上rplidar a2并配置端口权限 (若已经完成步骤1的可以跳过该步骤)
ls -l /dev |grep ttyUSB
sudo chmod 666 /dev/ttyUSB0
source devel/setup.bash (这是位于在turtlebot_ws的路径下的指令)
ROS学习心得——定位-SLAM-hector_mapping(RPLIDAR A2)_第3张图片
5.运行写好的launch文件
先 roscore
新终端 roslaunch rplidar_ros hetor_mapping_demo.launch
得到结果图
ROS学习心得——定位-SLAM-hector_mapping(RPLIDAR A2)_第4张图片

你可能感兴趣的:(ROS,激光雷达,SLAM,定位)