Exploring the environment to build a map using SLAM

Let's follow these steps to build the map of a simple Gazebo world called stage_2.world:

  1. Launch the robot model within a modeled environment by running the following line of code:
T1 $ roslaunch virtual_slam gopigo3_world.launch world:=stage_2.world

This command launches Gazebo and places the GoPiGo3 model in the middle of it, as shown in the following screenshot:

The environment consists of a square space with four static obstacles. The two-dimensional map we used in the Occupancy Grid Map (OGM) subsection of the previous section corresponds to this Gazebo world, whose filename is stage_2.world ...

Get Hands-On 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.