本教程使用 Flash Lidar F4 激光雷达 + D1 + Dashgo 进行 gmapping 建地图
树莓派的IP假设为192.168.11.100
运行环境:Ubuntu 14.04 、 indigo版ROS、树莓派3
正常启动并让树莓派与PC正常通讯
树莓派修改/etc/hosts文件,让树莓派知道PC端的IP与主机名
$ ssh pi@192.168.11.100
$ sudo vim /etc/hosts
127.0.0.1 localhost
127.0.1.1 dahsgo-d1-060
172.20.105.96 eaibot #添加这行信息
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
树莓派运行扫地图主程序
$ roslaunch dashgo_nav gmapping_demo.launch
运行成功,如下面显示:
pi@dashgo-d1-web:~/dashgo_ws/src/dashgo/dashgo_nav/launch $ roslaunch dashgo_nav gmapping_demo.launch
... logging to /home/pi/.ros/log/a05f59f0-a569-11e6-9a1a-b827eb8dfc88/roslaunch-dashgo-d1-web-10624.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://dashgo-d1-web:38957/
SUMMARY
========
CLEAR PARAMETERS
* /move_base/
PARAMETERS
* /arduino/Kd: 20
........
[ INFO] [1478578384.240421241]: Using plugin "static_layer"
[ INFO] [1478578384.442934859]: Requesting the map...
[INFO] [WallTime: 1478578384.575114] Attempting to connect to mongodb @ localhost:27017
[ INFO] [1478578384.664973875]: Resizing costmap to 544 X 544 at 0.050000 m/pix
[ INFO] [