Unit 30 · Semester 2 · planning · about 3 weeks / 20–30 focused hours
Planning and collision avoidance
Mission: Guide one small rover from S to G through a changing grid map, then check whether a route that fits its centre also leaves room for its body.
The interactive version of this unit needs JavaScript. Below are its steps as text.
Steps
1. Give the rover a map
Look at the grid. S is the rover, G is the goal, and dark squares are blocked. Press Trace the safe route.
Why it matters: A route is a sequence of positions the model considers safe. The grid is a map, not the room itself. A path can only be judged against the map and its assumptions.
2. Ask for the shortest grid route
Press Search with A*. Watch the frontier highlights, then read the route length, expanded cells and collision checks beside the map.
Why it matters: A* ranks a candidate using cost already travelled plus an estimate to the goal. On this four-neighbour, equal-cost grid, Manhattan distance is a lower-bound estimate. Every reported count belongs to this deterministic software model.
3. Move one wall
Press Add the wall. Compare the old route (faint) with the newly searched route.
Why it matters: A planner can only respond to obstacles represented in its map. Replanning updates the route after the map changes; it does not prove that the map matches the real world.
4. Read the search counts
Press Compare the counts. Read each label and unit; runtime is milliseconds measured in this browser, not a universal speed score.
Why it matters: Route length describes the returned path; expanded cells and collision checks describe work done by this implementation. Runtime varies with browser and device, so repeat and report the environment before comparing it.
5. Let the rover react one square at a time
First answer: what does A* know about the whole mapped route? Then press Run local rule.
Why it matters: This deliberately small reactive rule only uses nearby free cells and goal distance. It is not a production navigation stack. Its failure makes visible why local choices can miss a safe global route.
6. Compare what each method asks
Press Show both results. Trace the dark A* route, then the orange local choices and read the stopping reason.
Why it matters: The methods answer different questions. A* asks for a path across a known grid; this local rule asks which nearby step looks promising now. Neither statement alone guarantees safe motion in a changing physical space.
7. A point can fit where the rover cannot
Press Draw the rover footprint. Notice the rover outline around its centre on the route.
Why it matters: A point path describes where a centre can go, not the space occupied by a whole robot. Real collision checking depends on geometry, map accuracy, localisation error and motion between samples.
8. Inflate nearby obstacles
Press Add one-cell clearance. Watch blocked cells grow around the wall and compare the replanned route.
Why it matters: Inflating obstacles is one square-cell grid approximation for reserving space around a robot. A coarse grid cannot represent every shape, rotation or continuous motion; the model shows a warning, not a physical safety certificate.
9. Find the failed scenario
Press Run the narrow-gap test. Read the centre-path result and the footprint-aware result separately.
Why it matters: A geometrically valid centre path can be infeasible for the represented body. The conclusion is limited to this grid and footprint approximation; it is not a measurement of a real robot or a universal planner result.
10. Keep a reproducible run record
Press Show the run card. Open Notebook to record your own configuration and results separately from the worked example.
Why it matters: A useful comparison names the setup and the failure, not only the successful route. The blank notebook is for results you actually obtain; this page’s generated run is not your evidence.
Go deeper
Three-week investigation plan · original estimate: about 20–30 focused hours
- Week 1 · 6–8 h: keep one baseline map; compare A* and the one-step rule on at least three edited obstacle arrangements. Record route length or no route, expanded cells, defined neighbour checks and repeated browser timings. Explain one local-rule failure.
- Week 2 · 6–10 h: test the footprint approximation on narrow and wide passages. Change one clearance assumption at a time, predict whether a route remains, then record the simulated result and one failure. Keep this grid resolution fixed unless you build and document a separate, consistently scaled map.
- Week 3 · 8–12 h: design a new map that distinguishes a centre-only route from a footprint-aware route. State the movement rule, tie-breaks, map, units, check-count definition and runtime environment. Compare output with prediction and write a short limitations note. This page does not claim those runs were completed.
What A* promises—and what it does not
For this finite grid with equal 4-neighbour move costs, Manhattan distance never exceeds the remaining number of moves. A* can therefore return a least-move route in this representation if a route exists. That guarantee does not say the grid matches the world, the robot can execute the turns, or a moving obstacle will stay put.
f(n) = g(n) + h(n) · h(n) = |x − xG| + |y − yG|
Original outcome mapping
The source syllabus asks you to compare graph search and local reactive planning, draw on Chapter 16 and frames, change an obstacle in a grid A* simulation, and report route length, runtime, collision checks and one failed scenario. Steps 2–6 and 10 cover the planner comparison and obstacle edit; steps 6–9 plus the three-week plan investigate an unsafe point/footprint assumption. Chapter 16 planning background: https://www.srinivas.site/courses/applied-robotics/16-planning-stop-and-recovery/. This page is self-study, not an accredited course or a physical robot test.
Footprint and discretisation
A real robot occupies space and moves continuously. Grid inflation approximates a margin, while grid resolution sets how much detail a cell can represent. The toy model ignores orientation, vehicle dynamics, uncertainty and braking distance. Nav2’s official footprint guide shows how an actual navigation stack represents robot shape; it is further reading, not a result from this page.
- Hart, Nilsson & Raphael (1968), original A* paper (DOI): https://doi.org/10.1109/TSSC.1968.300136
- Modern Robotics, Chapter 10 Motion Planning: https://modernrobotics.northwestern.edu/chapters/chapter10/
- Nav2 setup guide: https://docs.nav2.org/rolling/configuration_and_development/first_time_robot_setup_guide/footprint/setup_footprint/