Gmapping SLAM (creating the map) - FontysAtWork/ESA-PROJ GitHub Wiki
We use the gmapping ROS package to create the map of the arena. The gmapping node is declared in the gmapping_slam.include.
LiDAR input source
One important difference from the normal navigation stack is that we only use the front LiDAR sensor (topic scan_front
) for creating the map. We do this because we noticed, when using both LiDAR sensors, that the walls were create twice. Also the second wall drawn was rotated a bit. We think this is because we merge two LiDAR topics by writing into the same topic in an alternating way (there is no real "merging" of the data). We decided that mapping works just as well with one LiDAR and did not invest any more time into this matter.
Map dimensions and resolution
We also need to set the map resolution and dimensions.
<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.01"/>
This creates a mappable area of 10 * 10 meters with a resolution of 1 centimeter. We decided to let the robot start in the center (0, 0) of this mappable area. This makes the initial placement of the robot more flexible.