What is it? Methods that explore C-space by randomly sampling configurations and connecting them.
RRT: Grow tree from start toward random samples. RRT*: Optimal variant with rewiring. PRM: Build roadmap by sampling + connecting neighbors.
What is it? Methods that explore C-space by randomly sampling configurations and connecting them, avoiding explicit construction of C-space obstacles.
- Sample random point qrand
- Find nearest node qnear in tree
- Steer from qnear toward qrand by step size ε
- If collision-free, add new node to tree
- Find neighbors within radius r (not just nearest)
- Choose best parent - connect to neighbor giving lowest cost-to-come
- Rewire - check if new node is better parent for neighbors
r = γ·(log(n)/n)^(1/d)
- Connect new node to ALL collision-free neighbors in radius
- Multiple paths to each node (redundancy)
- Useful when you need alternative routes
- Learning phase: Sample N random configs, connect neighbors within radius r if collision-free → build roadmap graph
- Query phase: Connect start/goal to roadmap, run Dijkstra/A*
| Method | Optimal? | Multi-query? |
|---|---|---|
| RRT | No | No |
| RRT* | Yes (asymp.) | No |
| RRG | Yes (asymp.) | Partial |
| PRM | Roadmap-optimal | Yes |
RRT Steps
PRM Steps
Multi-Query Advantage:
Once roadmap is built, it can be reused for multiple start/goal queries without rebuilding!
Exam Questions & Answers
"Náhodné vzorkování konfiguračního prostoru místo explicitního výpočtu."
Single-query (RRT): Builds tree from scratch for each query. Better when environment changes.
"PRM = předzpracování, RRT = od nuly pro každý dotaz."
P(find path | path exists) → 1 as n → ∞
"Pravděpodobnost nalezení cesty jde k 1."
RRT: NOT asymptotically optimal (gets stuck in local minima).
RRT*, PRM*: ARE asymptotically optimal.
"RRT* konverguje k optimu, RRT ne."
- Sample random configuration qrand
- Find nearest node qnear in tree
- Steer: extend towards qrand by step Δq
- If collision-free, add new node to tree
- Repeat until goal reached
- Best parent selection: Check all neighbors within radius r, choose one giving lowest cost.
- Rewiring: After adding node, check if routing through it reduces cost for neighbors.
"Graf místo stromu - více hran, více cest."
RABIT*: Regionally Accelerated BIT* - combines batch sampling with heuristic guidance.
"Informované vzorkování v elipse možného zlepšení."
Nodes: 0
Path Cost: -
Ready
What is it? Planning problems involving visiting multiple goal locations, optimizing order and/or paths.
TSP: Visit all cities exactly once, minimize distance. TSPN: Visit regions instead of exact points. Dubins: Curved paths for vehicles with turning constraints.
What is it? Planning problems involving visiting multiple goal locations, optimizing order and/or paths. Related to the classic Traveling Salesman Problem.
- Input: Set of n points (cities)
- Output: Optimal tour (permutation)
- Complexity: NP-hard, O(n!) brute force
- Each goal is a disk/polygon region
- Robot must enter each region (anywhere inside)
- Optimizes both order and entry points
- Config: (x, y, θ) - position + heading
- Dubins curves: Shortest path is always CSC or CCC (C=arc, S=straight)
- 6 types: LSL, RSR, LSR, RSL, RLR, LRL
- Ring of neurons representing tour
- Learning: Present random city, pull nearest neuron and neighbors toward it
- Ring gradually wraps around all cities
- Fast approximation, not guaranteed optimal
Dubins length: L = ρ·(|α| + |β|) + d (for CSC)
SOM update: wi += η·h(i,winner)·(city - wi)
Multi-Goal Solver
Algorithm: Self-Organizing Map (SOM)
Status
Tour Length: 0
Neurons: 0
Add targets by clicking the map.
Dubins Path Demo
Interactive visualization of Dubins curves
How to use:
Left click: Set START position & heading
Right click: Set GOAL position & heading
Drag: Adjust heading direction
Current Path: RSR
Length: 0 units
Legend:
What you're seeing:
Each configuration has 2 turning circles (left & right). The Dubins path uses arcs on these circles connected by a straight tangent line.
CSC = arc + straight + arc
CCC = arc + arc + arc (no straight)
Exam Questions & Answers
TSPN: Visits regions (neighborhoods). Optimization of order AND specific location within region.
"TSP navštěvuje body, TSPN navštěvuje regiony/okolí."
- Constant forward speed v
- Limited turning radius ρ (cannot turn on spot)
- State: (x, y, θ) - position and heading
ẋ = v·cos(θ), ẏ = v·sin(θ), θ̇ = u/ρ"Konstantní rychlost, omezený poloměr otáčení."
CSC: Curve-Straight-Curve (e.g., LSL, RSR, LSR, RSL)
CCC: Curve-Curve-Curve (e.g., LRL, RLR)
L=Left turn, R=Right turn, S=Straight
"Maximálně 3 segmenty: oblouky a přímky."
Dubins TSP: Distance depends on position AND heading (θ). Paths are curves. Asymmetric! d(A→B) ≠ d(B→A)
"DTSP závisí na poloze i směru, asymetrické vzdálenosti."
Admissible solution: Visits all goals, respects robot constraints.
Objective: Minimize total path length or time T.
"Trajektorie navštíví všechny regiony."
- Winner: Neuron closest to selected target
- Update: Winner + neighbors move toward target
- TSPN mod: Attract to closest point in region, not center
Noon-Bean transformation: Convert GTSP to Asymmetric TSP by adding zero-cost edges within clusters.
"Navštiv právě jeden bod z každého clusteru."
Christofides: MST + matching + Eulerian, 3/2-approximation for metric TSP
2-opt, 3-opt: Local search improvements
"Christofides garantuje 1.5× optimum."
OP: Budget constraint B, maximize collected prizes
Goals have prizes pi. Find route with total length ≤ B maximizing Σpi.
"Rozpočet na cestu, maximalizuj zisk."
Solution: Discretize headings at each goal, build graph, find shortest path.
Lower bound: Sum of minimum Dubins distances between consecutive goals.
"Pořadí dané, optimalizuj směry příjezdu."
Approaches:
- Decoupled: Solve TSPN first, then optimize Dubins paths
- Sampling: Sample boundary points, solve as DTSP
- SOM-based: Adapted neural network approach
Coupled: Solve jointly considering all constraints. Better solutions but harder.
"Decoupled = rychlejší, Coupled = lepší řešení."
What is it? Discretize continuous space into a grid. Each cell is free or occupied. Plan by searching the grid graph.
A*: f(n)=g(n)+h(n), optimal with admissible heuristic. Theta*: Any-angle paths via line-of-sight checks. JPS: Faster A* by pruning symmetric paths.
What is it? Discretize continuous space into a grid (occupancy map). Each cell is free or occupied. Plan by searching the grid graph.
f(n) = g(n) + h(n)
- g(n): Actual cost from start to n
- h(n): Heuristic (estimated cost to goal)
- f(n): Total estimated cost through n
Optimal if: h(n) is admissible (never overestimates).
- If parent's parent is visible → connect directly (shortcut)
- Results in smoother, shorter paths
if lineOfSight(parent(s), s'): parent(s') = parent(s)
- g(s): Current cost estimate
- rhs(s): One-step lookahead cost
- Consistent: g(s) = rhs(s)
- Inconsistent: g(s) ≠ rhs(s) → needs update
- Jump Points: Nodes where path direction must change
- Forced Neighbors: Neighbors that become relevant due to obstacles
- Pruning: Skip nodes reachable optimally via parent
Cfree: Collision-free configurations.
Minkowski Sum: For disk robot radius r, expand obstacles by r.
Distance Transform: Each cell stores distance to nearest obstacle (brushfire algorithm).
Visibility Graph: Connect visible obstacle corners → shortest polygonal path.
Manhattan: |Δx| + |Δy| - admissible for 4-connected
Diagonal: max(|Δx|, |Δy|) + (√2-1)·min(|Δx|, |Δy|)
Grid Planner
Left Click: Toggle Wall (Trigger Replanning)
Right Click: Move Start
Shift + Click: Move Goal
Results
Path Cost: 0
Visited Nodes: 0
Ready
Configuration Space
Workspace → C-space transformation
Legend:
How C-space works:
For a disk robot with radius r, obstacles are expanded by r (Minkowski sum).
The robot becomes a point in C-space. If the point is in Cfree, the disk robot doesn't collide.
"Překážky se zvětší o poloměr robota."
Distance Transform
Brushfire algorithm visualization
Distance Color Scale:
Watch wavefront expand from obstacles
Max Distance: 0 cells
Safest Point: (0, 0)
What is Distance Transform?
Each cell stores distance to nearest obstacle.
Brushfire Algorithm: BFS wavefront from all obstacles simultaneously. Layer by layer expansion.
Applications:
- Path planning with clearance (stay away from walls)
- Voronoi diagram approximation (ridges = equidistant)
- Navigation functions
"Vzdálenost ke stěnám pro bezpečné plánování."
Visibility Graph & Voronoi
Geometric path planning methods
Visibility Graph Legend:
Voronoi Diagram Legend:
Voronoi edges maximize clearance from obstacles
What is a Visibility Graph?
Vertices: Start, Goal, and all obstacle corners (convex hull vertices).
Edges: Connect vertices if the line segment doesn't intersect any obstacle interior.
Shortest path: Run Dijkstra/A* on the graph. The result is the optimal path among all polygonal paths.
Complexity: O(n² log n) where n = number of vertices.
"Spojíme viditelné rohy - nejkratší cesta je na hranách."
What is a Voronoi Diagram?
Definition: Partitions space into regions closest to each obstacle.
Edges: Points equidistant from two or more obstacles.
For path planning: Path along Voronoi edges maximizes clearance from obstacles (safest path).
Approximation: Ridge detection on Distance Transform gives Voronoi-like skeleton.
"Voroného diagram = maximální vzdálenost od překážek."
Vis Graph vs Voronoi:
| Vis Graph: | Shortest path, touches obstacles |
| Voronoi: | Safest path, max clearance |
Exam Questions & Answers
Cfree: The subset of C where the robot does not collide with obstacles.
Cobs: C \ Cfree - configurations in collision.
"C = všechny pózy, Cfree = pózy bez kolize."
Trajectory: A path with timing information σ(t), specifying when robot is at each configuration.
"Cesta = geometrie, trajektorie = cesta + čas."
"Diskretizace světa na mřížku + prohledávání grafu."
h(n): Heuristic estimate from n to goal
f(n): Total estimated cost through n
A* expands node with lowest f(n). Optimal if h is admissible (never overestimates).
"f = g + h, vybíráme nejmenší f."
Theta*: "Any-angle" planning. Checks line-of-sight to the parent's parent. If visible, creates shortcut diagonal edge.
if lineOfSight(parent(s), s'):
parent(s') = parent(s)"Theta* vidí 'zkratku' přes souseda."
Key concepts:
- Jump Points: Nodes where direction must change
- Forced Neighbors: Neighbors revealed by obstacles
- Pruning: Skip nodes reachable via parent
Same optimal path as A*, but explores far fewer nodes.
"Skáče přes prázdné buňky, zastaví u překážek."
Key concepts:
- g(s): Current cost estimate
- rhs(s): One-step lookahead cost
- Consistent: g(s) = rhs(s)
- Inconsistent: g(s) ≠ rhs(s) → needs update
"Inkrementální - přepočítá jen nutné minimum."
- Line-of-sight checks (Theta*)
- Collision detection on grids
- Ray casting for sensor simulation
Benefits: Simple, no explicit graph needed.
Drawback: May not find optimal path on discretized grid.
"Vzdálenost od překážek → gradient k cíli."
"Přeskakuje nudné uzly, hledá důležité body."
Voronoi Diagram: Path maximally far from all obstacles. Safer but longer path.
"Visibility = nejkratší, Voronoi = nejbezpečnější."
What is it? Robot explores unknown environment, building a map while deciding where to go next.
Occupancy Grid: Probabilistic map with P(occupied). Frontiers: Boundaries between known and unknown space. D* Lite: Incremental replanning for changing environments.
What is it? Robot explores unknown environment, building a map while deciding where to go next. Combines mapping, localization, and planning.
- P(m) = 0.5: Unknown
- P(m) → 1: Likely occupied
- P(m) → 0: Likely free
l(m) = log(P(m)/(1-P(m)))
- Cells along ray → decrease P(occupied)
- Cell at endpoint → increase P(occupied)
- High accuracy, narrow cone
- Wide cone of uncertainty
- Can't tell exactly where obstacle is within cone
- Multiple readings needed to narrow down
- Detect frontier cells (free cell adjacent to unknown)
- Cluster frontiers into regions
- Select best frontier (nearest, largest, most info gain)
- Plan path to frontier, execute, repeat
- Nearest: Minimize travel (greedy)
- Largest: More area to explore
- Info gain: Expected reduction in map entropy
- Combined: gain/cost ratio
Ray casting: Trace sensor beam through grid
Coverage: % of environment mapped
Next-Best-View: Where to look next for max info
Frontier Exploration
Occupancy Grid + Frontier-based
Click canvas: Move robot to location
Play: Auto-explore (find frontiers)
Reset: New random environment
Legend:
Stats
Explored: 0%
Frontiers: 0
Ready
Exam Questions & Answers
- P(occupied) = 0 → definitely free
- P(occupied) = 1 → definitely obstacle
- P(occupied) = 0.5 → unknown
- Cells are completely free OR occupied (binary)
- Cells are independent of each other
- Environment is static
Laser: Narrow beam, high accuracy, may miss transparent objects.
Update: Use log-odds for numerical stability.
"Sonar = široký kužel, Laser = úzký paprsek."
Frontiers represent areas worth exploring.
"Hranice mezi známým volným a neznámým prostorem."
- Sense and update map
- Detect frontier cells
- Cluster frontiers into regions
- Select best frontier (size, distance, info gain)
- Navigate to selected frontier
- Repeat until no frontiers remain
- Task allocation (who explores where?)
- Map merging and alignment
- Communication constraints
- Avoiding redundant exploration
Potential field: Robots repel each other, attract to frontiers.
Greedy assignment: Each robot takes nearest unassigned frontier.
"Aukce, potenciálová pole, nebo greedy přiřazení."
l(m|z) = l(m|zt) + l(m) - l0Where l = log(p/(1-p)). Avoids numerical issues with multiplying small probabilities.
"Log-odds pro numerickou stabilitu."
IG(f) = H(map) - H(map | visit f)Frontiers with high information gain are preferred.
"Očekávané snížení entropie mapy."