Day 11
Nav2: navigation stack for a TurtleBot4
This is a valid v1.0 placeholder page for the later curriculum arc. Full interactive lab treatment ships after Week 1 dogfooding.
LECTURE & READING
Glossary primer (12 min)
- Nav2 — ROS 2 Navigation & LocomotionNavigationMoving through an environment toward a goal. framework. Successor to
move_base. Behavior-tree based. - Costmap — 2D grid of traversability costs. Local costmap (small, fast, around the Core ConceptsRobotA physical system with sensors and actuators that can observe the world and take actions.) + global costmap (large, Control & PlanningPlanningFiguring out what the robot should do before or during movement.).
- Global planner — Plans a route in the global costmap. Defaults:
NavfnPlanner(Dijkstra),SmacPlanner(A / Hybrid-A). - Local planner / Control & PlanningControllerThe algorithm or system that turns desired behavior into motor commands. — Executes the global plan with safety. Defaults:
DWBLocalPlanner,RegulatedPurePursuit,MPPI. - AMCL — Adaptive Monte Carlo Navigation & LocomotionLocalizationDetermining where the robot is.. Particle-filter Navigation & LocomotionLocalizationDetermining where the robot is. in a known map.
- Behavior Tree (BT) — XML-defined Core ConceptsStateThe robot’s current condition, such as joint positions, velocity, object positions, or internal variables. machine driving Nav2's flow. Tick-based.
- TurtleBot4 — Differential-drive mobile Core ConceptsRobotA physical system with sensors and actuators that can observe the world and take actions., $1500, runs ROS 2. Used as a Nav2 reference platform.
Real-world analogy
Nav2 is the ride-share app of robotics. Costmap = the driver's mental map of "this road is blocked, that one's open". Global planner = "show me the route to destination". Local planner = the driver's reflexes around pedestrians. AMCL = GPS that corrects itself by recognizing landmarks.
Hour 1 — Robot Academy / Stachniss primer
The visual-pedagogical introduction to mobile Core ConceptsRobotA physical system with sensors and actuators that can observe the world and take actions. Navigation & LocomotionNavigationMoving through an environment toward a goal.. Pick one (~30 min):
- Core ConceptsRobotA physical system with sensors and actuators that can observe the world and take actions. Academy "Pose, Navigation & LocomotionLocalizationDetermining where the robot is. and Maps" masterclass: https://robotacademy.net.au/masterclass/robot-localization/
- Cyrill Stachniss "5 Minutes with Cyrill" Navigation & LocomotionLocalizationDetermining where the robot is. sequence:
- Navigation & LocomotionLocalizationDetermining where the robot is.
- Particle Filter
- Particle Filter and Monte Carlo Navigation & LocomotionLocalizationDetermining where the robot is.
Video
Particle Filter and Monte Carlo Navigation & LocomotionLocalizationDetermining where the robot is.
Open source
Hour 2 — Nav2 docs and tutorial
Read Nav2 Concepts (~25 min): https://docs.nav2.org/concepts/index.html
Then watch Articulated Robotics' Nav2 setup video: https://articulatedrobotics.xyz/tutorials/mobile-robot/concept/concept-nav2/
LAB
Hour 3 — Lab: TurtleBot4 simulation, drive to a goal in a known map (75 min)
What you're building. A TurtleBot4 (Lite) simulated in Ignition Gazebo, navigating in a pre-supplied warehouse map using Nav2's full stack: Navigation & LocomotionLocalizationDetermining where the robot is. (AMCL), global Control & PlanningPlanningFiguring out what the robot should do before or during movement. (NavfnPlanner), local Control & PlanningControlThe method used to make the robot move the way you want. (DWB), recovery behaviors. You'll send a Navigation & LocomotionNavigationMoving through an environment toward a goal. Core ConceptsGoalThe desired outcome or target state for a robot task. from RViz and from the command line.
What success looks like at the end. You have:
1. The TB4 sim launches without errors. Gazebo and RViz both open with the warehouse loaded.
2. AMCL converges within 5 seconds (RViz particle cloud collapses around the Core ConceptsRobotA physical system with sensors and actuators that can observe the world and take actions.).
3. You click "Nav2 Core ConceptsGoalThe desired outcome or target state for a robot task." in RViz and the Core ConceptsRobotA physical system with sensors and actuators that can observe the world and take actions. drives to it within ~30 seconds.
4. You send a Core ConceptsGoalThe desired outcome or target state for a robot task. via CLI (ros2 action send_goal /navigate_to_pose ...) and observe identical behavior.
5. Screen recording videos/day11_nav2.mp4 (60 s) shows the Core ConceptsRobotA physical system with sensors and actuators that can observe the world and take actions. navigating around two waypoints.
Step 1 — Install (10 min)
sudo apt install -y ros-jazzy-turtlebot4-simulator ros-jazzy-turtlebot4-navigation \
ros-jazzy-nav2-bringup ros-jazzy-irobot-create-toolboxFull source continues in the committed curriculum files. The v1.0 page exposes the day flow and lab surface without inventing content.