ROS 包中 gmapping 模块的参数翻译

参照这个关于kinect v2转为laser传感器建图的帖子阅读效果更佳。可以按照自己需求去改。

这个工程我觉得最大的问题在回环检测很弱,当然,单线激光雷达可能也就这个样子了。

末尾附上我自己随便改的参数,针对kinect2,可以反应的稍微快一点。

这个就是ROS 包中 gmapping 模块的参数。

主要是意译,能看懂就好。
Parameters
~inverted_laser ( string, default: "false")
  • (REMOVED in 1.1.1; transform data is used instead) Is the laser right side up (scans are ordered CCW), or upside down (scans are ordered CW)?
  • 被删了……
~throttle_scans ( int, default: 1)
  • Process 1 out of every this many scans (set it to a higher number to skip more scans)
  • 从多少帧数据中取1帧,越高跳过的越多。(不确定是否是均值输出)
~base_frame ( string, default: "base_link")
  • The frame attached to the mobile base.
  • 与移动平台关联的框架。
~map_frame ( string, default: "map")
  • The frame attached to the map.
  •  与地图关联的框架。
~odom_frame ( string, default: "odom")
  • The frame attached to the odometry system.
  • 与里程仪系统关联的框架。
~map_update_interval ( float, default: 5.0)
  • How long (in seconds) between updates to the map. Lowering this number updates the occupancy grid more often, at the expense of greater computational load.
  • 占据栅格地图的更新频率,默认5秒更新一次,调大提高系统负担。(太慢了吧,不确定是否后台更新还是所见即所得的更新。)
~maxUrange ( float, default: 80.0)
  • The maximum usable range of the laser. A beam is cropped to this value.
  • 最大测量范围,应该是米
~sigma ( float, default: 0.05)
  • The sigma used by the greedy endpoint matching
  • 末端点匹配时的默认值。
~kernelSize ( int, default: 1)
  • The kernel in which to look for a correspondence

寻找相关性的kernel大小

~lstep (float, default: 0.05)

  • The optimization step in translation
  • 平移的优化步长
~astep ( float, default: 0.05)
  • The optimization step in rotation
  • 旋转的优化步长
~iterations ( int, default: 5)
  • The number of iterations of the scanmatcher
  • 迭代5次进行扫描结果的匹配(?)
~lsigma ( float, default: 0.075)
  • The sigma of a beam used for likelihood computation
  • 近似计算一个光束的参数
~ogain ( float, default: 3.0)
  • Gain to be used while evaluating the likelihood, for smoothing the resampling effects
  • 评估相似率的增益,用来平滑重采样。
~lskip ( int, default: 0)
  • Number of beams to skip in each scan. Take only every (n+1)th laser ray for computing a match (0 = take all rays)
  • 每次扫描中跳过的光束数量,也就是隔几个光束采集一次,默认0就是全采。
~minimumScore ( float, default: 0.0)
  • Minimum score for considering the outcome of the scan matching good. Can avoid jumping pose estimates in large open spaces when using laser scanners with limited range (e.g. 5m). Scores go up to 600+, try 50 for example when experiencing jumping estimate issues.
  • 这个有趣了,衡量扫描匹配效果的分数。当大场景中仪器的扫描范围小的时候(5m)可以避免位姿估计跳动太大。最高可以设设成600以上。设成50看效果,应该是越大地图越不会跳动。
~srr ( float, default: 0.1)
  • Odometry error in translation as a function of translation (rho/rho)
  • 里程仪平移误差,当作为平移函数时(?)
~srt ( float, default: 0.2)
  • Odometry error in translation as a function of rotation (rho/theta)
~str ( float, default: 0.1)
  • Odometry error in rotation as a function of translation (theta/rho)
~stt ( float, default: 0.2)
  • Odometry error in rotation as a function of rotation (theta/theta)
~linearUpdate ( float, default: 1.0)
  • Process a scan each time the robot translates this far
  • 每当机器人平移这么远才扫描一次。小场景的话应该改小一点。
~angularUpdate ( float, default: 0.5)
  • Process a scan each time the robot rotates this far
  • 每当机器人旋转这么多才扫描一次。小场景的话应该改小一点。
~temporalUpdate ( float, default: -1.0)
  • Process a scan if the last scan processed is older than the update time in seconds. A value less than zero will turn time based updates off.
  • 当最后一次更新是x秒以前就自动更新一次。小于0就是关闭时间上的自动更新。
  • 这三句加起来就是应该分别设置更新扫描结果的依据,前两个是运动,最后是时间。
~resampleThreshold ( float, default: 0.5)
  • The Neff based resampling threshold
  • 基于Neff重采样阈值。
~particles ( int, default: 30)
  • Number of particles in the filter
  • 滤波器中的粒子数。(?)
~xmin ( float, default: -100.0)
  • Initial map size (in metres)
  • 初始地图X最小值
~ymin ( float, default: -100.0)
  • Initial map size (in metres)
  • Y最小值
~xmax ( float, default: 100.0)
  • Initial map size (in metres)
  • X最大值
~ymax ( float, default: 100.0)
  • Initial map size (in metres)
  • Y最大值
~delta ( float, default: 0.05)
  • Resolution of the map (in metres per occupancy grid block)
  • 地图分辨率(每多少米一个占据栅格)
~llsamplerange ( float, default: 0.01)
  • Translational sampling range for the likelihood
  • 近似用的平移采样范围(?)
~llsamplestep ( float, default: 0.01)
  • Translational sampling step for the likelihood
  • 近似用的平移采样步长
~lasamplerange ( float, default: 0.005)
  • Angular sampling range for the likelihood
  • 近似用的角度采样范围
~lasamplestep ( float, default: 0.005)
  • Angular sampling step for the likelihood
  • 近似用的角度采样步长
