使用turtlebot + hokuyo 运行gmapping建图

本文记录了使用turtlebot2搭配hokuyo激光雷达,通过gmapping进行建图的全过程。从准备硬件和软件环境,到测试hokuyo驱动,编写并运行launch文件,以及解决调试中遇到的问题,如激光雷达串口ID确认,world坐标系设置,以及kobuki驱动的异常等。
摘要由CSDN通过智能技术生成

整个过程参考了创客智造的教程:
https://www.ncnynl.com/archives/201611/1097.html
我根据自己设备的情况进行了改变

1. 准备

主机: Intel NUC, 安装ubuntu 14.04和ROS indigo
底盘:turtlebot2
激光雷达:hokuyo
hokuyo驱动:$ git clone https://github.com/ncnynl/hokuyo_node.git
turtlebot依赖包:$ git clone https://github.com/turtlebot/turtlebot_apps
gmapping包:$ git clone https://github.com/ros-perception/slam_gmapping.git
clone到工作空间并catkin_make
刷新配置:$ rospack profile

2. 测试hokuyo

$ roslaunch hokuyo_node hokuyo_test.launch
运行hokuyo驱动后应该没有error,使用$ rostopic list检查:

/diagnostics
/hokuyo/parameter_descriptions
/hokuyo/parameter_updates
/rosout
/rosout_agg
/scan

还可以使用rviz检查下,laser节点应该是正常的
注意hokuyo_test.launch里需要hokuyo的串口ID:

    <!-- Set the port to connect to here -->
    <param name="port" type="string" value="/dev/ttyACM0"/> 

一般情况下默认的/dev/ttyACM0就可以,不确定的话可以用$ dmesg | grep tty查看:

[    0.000000] console [tty0] enabled
[    2.071919] usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB0
[    2.075799] cdc_acm 2-2:1.0: ttyACM0: USB ACM device

也可以使用$ lsusb查看:

Bus 001 Device 002: ID 8087:8001 Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002
  • 0
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值