Can ROS Gmaping be as good with big maps as Google's Cartographer?

492 views Asked by At

I am trying to determine, if ros gmaping (http://wiki.ros.org/gmapping) could be effectively and reliably used to map out large maps. So far I did not have any success. On larger maps (100x100 m) sometimes comes out curved.

To find other methods of mapping, I started dabbling in Google's Cartographer (https://google-cartographer-ros.readthedocs.io/en/latest/), and after a short while, it behaves much more reliably and precisely, but its much more time-consuming.

So in summary what calibration methods should I use to tune my gmaping procedure ?

My gmaping.launch :

<?xml version="1.0"?>
<launch>

  <!-- Gmapping -->
  <node pkg="gmapping" type="slam_gmapping" name="slam_gmapping" output="screen">
    <remap from="scan" to="/scan_front"/>
    <param name="base_frame" value="/base_footprint"/>
    <param name="odom_frame" value="/odom"/>
    <param name="map_frame" value="/map"/>

    <param name="map_udpate_interval" value="1.0"/>
    <param name="maxUrange" value="15.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="10"/>
    <param name="lsigma" value="0.075"/>
    <param name="ogain" value="3.0"/>
    <param name="lskip" value="0"/>
    <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.5"/>
    <param name="temporalUpdate" value="-1.0"/>
    <param name="resampleThreshold" value="0.5"/>
    <param name="particles" value="100"/>
    <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.02"/>
    <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="inverted_laser" value="true"/>
  </node>

</launch>
2

There are 2 answers

0
Oscar On

a specific parameter that will help the output is minimumScore - this is the accepted match value between scans. the higher the value the higher the quality of the end map

or change the values associated with resampling and increase the number of scans taken i.e. using 1 scan every half a second will give better results than one scan every 10 seconds

otherwise you just need to play with the parameter values of the package until you see good results

0
Andrei Vukolov On

Gmapping, in general, is not oriented to handle closed loops and odometry mismatch, whilst Google Cartographer is dedicated to do precisely this. From my experience in a very sophisticated industrial environment, I can give the following recommendations for the case if you do not want to use Cartographer:

  • Do mapping slowly, especially for angular speed. This prevents angular decompensation in the case you are using rotary LIDAR, and also gives Gmapping algorithm the time to perform scan matching.
  • Provide as accurate odometry as you can. To do so, use a very good IMU sensor, fuse the measurements via robot_localization and thoroughly control the parameters of the Kalman filter. The goal here is to precisely handle the angular speeds of the robot by the chosen axis.
  • Using robot_localization, precisely regulate the polling rates and publishing frequencies for odometry transforms. This prevents timing lags and removes some angular displacements on the map.
  • Play with gain, *Update and *Threshold parameters in the same environment and perform similar trajectories to determine the values feasible (most stable) for your current setup.

However, after a lot of tests, I cannot name Gmapping as an algorithm feasible for the setups including premises with different kinds of geometry (plain rooms, corridors, looped rings, etc.). In fact, every kind of environment requires different parameters.