使用2d激光雷达实现cartogrpaher建图

1.安装SlmatecA1激光雷达

参考链接:【很详细】激光雷达初体验 - Ubuntu 18.04 + 思岚科技 RPLIDAR A1M8 + ROS 上手使用_银时大魔王的博客-CSDN博客

测试指令:

//Run rplidar node and view in the rviz
roslaunch rplidar_ros view_rplidar.launch (for RPLIDAR A1/A2)

//Run rplidar node and view using test application
roslaunch rplidar_ros rplidar.launch (for RPLIDAR A1/A2)

测试:

终端1:

sudo chmod 777 /dev/ttyUSB0

终端2:在下载代码的工作空间内,先source,然后选择上述测试指令

//例如
roslaunch rplidar_ros view_rplidar.launch 

2.修改cartographer参数

2.1修改revo_lds.lua [~/car2_ws/src/cartographer_ros/cartographer_ros/configuration_files下]

修改内容:将horizontal_laser_link 修改为 laser

tracking_frame = "horizontal_laser_link",
published_frame = "horizontal_laser_link",

2.2 修改demo_revo_lds.launch[~/car2_ws/src/cartographer_ros/cartographer_ros/launch下】

1.在节点cartographer_node中 将horizontal_lawe_2d改为scan

 2.删除两个节点 【不要注释,不然运行该launch文件会报错】

 3.退回,重新编译cartographer

catkin_make_isolated --install --use-ninja
source install_isolated/setup.bash

4.测试:

运行激光雷达:

终端1:

sudo chmod 777 /dev/ttyUSB0

终端2:

roslaunch rplidar_ros rplidar.launch

运行cartographer demo

roslaunch cartographer_ros demo_revo_lds.launch

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值