Edit on GitHub

SLAM

Note : This instruction was tested on Ubuntu 16.04 and ROS Kinetic Kame.

Warning : Make sure to run the [Bringup][#bringup] instruction before performing SLAM.

Tip : It is recommended to use a joystick pad instead of the keyboard for easier control.

The Simultaneous Localization and Mapping, or SLAM, is a technique to draw a map by estimating current location in an arbitrary space.

The SLAM is a well-known feature of TurtleBot from its predecessors. The video here shows you how accurately TurtleBot3 can draw a map with its compact and affordable platform.

Create a Map with Teleoperation

Tip : The terminal application can be found with the Ubuntu search icon on the top left corner of the screen. Shortcut key for terminal is Ctrl-Alt-T.

[Remote PC] Open a new terminal and launch the SLAM file. If you have TurtleBot3 Burger,

  export TURTLEBOT3_MODEL=burger
  roslaunch turtlebot3_slam turtlebot3_slam.launch

If you have TurtleBot3 Waffle,

  export TURTLEBOT3_MODEL=waffle
  roslaunch turtlebot3_slam turtlebot3_slam.launch

[Remote PC] Visualize the model in 3D with RViz.

  rosrun rviz rviz -d `rospack find turtlebot3_slam`/rviz/turtlebot3_slam.rviz

[Remote PC] Teleoperation with Keyboard

  roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch

Save the Map

[Remote PC] Open a new terminal and run the map saver node.

  rosrun map_server map_saver -f ~/map

map.pgm and map.yaml files will be created in the ~/ directory (``$HOME directory, /home/`).