Navigation is to move the robot from one location to the specified destination in a given environment. For this purpose, a map that contains geometry information of furniture, objects, and walls of the given environment is required. As described in the previous SLAM section, the map was created with the distance information obtained by the sensor and the pose information of the robot itself.
- If
roscore
is not running on the Remote PC, run roscore. Skip this step if roscore is already running.
roscore
- If the
Bringup
is not running on the TurtleBot3, launch the Bringup. Skip this step if you have launched bringup previously. (BEFORE running the bring up, remember to calibrate the time first)
roslaunch turtlebot3_bringup turtlebot3_robot.launch
- Launch the Navigation.
roslaunch turtlebot3_navigation turtlebot3_navigation.launch map_file:=$HOME/map.yaml
(You could change the path of the map file)
Initial Pose Estimation must be performed before running the Navigation as this process initializes the AMCL parameters that are critical in Navigation. TurtleBot3 has to be correctly located on the map with the LDS sensor data that neatly overlaps the displayed map.
- Click the
2D Pose Estimate
button in the RViz menu.
- Click on the map where the actual robot is located and drag the large green arrow toward the direction where the robot is facing.
- Repeat step 1 and 2 until the LDS sensor data is overlayed on the saved map.
- Launch keyboard teleoperation node to precisely locate the robot on the map.
roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
- Move the robot back and forth a bit to collect the surrounding environment information and narrow down the estimated location of the TurtleBot3 on the map which is displayed with tiny green arrows.
- Terminate the keyboard teleoperation node by entering
Ctrl
+C
to the teleop node terminal in order to prevent different cmd_vel values are published from multiple nodes during Navigation.
- Click the
2D Nav Goal
button in the RViz menu.
- Click on the map to set the destination of the robot and drag the purple arrow toward the direction where the robot will be facing.
Navigation stack has many parameters to change performances for different robots.
You can get more information about Navigation tuning from Basic Navigation Tuning Guide, ROS Navigation Tuning Guide by Kaiyu Zheng, and the chapter 11 of ROS Robot Programming book.