hokuyo+kinetic+gmapping 基于turtle
2018-05-03 本文已影响0人
潜月夜行
利用hokuyo UST 10lx 配合turtlebot提供的里程计建图
1 hokuyo 驱动安装(urg_node)
详情见https://blog.csdn.net/qq_32005213/article/details/79910943
2 turtlebot 驱动安装
详情见https://www.ncnynl.com/archives/201609/792.html
3 gmapping 包安装
github源码安装 https://github.com/ros-perception/slam_gmapping
4 transform 关系配置(特别重要)
注意:laser_scan 与 base_link 之间的关系需要是静态转换
imagebase_link odometry 之间的关系是由turtlebot的驱动发布的
image5 配置launch文件 运行各个节点,配置变量
<launch>
<!--gmapping
<node pkg="gmapping" type="slam_gmapping" name="gmapping" args="scan">
<param name="use_siM_time" value="true"/>
</node>/-->
<node pkg="gmapping" type="slam_gmapping" name="slam_gmapping" args="scan" output="screen">
<param name="base_frame" value="base_link"/>
<param name="odom_frame" value="odom"/>
<param name="map_update_interval" value="5.0"/>
<param name="maxUrange" value="6.0"/>
<param name="maxRange" value="8.0"/>
<param name="sigma" value="0.05"/>
<param name="kernelSize" value="1"/>
<param name="lstep" value="0.05"/>
<param name="astep" value="0.05"/>
<param name="iterations" value="5"/>
<param name="lsigma" value="0.075"/>
<param name="ogain" value="3.0"/>
<param name="lskip" value="0"/>
<param name="minimumScore" value="200"/>
<param name="srr" value="0.01"/>
<param name="srt" value="0.02"/>
<param name="str" value="0.01"/>
<param name="stt" value="0.02"/>
<param name="linearUpdate" value="0.5"/>
<param name="angularUpdate" value="0.436"/>
<param name="temporalUpdate" value="-1.0"/>
<param name="resampleThreshold" value="0.5"/>
<param name="particles" value="80"/>
<!--
<param name="xmin" value="-50.0"/>
<param name="ymin" value="-50.0"/>
<param name="xmax" value="50.0"/>
<param name="ymax" value="50.0"/>
make the starting size small for the benefit of the Android client's memory...
-->
<param name="xmin" value="-1.0"/>
<param name="ymin" value="-1.0"/>
<param name="xmax" value="1.0"/>
<param name="ymax" value="1.0"/>
<param name="delta" value="0.05"/>
<param name="llsamplerange" value="0.01"/>
<param name="llsamplestep" value="0.01"/>
<param name="lasamplerange" value="0.005"/>
<param name="lasamplestep" value="0.005"/>
</node>
<!--static transform/-->
<node pkg="tf" type="static_transform_publisher" name="base2laser" args="0.28 0 0.16 0 0 0 base_link laser 500"/>
<!--odometry/-->
<node pkg="odometry" type="odometry" name="odometry"/>
<!--laser driver/-->
<node pkg="urg_node" type="urg_node" name="urg_node" output="screen">
<param name="ip_address" value="192.168.0.10"/>
<param name="frame_id" value="laser"/>
</node>
<!--rviz/-->
<node pkg="rviz" type="rviz" name="rviz" output="screen"/>
</launch>
6 建图
image.png