Finding collision-free paths through complex environments. From graph search to sampling-based algorithms to trajectory optimization โ the algorithms that give robots autonomy.
Motion planning is the problem of finding a feasible (and ideally optimal) path or trajectory for a robot from a start configuration to a goal configuration, avoiding collisions with obstacles and respecting kinematic and dynamic constraints. It is also known as the "piano mover's problem" โ coined by Schwartz and Sharir (1983) โ because it generalizes to moving any rigid body through a cluttered environment.
The general motion planning problem is PSPACE-hard (Reif, 1979). For a robot with n DOFs, the configuration space is n-dimensional. The obstacle region in C-space (C-obstacle) has complex geometry that is expensive to compute explicitly. This complexity motivates the use of sampling-based methods that avoid explicit C-obstacle computation.
The configuration space (C-space), introduced by Tomas Lozano-Perez (1983), is the space of all possible configurations of the robot. Each point in C-space represents a complete specification of the robot's position โ typically the vector of joint angles for a manipulator or (x, y, theta) for a planar mobile robot.
| Robot | C-Space | Dimension |
|---|---|---|
| Point robot in 2D | R^2 | 2 |
| Rigid body in 2D | R^2 x SO(1) = SE(2) | 3 |
| Rigid body in 3D | R^3 x SO(3) = SE(3) | 6 |
| 2-link planar arm | T^2 (torus) | 2 |
| 6-DOF industrial arm | T^6 | 6 |
| 7-DOF arm (KUKA iiwa) | T^7 | 7 |
| Humanoid (30 DOF) | SE(3) x T^24 | 30 |
The most computationally expensive part of motion planning. Given a configuration q, determine whether the robot at q intersects any obstacle. Methods:
Different planning algorithms offer different guarantees:
Discretize C-space into a graph (grid, lattice, or visibility graph), then search for the shortest path.
Explores all nodes at the current depth before moving to the next depth level. Guaranteed to find the shortest path in an unweighted graph. Time and space complexity: O(V + E). Used for simple grid-based planning when all movements have equal cost.
Finds the shortest path in a weighted graph. Maintains a priority queue of nodes ordered by distance from the start. Explores the nearest unexplored node at each step. Optimal but explores in all directions uniformly โ inefficient when the goal location is known. Time complexity: O((V + E) log V) with a binary heap.
The most important search algorithm in robotics. Combines Dijkstra's actual cost g(n) with a heuristic estimate h(n) of the remaining cost to the goal:
A* expands the node with the lowest f(n). If h(n) is admissible (never overestimates the true cost) and consistent (satisfies the triangle inequality), A* is optimal and explores the minimum number of nodes among admissible algorithms. Published by Hart, Nilsson, and Raphael (1968) at SRI International.
Use f(n) = g(n) + w * h(n) with w > 1. This inflates the heuristic, making the search more greedy (faster) at the cost of optimality. The solution cost is at most w times the optimal cost. In practice, w = 1.5-3 gives a good speed/quality trade-off.
Incremental search algorithms for dynamic environments. When the environment changes (new obstacle detected), D* Lite (Koenig & Likhachev, 2002) efficiently repairs the existing search tree rather than replanning from scratch. Used in Mars rovers (Spirit and Opportunity used a variant of D*) and autonomous vehicles.
Discretize the C-space into a state lattice: a regular graph where edges correspond to dynamically feasible motion primitives (precomputed short trajectories that respect the robot's dynamics). Pivonka and Kelly (2005) introduced lattice planners for field robots. Used in the DARPA Urban Challenge (CMU's Boss) and many autonomous driving systems. Graph search (A* or ARA*) on the lattice guarantees feasible, dynamically consistent paths.
Artificial potential field methods, introduced by Oussama Khatib (1986), treat the robot as a particle in a potential field. The goal generates an attractive potential that pulls the robot toward it; obstacles generate repulsive potentials that push the robot away. The robot follows the negative gradient of the total potential.
Typically a quadratic function of distance to the goal: U_att(q) = 0.5 * k_att * ||q - q_goal||^2. The gradient is a constant force toward the goal. For large distances, a conic (linear) potential prevents excessive force.
Active only within a threshold distance d_0 from obstacles: U_rep(q) = 0.5 * k_rep * (1/d(q) - 1/d_0)^2 when d(q) < d_0, and 0 otherwise. The force grows rapidly as the robot approaches an obstacle, creating a repulsive "force field."
The fatal flaw of potential fields: the robot can get trapped in local minima where attractive and repulsive forces balance. Classic example: a U-shaped obstacle between the robot and goal. Solutions:
Despite the local minima problem, potential fields are widely used as a reactive layer for real-time obstacle avoidance, especially in mobile robotics. The Vector Field Histogram (VFH, Borenstein & Koren, 1991) and its successor VFH+ are practical implementations used in ROS's navigation stack.
Instead of explicitly constructing C-free (computationally intractable for high-DOF robots), sampling-based methods probe C-space by randomly sampling configurations and checking them for collisions. This approach scales to high-dimensional C-spaces where grid-based methods are infeasible.
The Rapidly-exploring Random Tree (RRT), introduced by Steven LaValle (1998), is the most influential sampling-based planning algorithm. It incrementally builds a tree rooted at the start configuration, expanding toward random samples to explore C-free.
function RRT(q_start, q_goal, max_iter):
T.init(q_start)
for i = 1 to max_iter:
q_rand = random_config() // uniform random in C-space
q_near = nearest(T, q_rand) // nearest node in tree
q_new = steer(q_near, q_rand, step_size) // extend toward q_rand
if collision_free(q_near, q_new):
T.add_node(q_new)
T.add_edge(q_near, q_new)
if distance(q_new, q_goal) < threshold:
return extract_path(T, q_start, q_new)
return FAILURE
Kuffner & LaValle (2000) introduced bidirectional RRT: grow two trees, one from start and one from goal, and try to connect them. The CONNECT heuristic extends the tree greedily (multiple steps) toward the other tree's nearest node rather than taking a single step. RRT-Connect is typically 10-100x faster than basic RRT and is the default planner in MoveIt (the ROS manipulation planning framework).
Karaman & Frazzoli (IJRR 2011) proved that basic RRT converges to a suboptimal path with probability 1. They introduced RRT*, which adds two operations to make the algorithm asymptotically optimal:
RRT* converges to the optimal path as the number of samples increases, but convergence is slow. In practice, it produces significantly better paths than RRT given enough time.
| Variant | Key Idea | Reference |
|---|---|---|
| Informed RRT* | Restrict sampling to ellipsoidal region after initial solution | Gammell et al. (2014) |
| BIT* (Batch Informed Trees) | Combines RRT* and PRM*; processes samples in batches | Gammell et al. (2015) |
| AIT* (Adaptively Informed Trees) | Adapts between RRT*-like and FMT*-like processing | Strub & Gammell (2020) |
| Kinodynamic RRT | Accounts for dynamic constraints (velocity, acceleration limits) | LaValle & Kuffner (2001) |
| RRT-X | Rewiring for dynamic environments; repairs tree when obstacles move | Otte & Frazzoli (2016) |
The Probabilistic Roadmap Method (PRM), introduced by Kavraki, Svestka, Latombe, and Overmars (1996), takes a different approach: build a reusable graph (roadmap) of C-free in a preprocessing phase, then query it for any start-goal pair.
Construction phase (offline):
Query phase (online):
Simeon et al. (2000) proposed keeping only "guard" and "connector" nodes: a new sample becomes a guard if it sees no existing guards, or a connector if it connects two guards. This produces a much sparser roadmap with the same coverage.
Bohlin & Kavraki (2000): delay collision checking of edges until they are needed for a query. Assume all edges are valid, find the shortest path, then check edges along that path for collisions. If a collision is found, remove the edge and replan. Saves enormous computation when most edges are never used.
Instead of searching through discrete samples or graph nodes, trajectory optimization treats motion planning as a continuous optimization problem: find the trajectory q(t) that minimizes a cost functional subject to constraints.
Ratliff et al. (2009, CMU) proposed CHOMP: represent the trajectory as a sequence of waypoints and optimize using functional gradient descent. The cost combines a smoothness term (penalizes acceleration) and an obstacle cost (based on signed distance to obstacles). CHOMP uses precomputed signed distance fields for fast gradient computation. Available in MoveIt.
Kalakrishnan et al. (2011, USC) introduced STOMP: generate noisy trajectory samples around the current trajectory, evaluate their costs, and update the trajectory as a cost-weighted average. Unlike CHOMP, STOMP does not require gradient information โ it works with arbitrary cost functions (useful when the cost is non-differentiable). Also available in MoveIt.
Schulman et al. (2014, UC Berkeley) formulated motion planning as sequential convex optimization. Obstacle avoidance is a constraint (not a cost term), using signed distances and their linear approximations. Supports continuous-time collision checking (swept volumes). Fast convergence. Used in planning for manipulation and autonomous driving.
Transcribe the continuous-time optimal control problem into a finite-dimensional nonlinear program (NLP) by discretizing the trajectory into N time steps. Decision variables: states and controls at each knot point. Dynamics are enforced as equality constraints (collocation = using polynomial interpolation between knot points). Solved with NLP solvers (IPOPT, SNOPT). This is the standard approach in Drake (MIT) for kinodynamic planning.
| Aspect | Sampling-Based (RRT/PRM) | Trajectory Optimization |
|---|---|---|
| Completeness | Probabilistically complete | Local optimizer โ needs good initialization |
| Optimality | RRT* is asymptotically optimal | Finds local optimum |
| Narrow passages | Handles well (eventually) | May fail if initialization is on wrong side |
| Solution quality | Jagged without smoothing | Smooth by construction |
| Speed | Fast first solution, slow to optimize | Fast if initialized well |
| Dynamic constraints | Hard to incorporate | Natural via constrained optimization |
In practice, the best systems combine both: use RRT/PRM for an initial feasible path, then refine with trajectory optimization for smoothness and dynamic feasibility.
Static planning assumes a known, fixed environment. Real robots operate in dynamic environments where obstacles move, new obstacles appear, and the environment is only partially known. Real-time replanning adapts the plan as new information arrives.
MoveIt (ROS) uses RRT-Connect, PRM, CHOMP, and STOMP for arm motion planning in cluttered environments. Pick-and-place, assembly, and bin picking all require collision-free arm trajectories planned in joint space or Cartesian space.
Self-driving cars plan in structured environments (lanes, intersections). Lattice planners, optimization-based planners (CasADi), and RL-based planners generate trajectories that respect traffic rules, comfort, and safety. Waymo, Cruise, and Motional all use trajectory optimization variants.
UAV planning requires fast 3D path planning with dynamic constraints. Minimum-snap trajectory optimization (Mellinger & Kumar, 2011) produces smooth polynomial trajectories for quadrotors. EGO-Planner (Zhou et al., 2020) enables aggressive autonomous flight through unknown environments.
Planning for multiple robots simultaneously. Conflict-Based Search (CBS, Sharon et al., 2015) finds optimal collision-free paths for teams of agents. Priority-based planning assigns robot priorities and plans sequentially. Used in Amazon warehouse robots (Kiva/Amazon Robotics) coordinating hundreds of agents.
Motion planning for surgical robots must avoid sensitive anatomy, pass through small incisions (remote center of motion constraint), and handle deformable tissue. Special-purpose planners for needle steering, catheter navigation, and instrument insertion.
Footstep planning and whole-body motion planning for humanoids and quadrupeds. The footstep planning problem is a discrete search over contact locations. Whole-body planning then generates dynamically feasible trajectories between contacts. Mixed-integer programming and graph search on contact sequences.
THE definitive textbook on motion planning. Covers C-space, combinatorial planning, sampling-based planning, differential constraints, and decision-theoretic planning. Free online.
Introduced RRT* and PRM*. Proved that basic RRT almost surely converges to a suboptimal path. The paper that made asymptotic optimality a standard requirement.
The original PRM paper. Demonstrated that sampling-based planning scales to high-dimensional C-spaces where deterministic methods fail.
The most widely used open-source motion planning framework for robot arms. Integrates OMPL (sampling-based planners), CHOMP, STOMP, and Pilz industrial trajectory generator.
Library of sampling-based planners: RRT, RRT*, RRT-Connect, PRM, PRM*, BIT*, EST, KPIECE, and more. Backend for MoveIt. Created at Rice University (Kavraki Lab).
TrajOpt paper. Sequential convex optimization for motion planning with continuous-time collision checking. Fast and practical for manipulation planning.