SLAM
Simultaneous Localisation And Mapping ( SLAM) is one
of the most entertaining aspects of mobile robotics. The philosophy of SLAM is that while navigating, the mobile robot will be able to form a map of its local environment, and thus, can try to answer the question, “Where am I ?” Clearly, this is a chicken and egg problem. SLAM is central to the notion of mobile robots surveying unknown terrains probably in some far- off planet. This effort demands sophisticated algorithms and subtle application of the Kalman filter or Rao- Blackwell methods. Interested readers can refer to http:// openslam. org/, which has an assortment of such algorithms.
SLAM can be realised in ROS using the gmapping node. While a simulation similar to that of the erratic robot is running, start gmapping in another terminal window using the following command:
rosrun gmapping slam_gmapping scan:=base_scan
To save the map obtained by SLAM, use the map_ server command:
rosrun map_server map_saver
The map will start to form as the robot is made to go around the environment using teleoperation and it will be saved as a .pgm (Figure 6).