Motion Planning
Problem Formulation
The motion planning problem (piano mover's problem): given a robot with geometry, a workspace with obstacles, a start configuration, and a goal configuration, find a continuous collision-free path from start to goal, or determine that none exists.
The problem is fundamental to robotics, game AI, autonomous vehicles, and computational biology (protein folding).
Complexity: deciding if a path exists for a robot with degrees of freedom among polyhedral obstacles is PSPACE-complete (Reif, 1979). For fixed , polynomial algorithms exist but with impractical exponents.
Configuration Space
The configuration space (C-space) is the space of all possible configurations of the robot. Each point in fully specifies the robot's position and orientation.
- Translating robot in 2D: (position only)
- Translating and rotating rigid body in 2D: (3 DOF)
- Rigid body in 3D: (6 DOF)
- -link planar arm: ( DOF, a torus)
- Humanoid robot:
C-space obstacle : the set of configurations where the robot intersects an obstacle. For a translating convex robot and convex obstacle : (Minkowski sum with the reflected robot).
Free space : the space of collision-free configurations.
Motion planning reduces to finding a path in from to .
Exact Methods
Visibility Graphs
For a polygonal translating point robot in 2D among polygonal obstacles:
The shortest path lies on the visibility graph: nodes are start, goal, and obstacle vertices; edges connect mutually visible pairs.
Construction: for total obstacle vertices (check visibility for all pairs). Can be improved to or output-sensitive where is the number of visible pairs.
Shortest path: Dijkstra on the visibility graph. Total: .
For non-point convex robots: grow obstacles by the Minkowski sum of the robot, then plan for a point.
Cell Decomposition (Exact)
Decompose into simple cells and build an adjacency graph.
Vertical decomposition (trapezoidal decomposition): for 2D polygonal obstacles, draw vertical lines from each vertex to the nearest obstacle above and below. Creates trapezoids. Compute via sweep line in .
Adjacency graph: nodes = cells, edges between adjacent cells. Path planning = graph search (BFS/DFS) from the cell containing to the cell containing .
Cylindrical algebraic decomposition (CAD): exact decomposition for semi-algebraic C-spaces. Doubly exponential in dimension; impractical beyond .
Exact Cell Decomposition for Higher DOF
Canny's roadmap algorithm (1988): constructs a 1D roadmap (retract of ) in polynomial time for fixed . Theoretical breakthrough but impractical. Complexity: for obstacle features in dimensions.
Sampling-Based Methods
Dominant in practice for high-dimensional C-spaces (). Trade completeness for practical efficiency.
Probabilistic Roadmap (PRM)
Algorithm (Kavraki, Svestka, Latombe, Overmars, 1996):
Learning phase:
- Sample random configurations in
- Discard those in (collision check)
- For each free sample, attempt to connect to nearest neighbors via local planner (straight-line interpolation with collision checking)
- Store the resulting graph (roadmap)
Query phase: connect and to the roadmap, then search the graph (A*, Dijkstra).
Properties:
- Probabilistically complete: if a path exists, PRM finds it with probability approaching 1 as
- Works well in high-dimensional spaces
- Multi-query: roadmap can be reused for different start/goal pairs
- Struggles with narrow passages: probability of sampling inside a narrow corridor is proportional to its volume, which can be exponentially small
Narrow passage strategies: Gaussian sampling (sample pairs, keep the one in free space near obstacles), bridge test (sample in obstacles, check midpoint), medial axis sampling.
RRT (Rapidly-Exploring Random Tree)
Algorithm (LaValle, 1998):
- Initialize tree with
- Repeat: a. Sample random configuration b. Find nearest node in c. Extend from toward by step size , yielding d. If the path from to is collision-free, add to
- If is close to , attempt direct connection
Properties:
- Voronoi bias: larger Voronoi cells (unexplored regions) are more likely to attract samples, driving rapid exploration
- Probabilistically complete
- Single-query (tree is specific to start/goal)
- No asymptotic optimality guarantee (paths can be arbitrarily suboptimal)
Bi-directional RRT (RRT-Connect): grow trees from both and , attempt to connect them. Significantly faster in practice. Kuffner and LaValle (2000).
RRT* (Optimal RRT)
Algorithm (Karaman and Frazzoli, 2011):
Modifies RRT with two key changes:
- Near-neighbor rewiring: when adding , check all nodes within radius and choose the parent that minimizes cost-to-come
- Rewire neighbors: check if routing through improves the cost of nearby nodes; if so, rewire
Properties:
- Asymptotically optimal: the path cost converges to the optimal cost as (with probability 1)
- Convergence rate: for the cost gap, which is slow in high dimensions
- Significantly slower per iteration than RRT due to near-neighbor queries
Variants: Informed RRT* (restricts sampling to an ellipsoidal region after finding an initial path), BIT* (batch informed trees), AIT* (adaptive), LBTRRT, FMT*.
Potential Fields
Artificial potential field method (Khatib, 1986):
Define a potential function :
- Attractive: (quadratic pull toward goal)
- Repulsive: if , else 0 (where is distance to nearest obstacle)
Follow the negative gradient: .
Advantages: simple, reactive, real-time capable. Computes velocities directly.
Fatal flaw: local minima. The gradient can be zero at points other than the goal. Common example: U-shaped obstacle.
Mitigations:
- Navigation functions (Rimon-Koditschek, 1992): potential functions with a unique minimum at the goal. Exist for sphere-worlds; construction for general environments is complex
- Randomized escape: add random perturbation when stuck
- Harmonic potential functions: solutions to Laplace's equation have no local minima (but are expensive to compute)
- In practice, potential fields are combined with global planners (potential field for local obstacle avoidance, RRT for global path finding)
Kinodynamic Planning
Kinodynamic planning considers velocity, acceleration, and dynamic constraints: plan in the state space subject to differential constraints where is a control input.
Challenges:
- State space is higher-dimensional (position + velocity)
- Cannot simply interpolate between states (must satisfy dynamics)
- Boundary value problem for local steering is often hard (nonlinear dynamics)
Approaches:
- Kinodynamic RRT: extend using forward simulation with random control inputs. The local planner applies a control for a fixed duration and simulates the dynamics
- State lattice: precompute motion primitives (feasible trajectory segments) and search a lattice graph. Used in autonomous driving (Pivtoraiko, Kelly)
- Trajectory optimization: optimize a trajectory directly (CHOMP, TrajOpt, GPMP2). Treat as a constrained optimization problem with collision avoidance as constraints
- LQR-RRT*: use LQR as the local steering function and cost-to-go metric for RRT*. Provides asymptotic optimality for linear systems
Differential constraints: car-like robots (Dubins/Reeds-Shepp curves provide optimal primitives), quadrotors (differentially flat, enabling trajectory planning in flat output space), manipulators (joint torque limits).
Multi-Robot Motion Planning
Plan collision-free paths for robots simultaneously. C-space is the product: , with dimension .
Centralized (plan in joint C-space): optimal but exponential in . Impractical for .
Decoupled approaches:
- Prioritized planning: plan for robots in priority order; each robot treats previously planned robots as moving obstacles. Fast but incomplete
- Velocity tuning: plan paths independently, then adjust velocities to avoid collisions along the paths
CBS (Conflict-Based Search) (Sharon et al., 2015): optimal multi-agent pathfinding on graphs. Two levels:
- High level: search over conflicts (pairs of agents colliding)
- Low level: plan individual agents with constraints from resolved conflicts
- Optimal and complete; exponential worst case but fast in practice
MAPF (Multi-Agent Path Finding): combinatorial variant on graphs. Extensively studied: makespan/sum-of-costs objectives, various optimality guarantees (ICTS, EPEA*, M*, ECBS).
Navigation Meshes
Represent walkable space as a mesh of convex polygons (typically triangles or convex cells).
Construction:
- Start with the environment geometry (3D mesh, 2D floor plan)
- Voxelize and identify walkable surfaces
- Build a Recast navigation mesh: voxelize heightfield walkable regions contour convex polygon mesh
Pathfinding on navmesh:
- Locate start/goal polygons
- A* search on the polygon adjacency graph (cost = distance between polygon edges or centroids)
- String-pulling (funnel algorithm): given the corridor of polygons, find the shortest path through the portal edges. Simple Funnel algorithm (Lee and Preparata, 1984): for portals
Advantages: compact representation, supports efficient pathfinding for many agents simultaneously, handles complex 3D environments. Industry standard for game AI (Recast/Detour library by Mikko Mononen).
Dynamic obstacles: carve temporary holes in the navmesh, or use local avoidance (ORCA/RVO) on top of global navmesh paths.
Local Avoidance
ORCA (Optimal Reciprocal Collision Avoidance) (van den Berg et al., 2011): each agent computes a set of velocities guaranteed to be collision-free for a short time horizon (assuming other agents cooperate). Reduces to a linear program per agent per timestep.
RVO (Reciprocal Velocity Obstacles): each agent takes half the responsibility for avoiding each pairwise collision. Produces smooth, oscillation-free motion.
These are used as a local layer on top of global path planning (navmesh A*), handling dynamic obstacles and agent-agent interactions in real time.