Turbot-SLAM入门教程-实现自主探索建图(kinect V1版)
说明:
介绍如何利用turtlebot_exploration_3d实现自主探索建图
步骤:
安装octomap_ros和rviz插件
sudo apt-get install ros-indigo-octomap*
源码安装:turtlebot_exploration_3d
cd turtlebot_ws/src git clone https://github.com/RobustFieldAutonomyLab/turtlebot_exploration_3d.git catkin_make
deb包安装:
sudo apt-get update sudo apt-get install ros-indigo-turtlebot-exploration-3d
运行:
主机端,新终端,执行:
$ roslaunch turtlebot_exploration_3d minimal_explo.launch $ roslaunch turtlebot_exploration_3d turtlebot_gmapping.launch $ rosrun turtlebot_exploration_3d turtlebot_exploration_3d
从机端,新终端,执行:
roslaunch turtlebot_exploration_3d exploration_rviz.launch
自动建图进行会比较慢,会显示octomap图,同时也实现了gmapping的建图
保存地图:
保存地图:
rosrun turbot_map saver zhizaokongjian
得到两个文件如下:
zhizaokongjian.pgm 地图
zhizaokongjian.yaml 配置
zhizaokongjian.yaml样例:
image: /home/ubuntu/map/zhizaokongjian.pgm resolution: 0.050000 origin: [-12.200000, -12.200000, 0.000000] negate: 0 occupied_thresh: 0.65 free_thresh: 0.196
必填的字节:
image: 含占用信息的image文件的路径;可以是绝对路径,也可以是到YAML文件的相对路径。 resolution:地图的分辨率,meters/pixel origin: 机器人相对地图原点的位姿,(x,y,yaw),yaw逆时针旋转(yaw=0表示没有旋转)。 occupied_thresh:单元占用的概率大于这个阈值则认为完全占用。 free_thresh: 单元占用的概率小于这个阈值则认为完全自由。 negate: 不论白色/黑色,自由/占用,semantics(语义/符号)应该被反转(阈值的解释不受影响)。
- 本文固定链接: http://www.rosrobot.cn/?id=271
- 转载请注明: znjrobot 于 北京智能佳科技有限公司 发表
《本文》有 0 条评论