RRT, short for rapidly-exploring random tree, is a sampling-based motion planning algorithm that builds a tree of collision-free states by repeatedly sampling random points in the configuration space and extending the nearest tree node toward each sample. In robotics navigation, it is one of the standard methods for finding a feasible path through cluttered, high-dimensional spaces where grid search becomes impractical.
Introduced by Steven LaValle in 1998, RRT trades optimality for speed and generality: it finds a valid path quickly, even for robot arms with seven or more joints or vehicles with nonholonomic constraints, but the first path it returns is usually jagged and longer than necessary. Variants such as RRT* and RRT-Connect address those weaknesses.
How RRT grows its search tree
RRT grows a tree rooted at the start configuration through a simple loop that repeats until the tree reaches the goal region or a time budget expires. Each iteration consists of four steps, and the elegance of the method lies in how little each step requires.
- Sample: draw a random configuration from the space, often with a small goal bias so that 5-10% of samples are the goal itself.
- Nearest neighbor: find the tree node closest to the sample under a chosen distance metric.
- Steer: move from that node toward the sample by at most a fixed step size, producing a new candidate state.
- Collision check: if the motion segment is free of obstacles, add the new state as a child of the nearest node.
The key property is the Voronoi bias. Nodes on the frontier of the tree own large Voronoi regions, so random samples are most likely to fall closest to them, and the tree therefore expands preferentially into unexplored space. This is why the tree spreads rapidly instead of clustering around the start.
RRT is probabilistically complete: if a solution exists, the probability of finding it approaches one as the number of samples grows. It is not complete in the strict sense, and it cannot prove that no path exists, which matters when the planner must report failure reliably.
Key parameters of an RRT planner
The behavior of RRT depends on a small set of tuning parameters, and poor values are the most common reason a planner appears slow or unreliable. The table below summarizes what each parameter controls and typical starting values for a mobile robot on a 2D map.
| Parameter | Typical range | Effect when too small | Effect when too large |
|---|---|---|---|
| Step size | 0.1-1.0 m | Slow growth, many nodes | Missed narrow gaps |
| Goal bias | 0.05-0.2 | Slow convergence to goal | Greedy, gets stuck at obstacles |
| Goal tolerance | 0.05-0.5 m | Goal rarely reached exactly | Imprecise final pose |
| Collision resolution | 1-10 cm | Expensive checks | Segments clip obstacles |
| Iteration limit | 1,000-100,000 | Frequent planning failure | Long worst-case runtime |
The distance metric is an often-overlooked choice. For a planar point robot, Euclidean distance works well, but for a car-like vehicle, Euclidean distance ignores heading, and a metric based on Dubins or Reeds-Shepp curves gives far better nearest-neighbor choices.
RRT variants and how they differ
Many RRT variants exist because the basic algorithm leaves clear room for improvement in path quality, convergence speed and handling of narrow passages. The most widely used ones are compared below.
| Variant | Main idea | Path quality | Typical use |
|---|---|---|---|
| Basic RRT | Single tree, nearest extension | Feasible, not optimal | Quick feasibility checks |
| RRT-Connect | Two trees grown toward each other | Feasible, not optimal | Manipulator arm planning |
| RRT* | Rewires neighbors to reduce cost | Asymptotically optimal | Offline or slow-changing scenes |
| Informed RRT* | Samples inside an ellipsoid after first solution | Asymptotically optimal, faster | Long-horizon optimal planning |
| Kinodynamic RRT | Extends with control inputs over time | Dynamically feasible | Drones, cars, legged robots |
RRT* adds two operations: choosing the lowest-cost parent within a neighborhood radius and rewiring nearby nodes through the new node when that shortens their paths. The result converges toward the optimal path as samples increase, at the price of more computation per iteration.
RRT compared with other path planning methods
RRT occupies a specific niche among path planning approaches: it excels in high-dimensional or kinematically constrained spaces but rarely beats graph search on simple 2D maps. Choosing between them depends on dimensionality, map representation and the need for repeatable results.
| Method | Search space | Optimality | Determinism | Best fit |
|---|---|---|---|---|
| RRT | Continuous, sampled | None | Random | High-DOF arms, quick feasibility |
| A* on an occupancy grid | Discrete grid | Optimal on grid | Deterministic | 2D mobile robot maps |
| Hybrid A* | Grid with continuous heading | Near-optimal | Deterministic | Car parking and maneuvering |
| PRM | Continuous, roadmap | Asymptotic with PRM* | Random | Many queries in a static scene |
| Dynamic window approach | Velocity space | Local only | Deterministic | Reactive obstacle avoidance |
In a typical navigation stack, RRT acts as a global path planner, while a local planner such as pure pursuit or the dynamic window approach tracks the path and reacts to moving obstacles. In ROS 2, Nav2 ships grid-based planners by default, and sampling planners are usually added through the Open Motion Planning Library (OMPL).
Limitations and common mistakes with RRT
RRT has well-known failure modes that experienced practitioners plan for from the start. The randomness that gives the algorithm its speed also makes its output variable from run to run, which complicates testing and certification.
| Symptom | Likely cause | Remedy |
|---|---|---|
| Jagged, zigzag path | No optimization step | Path shortcutting or smoothing |
| Fails in corridors | Narrow passage problem | Bridge or Gaussian sampling |
| Path ignores vehicle turning radius | Holonomic steering function | Kinodynamic steering |
| Different path every run | Random sampling | Fixed seed for testing |
| Slow nearest-neighbor queries | Linear search over nodes | k-d tree indexing |
The narrow passage problem is the most serious limitation: when a gap occupies a tiny fraction of free space, uniform sampling rarely lands inside it. Another frequent mistake is treating the raw RRT output as final; production systems almost always apply post-processing such as shortcutting and spline fitting before execution.
In plain words
Imagine exploring a dark warehouse by throwing small balls in random directions and walking a few steps toward wherever each one lands, but only if nothing blocks the way. Every spot you reach becomes a branch you can grow from later. Soon your branches reach into every corner, and one of them touches the exit.
That is what RRT does for a robot. It does not plan the perfect route first. It quickly finds a route that works, and improved versions then straighten and shorten it.
A real-world example
A warehouse integrator equips a mobile manipulator with a seven-joint arm to pick items from crowded shelves. Grid search over seven joint angles would require billions of cells, so the team uses RRT-Connect through a motion planning library, with a step size of 0.05 radians and a 2-second planning budget.
In testing, the planner finds a collision-free arm motion in under 200 milliseconds for most bins. The raw paths contain unnecessary detours, so a shortcutting pass removes redundant waypoints and cuts execution time by roughly 30%. For the deepest shelves, where the gripper must pass through a narrow opening, the team adds goal-biased sampling near the opening, and failed plans drop from frequent to rare.