RRT

Also known as: Rapidly-exploring random tree

On this page 7

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.

  1. Sample: draw a random configuration from the space, often with a small goal bias so that 5-10% of samples are the goal itself.
  2. Nearest neighbor: find the tree node closest to the sample under a chosen distance metric.
  3. Steer: move from that node toward the sample by at most a fixed step size, producing a new candidate state.
  4. 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.

ParameterTypical rangeEffect when too smallEffect when too large
Step size0.1-1.0 mSlow growth, many nodesMissed narrow gaps
Goal bias0.05-0.2Slow convergence to goalGreedy, gets stuck at obstacles
Goal tolerance0.05-0.5 mGoal rarely reached exactlyImprecise final pose
Collision resolution1-10 cmExpensive checksSegments clip obstacles
Iteration limit1,000-100,000Frequent planning failureLong worst-case runtime
Core RRT parameters and their effects

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.

VariantMain ideaPath qualityTypical use
Basic RRTSingle tree, nearest extensionFeasible, not optimalQuick feasibility checks
RRT-ConnectTwo trees grown toward each otherFeasible, not optimalManipulator arm planning
RRT*Rewires neighbors to reduce costAsymptotically optimalOffline or slow-changing scenes
Informed RRT*Samples inside an ellipsoid after first solutionAsymptotically optimal, fasterLong-horizon optimal planning
Kinodynamic RRTExtends with control inputs over timeDynamically feasibleDrones, cars, legged robots
Common RRT variants compared

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.

MethodSearch spaceOptimalityDeterminismBest fit
RRTContinuous, sampledNoneRandomHigh-DOF arms, quick feasibility
A* on an occupancy gridDiscrete gridOptimal on gridDeterministic2D mobile robot maps
Hybrid A*Grid with continuous headingNear-optimalDeterministicCar parking and maneuvering
PRMContinuous, roadmapAsymptotic with PRM*RandomMany queries in a static scene
Dynamic window approachVelocity spaceLocal onlyDeterministicReactive obstacle avoidance
RRT versus related planning approaches

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.

SymptomLikely causeRemedy
Jagged, zigzag pathNo optimization stepPath shortcutting or smoothing
Fails in corridorsNarrow passage problemBridge or Gaussian sampling
Path ignores vehicle turning radiusHolonomic steering functionKinodynamic steering
Different path every runRandom samplingFixed seed for testing
Slow nearest-neighbor queriesLinear search over nodesk-d tree indexing
Typical RRT problems and remedies

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.