Nav2
Nav2 with TurtleBot3
Nav2 is a set of ROS 2 packages that let mobile robots navigate autonomously: localization, path planning and obstacle avoidance.
Installing the packages
On Linux, with ROS 2 already installed, install:
sudo apt install ros-$ROS_DISTRO-gazebo-*
sudo apt install ros-$ROS_DISTRO-turtlebot3*
sudo apt install ros-$ROS_DISTRO-navigation2
sudo apt install ros-$ROS_DISTRO-nav2-bringup
$ROS_DISTRO is the name of your ROS 2 distribution (for example, humble). To check it:
echo $ROS_DISTRO
Testing that it works
export TURTLEBOT3_MODEL=waffle
export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:/opt/ros/$ROS_DISTRO/share/turtlebot3_gazebo/models
ros2 launch nav2_bringup tb3_simulation_launch.py headless:=False
Gazebo opens with the TurtleBot3, along with RViz. In RViz, use 2D Pose Estimate to tell the robot where it is, then Nav2 Goal to send it a destination.
Translated from Spanish.