Building a map using SLAM

The ROS Gmapping package is a wrapper of 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 which 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.

Creating a launch file for gmapping

The main task while creating a launch file for the gmapping ...

Get Mastering ROS for Robotics Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.