🛰️ UAV Path Planning: RRT* & Potential Fields
Plan a collision-free 3D flight path for a drone through boxes, spheres and a no-fly zone. Grow a real RRT* search tree — sampling, nearest-neighbour connection, collision checking and rewiring for asymptotic optimality — or switch to reactive potential-field steering and watch it get trapped in a concave obstacle's local minimum.
Click and drag to orbit · Scroll to zoom
RRT* — Rapidly-Exploring Random Tree (star variant)
RRT* incrementally builds a tree from the start: sample a random point, steer from the nearest tree node toward it by one step, and add it if the segment is collision-free. Unlike plain RRT, RRT* also rewires nearby nodes through the new node whenever that lowers their cost-to-come, which makes the extracted path converge toward the shortest collision-free path as sampling continues — a property called asymptotic optimality.
RRT* vs. Potential Fields
RRT* (global, sampling-based) —
Explores the whole free space by growing a randomized tree and
rewiring it, so it is complete (will find a path if one exists,
given enough samples) and asymptotically optimal (the path cost
keeps improving toward the true minimum). It has no notion of
"getting stuck" — a concave obstacle just costs more tree
growth, not failure.
Potential fields (local, reactive) —
Sums an attractive pull toward the goal with repulsive pushes
away from nearby obstacles into one steering force, computed
fresh every frame. It is cheap and reactive to moving obstacles,
but it is a purely local method: around a concave "trap"
obstacle the attractive and repulsive forces can cancel to zero
before the goal is reached, stalling the drone in a local
minimum it cannot escape without extra logic (random walks,
wall-following, or switching to a global planner like RRT*).