Navigation — map it, then let the robot find its way¶
SLAM builds the map, Nav2 drives the route. You'll do both with the AI tutor and watch it live in RViz — no notebooks involved.
1. Map the world¶
Ask the tutor:
"Start SLAM and open RViz so I can watch the map build."
Open app.physicar → VNC — RViz shows the map growing. Drive the robot around (keyboard is fine) until walls close into a complete floor plan. Sweep corners twice; loop closures snap the map tight.
2. Save the map¶
"Save this map so navigation can use it."
3. Navigate¶
"Start Nav2 with my map."
In RViz, set a navigation goal (2D Goal Pose) — the planned path appears and the robot follows it, dodging obstacles on the way. Drop a box in its path (in the simulator: use the world's objects) and watch the local planner bend around it.
What to look at¶
- The global path (the long line to the goal) vs the local path (the short one that swerves) — two planners cooperating.
- The costmap glow around obstacles — that's what "too close" looks like to a robot.
Make it yours¶
- Map one of your own worlds and navigate it.
- Ask the tutor to send goals from code — "patrol these three points forever".
The theory → Learn: SLAM & navigation