Rapidly-Exploring Random Tree

Simulation
Introduced by
Steven M. LaValle
Year
1998
Type
algorithm
Family
Motion Planning

What does it do?

The Rapidly-Exploring Random Tree (RRT) is a sampling-based motion planning algorithm.

It grows a tree of collision-free paths from a start configuration by repeatedly sampling random configurations and extending the nearest tree node toward each sample. LaValle introduced it as a tool for path planning, and it is used to find feasible paths for systems whose configuration spaces have many dimensions and obstacles. RRT returns a feasible path, not an optimal one.

The intuition behind the method

RRT starts a tree at the start configuration and repeats four operations: draw a random configuration, find the nearest node already in the tree, move a limited distance from that node toward the sample, and keep the new configuration only if the connecting segment is collision-free. Because each new node grows from the nearest existing node toward a random point, the tree tends to expand into unexplored parts of the configuration space (C-space). The obstacles are not stored as an explicit grid; they are tested only along the segments the algorithm actually proposes. Once a node reaches the goal region, the path is read off the tree from the start to that node.

History

LaValle introduced the Rapidly-exploring Random Tree as a tool for path planning (lavalle1998). Karaman and Frazzoli (2011) analysed the asymptotic cost of sampling-based planners and showed that, under mild technical conditions, broadly used algorithms of this class converge almost surely to non-optimal solution costs. They also introduced RRT* as an asymptotically optimal variant. Many further variants have since been proposed.

When to use it

Choose RRT when the configuration space has many dimensions, the obstacles are complex, and the goal is a single feasible path obtained quickly, for example manipulator planning or vehicle planning under kinematic constraints. It suits offline planning in a known, static environment, where feasibility matters more than path quality. Do not use plain RRT when the path must be optimal or near-optimal; the asymptotically optimal variant RRT* (karaman2011) is designed for that case. Avoid RRT in low-dimensional spaces, where grid or graph search is simpler and exact, and in environments whose obstacles move during planning, because the method plans against a fixed obstacle set.

Limitations and considerations

  • Under mild technical conditions, the returned paths are feasible but generally not optimal: karaman2011 shows that broadly used sampling-based algorithms, such as probabilistic roadmaps and RRT, converge almost surely to a non-optimal solution cost.
  • The first feasible connection found determines the path, so the result is often longer and less direct than a hand-designed path.
  • Step size and goal-bias probability together affect both convergence speed and path quality, so tuning usually requires testing on the target environment.
  • Nearest-neighbour queries become more expensive as the tree grows and the dimension increases, and this can dominate the runtime.
  • The method plans offline against a fixed obstacle set and does not handle obstacles that move during planning.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Probabilistically complete: karaman2011 lists probabilistic completeness among the theoretical guarantees of sampling-based planners such as RRT, so a solution is found with probability approaching one, if one exists, as the number of samples grows.
  • Does not discretise the configuration space, so it can be applied in high-dimensional spaces where grid-based search becomes impractical.
  • Obstacles are tested only along the segments the algorithm proposes, so no explicit map of the C-space needs to be built.
  • Kinematic constraints can be respected by replacing the straight-line extension with a steering rule for the system, while the sampling and nearest-neighbour steps stay the same.
  • The core loop is short and has few parameters (step size, goal-bias probability and iteration limit), which makes it straightforward to implement.

Applications

  • Manipulator motion planning, producing collision-free configuration paths that respect joint limits.
  • Navigation of mobile robots through cluttered environments with obstacles.
  • Planning for systems with kinematic or non-holonomic constraints, where the extension step must follow the system's motion model.

How it works

How it works

1

Create a tree T that contains only the start configuration q_start. Set the iteration limit N_max and the step size delta_q, which together control how long the search runs and how far each extension reaches.

2

Draw a random configuration q_rand from the configuration space C. With probability p_goal, use the goal configuration q_goal as the sample instead, so that some extensions are aimed directly at the goal.

3

Find the node q_near in T that is nearest to q_rand under the chosen distance (Euclidean or a scaled metric). Move from q_near toward q_rand by at most delta_q to obtain the candidate node q_new: q_new = q_near + min(delta_q, ||q_rand − q_near||) · (q_rand − q_near) / ||q_rand − q_near||, where ||·|| is the norm of the chosen metric. For systems with non-holonomic constraints, this straight-line step is replaced by a steering rule that respects the system's motion model.

4

Test the segment from q_near to q_new for collisions. If the segment is collision-free, add q_new to T as a child of q_near. If q_new lies within a goal tolerance of q_goal, i.e. ||q_new − q_goal|| ≤ tolerance, stop and return the path of nodes from q_start to q_new. If N_max is reached first, report that no path was found.

Common pitfalls

  • A step size delta_q that is too large makes many extensions collide and be discarded; one that is too small makes the tree grow slowly and needs many more iterations.
  • A high goal-bias probability p_goal spends many samples near the goal and reduces exploration of the rest of the C-space, so obstacles between start and goal may remain unexplored.
  • Using unscaled Euclidean distance across joints with different ranges lets some joints dominate the nearest-neighbour choice; the metric should reflect the joints' units and ranges.
  • Checking only the endpoint q_new, and not the whole segment from q_near to q_new, admits paths that pass through obstacles.

Frequently asked questions

How do I choose the step size delta_q?

There is no universal value. Choose delta_q relative to the scale of the configuration space and to the clearance around obstacles. A step much larger than the narrow passages in the environment makes most extensions collide, while a very small step makes the tree grow slowly. Testing a few values on the target environment and watching how many extensions are rejected is the practical way to set it.

What is goal-biasing and how does it affect RRT?

Goal-biasing means that, with probability p_goal, the goal configuration is used as the sample instead of a random configuration. This directs growth toward the goal and can speed up the discovery of a path. The value trades faster goal-directed growth against exploration: a large p_goal makes the tree concentrate near the goal and can prevent the search from finding a route around an obstacle, so p_goal should be tested on the target environment.

Can RRT handle non-holonomic constraints (e.g., car-like robots)?

Yes, by changing the extend step. Instead of straight-line interpolation from q_near toward q_rand, the candidate node is computed with a steering method that respects the system's motion model, so each edge is feasible for the robot. The sampling and nearest-neighbour logic stays the same. Whether a suitable steering method is available depends on the system.

Why is RRT not optimal?

The basic algorithm stops as soon as the tree reaches the goal, so the path it returns is the first feasible one found, which is generally not the shortest. Karaman and Frazzoli (2011) introduced RRT*, which also considers nearby nodes when a new node is added and rewires the tree to reduce path cost. They showed that RRT* converges almost surely to the optimal cost as the number of samples increases.

Related methods

Sources

  1. LaValle, S. M. (1998). Rapidly-exploring random trees: A new tool for path planning. Technical Report TR 98-11, Iowa State University.

    Open publication reference
  2. Karaman, S., & Frazzoli, E. (2011). Sampling-based algorithms for optimal motion planning. International Journal of Robotics Research, 30(7), 846-894.

    Open DOI reference
  3. LaValle, S. M. (2006). Planning Algorithms. Cambridge University Press.

    Open publication reference