Creating a Map
This lesson shows how to build a map which lets the robot remembers the environment. TurtleBot can autonomously navigate around using the map.
Creating a Map
1. Create a folder for maps.
2. Launch Gazebo world.
3. Start map building.
4. Use Rviz to visualize the map building process.
5. Change the option.
Local map
->Costmap
->Topic
(choose /map
from drop-down list). See on the
picture:
6. Change the option.
Global map
->Costmap
->Topic
(choose /map
from drop-down list).
7. Launch teleop.
NOTE: If you want you can use other tools, for example interactive markers, find the information here.
8. Drive the TurtleBot around.
NOTE: The terminal with teleop launching has to be active all the time otherwise you won’t be able to operate the TurtleBot.
This is a picture of 360-degrees turn:
9. Save a map when your picture is good enough (like this).
10. Interrupt processes and close the terminals.
You can see all these steps in the video:
Testing the New Map
We can test the result of our work.
1. Launch Gazebo.
2. Launch navigation demo.
You can launch the default map for playground world if you have not your own map. Run this command:
3. Launch Rviz.
4. If you see a picture like this then creating the map has been realized successfully.
NOTE: We will explain you the meaning of new elements in the next tutorial.
5. Interrupt processes and close the terminals.
You can see all these steps in the video:
We have just checked that everything works good. We will learn how to use the map for autonomous navigation in the next lesson.