Move away to find a way around.
The goal is to the right, but the route first turns down. Execute a few steps, then inspect the completed search. Which controls move the robot?
05 / Motion & navigation · Beginner
Would you move away from the goal?
A wall changes the route. A* (A-star) searches the known map.
Then one robot follows the waypoints.
An interactive browser simulation. A complete known map, exact position and planar point motion. The 3D view adds no flight dynamics or live execution.
No previous workshop needed.
Before you begin
The robot must leave the U before going around it. After one second, it is slightly farther from the goal. Follow the whole route to see why.
Explore the four questionsA* ranks cells by g + Manhattan h. Dijkstra sets h = 0. Both seek the shortest route on this four-neighbor unit-cost graph.
A single robot knows the full static map, start and goal. No coordinator, peer messages or network is involved.
Move toward one waypoint at 1 m/s, clamp at arrival, then take the next. The direct baseline supplies only the goal.
Planning has zero modeled time; execution uses 0.1 s steps. No body radius, heading dynamics, GPS loss or uncertain estimates.
Optimality boundary: the shortest grid route is not necessarily the shortest continuous-space route or a feasible trajectory for a real vehicle. The 3D drone uses a fixed 0.8 m display height; walls keep exact blocked-cell footprints. Aircraft size and heading do not change point-contact evaluation.
01 / Try it
■ WallO Frontier× Settled┄ Planned route━━ Actual trail
S: start · G: goal · A: robot. Select a cell to inspect search costs. Robot marker size is illustrative; this is point motion.
Inspect the completed search
This is the search completed before motion. Its controls show the history computed in this browser; the robot and final route stay unchanged. This is not a recording from an external system.
g: discovered cost from start · h: remaining lower bound · f = g + h. Costs are metres. Unknown is not zero.
Watch the movement
Goal distance can rise while a valid route goes around a wall. Search does not give the follower an avoidance controller.
Each graph edge joins free cell centers. Turns are instantaneous; a vehicle with size or turning constraints needs a different model.
02 / Follow a question
Change the search, remove the planner or close the only opening.
The goal is to the right, but the route first turns down. Execute a few steps, then inspect the completed search. Which controls move the robot?
A* and Dijkstra both plan 17 m on this map. A* pops 30 cells; Dijkstra pops 95. What changes when the search has an estimate of the remaining distance?
Direct motion reaches the goal on open ground. Add the U wall and the same follower makes contact after 1.5 s. The evaluator stops it at the wall.
Seal the opening. Both searches exhaust six reachable cells, then report no path. No waypoint is issued; the robot stays at its start.
Each case starts paused. Diagrams use the model’s map and routes. Search pops count selected cells, including the goal; they do not measure computing time.
Identical starts, goals, maps and follower. A* and Dijkstra optimize graph distance; the direct baseline skips obstacle planning.
| Map | Method | Outcome | Planned | Travelled | Motion time | Search pops |
|---|
03 / Go deeper
A* adds the distance found so far to a lower bound on what remains. On this grid, Manhattan distance counts horizontal and vertical steps while ignoring walls.
All three costs are in metres. The initial score is 0 + 7 = 7. Walls make the shortest route on this grid 17 m.
Dijkstra uses h = 0, so only the discovered cost g determines its score.
f(n) = g(n) + h(n)
h(n) = |xₙ − x_goal| + |yₙ − y_goal|
Dijkstra: h(n) = 0
Every free horizontal or vertical edge costs 1 m. Relax a neighbor only when the candidate cost is strictly lower; store the predecessor.
For adjacent cells, h(n) ≤ 1 + h(neighbor). Settled nodes need no reopening under this condition. Different heuristics need different checks.
Select smallest f, then smallest h, then cell ID. Stop when the goal is popped. An empty frontier means no route exists in this graph.
Move at most v·dt toward the next waypoint and clamp at arrival. The evaluator checks the whole segment for contact. Finding a path is not reaching the goal.
Primary sources: Hart, Nilsson & Raphael (1968), A Formal Basis for the Heuristic Determination of Minimum Cost Paths ↗; Dijkstra (1959), A Note on Two Problems in Connexion with Graphs ↗, Problem 2. The kinematic follower and collision evaluator are separately declared teaching models.
Shortest means shortest on this four-neighbor grid. A vehicle with size, turning limits or uncertain position needs additional models. The final route remains visible while you inspect earlier search snapshots; it is the completed search’s result.
Keep the thread
Follow a known route with noisy measurements. Compare dead reckoning and Kalman filtering, and see how a reported arrival can differ from reality.