~transform_publish_period ( float, default: 0.05)
  • How long (in seconds) between transform publications.
  • 发布转换(可能是位姿的)间隔多少秒
~occ_thresh ( float, default: 0.25)
  • Threshold on gmapping's occupancy values. Cells with greater occupancy are considered occupied (i.e., set to 100 in the resulting sensor_msgs/LaserScan). New in 1.1.0.
  • gmapping 的占据阈值。比这个大的单元就认为被占据了。(?)

~maxRange (float)

The maximum range of the sensor. If regions with no obstacles within the range of the sensor should appear as free space in the map, set maxUrange < maximum range of the real sensor <= maxRange.

传感器最大范围。要是想把传感器范围内没有障碍的空间全设置成自由空间,那就设置成:maxUrange <真实传感器的最大范围<= maxRange.

一般来说是只画到遇到障碍为止的区域认为是自由空间,也可以激进的设成只要没障碍就算自由空间。太激进了,不建议。

我自己测试的:kinect2_gmapping.launch

对比原版知道改哪里更有用就好。

<?xml version="1.0"?>

<launch>    
    <!-- start kinect2-->            
    <include file="$(find kinect2_bridge)/launch/kinect2_bridge.launch">
        <arg name="base_name"         value="kinect2"/>
        <arg name="sensor"            value=""/>
        <arg name="publish_tf"        value="true"/>
        <arg name="base_name_tf"      value="kinect2"/>
        <arg name="fps_limit"         value="-1.0"/>
        <arg name="calib_path"        value="$(find kinect2_bridge)/data/"/>
        <arg name="use_png"           value="false"/>
        <arg name="jpeg_quality"      value="90"/>
        <arg name="png_level"         value="1"/>
        <arg name="depth_method"      value="default"/>
        <arg name="depth_device"      value="-1"/>
        <arg name="reg_method"        value="default"/>
        <arg name="reg_device"        value="-1"/>
        <arg name="max_depth"         value="12.0"/>
        <arg name="min_depth"         value="0.1"/>
        <arg name="queue_size"        value="5"/>
        <arg name="bilateral_filter"  value="true"/>
        <arg name="edge_aware_filter" value="true"/>
        <arg name="worker_threads"    value="4"/>
    </include>  

  <!-- Run the depthimage_to_laserscan node -->
  <node pkg="depthimage_to_laserscan" type="depthimage_to_laserscan" name="depthimage_to_laserscan" output="screen">
    <!--输入图像-->
    <remap from="image" to="/kinect2/qhd/image_depth_rect"/>
    <!--相关图像的相机信息。通常不需要重新变形,因为camera_info将从与图像相同的命名空间订阅。-->
    <remap from="camera_info" to="/kinect2/qhd/camera_info" />
    <!--输出激光数据的话题-->
    <remap from="scan" to="/scan" /> 

        <!--激光扫描的帧id。对于来自具有Z向前的“光学”帧的点云,该值应该被设置为具有X向前和Z向上的相应帧。-->
    <param name="output_frame_id" value="/kinect2_depth_frame"/>
    <!--用于生成激光扫描的像素行数。对于每一列,扫描将返回在图像中垂直居中的那些像素的最小值。-->
    <param name="scan_height" value="30"/>
    <!--返回的最小范围(以米为单位)。小于该范围的输出将作为-Inf输出。-->
    <param name="range_min" value="0.01"/>
    <!--返回的最大范围(以米为单位)。大于此范围将输出为+ Inf。-->
    <param name="range_max" value="8.00"/>
  </node>

    <!--start gmapping node -->
    <node pkg="gmapping" type="slam_gmapping" name="simple_gmapping" output="screen">
        <param name="map_update_interval" value="0.5"/>  
        <param name="maxUrange" value="5.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="50"/>  
        <param name="srr" value="0.1"/>  
        <param name="srt" value="0.2"/>  
        <param name="str" value="0.1"/>  
        <param name="stt" value="0.2"/>  
        <param name="linearUpdate" value="0.2"/>  
        <param name="angularUpdate" value="0.2"/>  
        <param name="temporalUpdate" value="0.2"/>  
        <param name="resampleThreshold" value="0.5"/>  
        <param name="particles" value="50"/>  
        <param name="xmin" value="-5.0"/>  
        <param name="ymin" value="-5.0"/>  
        <param name="xmax" value="5.0"/>  
        <param name="ymax" value="5.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"/>  
        <param name="occ_thresh" value="0.01"/>  
    </node>

    <!--start serial-port and odometry node-->
    <node name="base_controller" pkg="base_controller" type="base_controller"/>

    <!-- static_transform_publisher x y z yaw pitch roll frame_id child_frame_id period_in_ms -->  
  <node pkg="tf" type="static_transform_publisher" name="base_footprint_to_base_link" args="0 0 0.5 0 0 0 base_footprint base_link 50" />
  <node pkg="tf" type="static_transform_publisher" name="base_link_to_laser" args="0 0 0.5 0 0 0 base_link laser 50" />
  <node pkg="tf" type="static_transform_publisher" name="base_link_to_kinect2laser" args="0 0 0.5 0 0 0 base_link kinect2_depth_frame 50" />
  <node pkg="tf" type="static_transform_publisher" name="base_link_to_kinect2_link" args="0 0 0.5 -1.57 0 -1.57 base_link kinect2_link 50" />
  <!--<node pkg="tf" type="static_transform_publisher" name="map_to_odom" args="0 0 0.5 0 0 0 map odom 50"/>-->
  <node pkg="tf" type="static_transform_publisher" name="odom_to_base_footprint" args="0 0 0.5 0 0 0 odom base_footprint 50"/>

</launch>

  • 2
    点赞
  • 18
    收藏
    觉得还不错? 一键收藏
  • 5
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值