Building a map using SLAM
The ROS Gmapping package is a wrapper of the open source implementation of SLAM, called OpenSLAM (https://www.openslam.org/gmapping.html). The package contains a node called slam_gmapping
, which is the implementation of SLAM and helps to create a 2D occupancy grid map from the laser scan data and the mobile robot pose.
The basic hardware requirement for doing SLAM is a laser scanner which is horizontally mounted on the top of the robot, and the robot odometry data. In this robot, we have already satisfied these requirements. We can generate the 2D map of the environment, using the gmapping
package through the following procedure.
Before operating with Gmapping, we need to install it using the following command:
$ sudo apt-get install ros-kinetic-gmapping
Creating a launch file for gmapping
The main task while creating a launch file for the gmapping
process is to set the parameters for the slam_gmapping
node and the move_base
node. The slam_gmapping
node is the core node...