MIT 6.4210 — Lecture 6
Motion Planning
§ Motion Planning: Setup
Definition. Some reminders of some definitions:
The work space (or Cartesian space) of a robot is the set of points reachable by an end-effector.
For example, one might use to parametrize the work space of a two-rod 2D Kuka IIWA.
The configuration space of a robot is the set of reachable configurations of the robot—not just the end-effector!
A configuration is denoted , where is the set of all possible configurations.
For example, one might use to parametrize the configuration space of a two-rod 2D Kuka IIWA.
The topology of the configuration space might not be Cartesian; in this example, it's (a torus).
Definition. In motion planning, we assume that we have:
A world .
An obstacle region .
A robot defined in (i.e., ).
We seek a collision-free path from to .
§ Motion Planning: Obstacle Space
Given a robot and an object , how can we determine the set of positions of in which and do not intersect?
Definition. We define the obstacle space by , in addition to .
Remark. For some reason, we care about whether is closed in the topology of . If not, we must use the closure of .
In simple translational cases, we can write , where is the Minkowski difference.

The Minkowski difference can be efficiently computed using the Star algorithm—details omitted.
But for nontranslational cases, the obstacle space can be harder to compute. For example, the robot might be allowed to rotate, or the configuration space might be non-Cartesian.

In some of these cases, the runtime for computing might be exponential!
The upshot of defining is that we can now define the problem of motion planning entirely within the configuration space .
Definition. In motion planning, we assume that we have:
A configuration space , plus an obstacle space and a free space .
We seek a continuous path with and .
§ Combinatorial Planning
Definition. A motion planner is complete if it always finds a solution if one exists and returns a failure in bounded time if not.
The combinatorial algorithms we discuss in this section will be complete, and they will all employ road maps.
Definition. Given a configuration space and a free space , a road map is a graph whose vertices are configurations in and whose edges are collision-free paths between vertices. This graph must be such that:
(Accessibility) For any starting point , it is easy to find a collision-free path for some .
(Departability) For any ending point , it is easy to find a collision-free path for some .
(Connectivity) If are connected in , then they are connected in the graph of .
Here's an example of how a road map might let us find a collision-free path .

Here are some different strategies for constructing road maps.
Visibility Graph. Suppose the configuration space is , and every obstacle is a convex polygon. (If an obstacle is concave, you can work around this by breaking it up into convex pieces.)
Then for any , to find a path , we simply:
Precompute for any two vertices of two polygons, whether the straight-line path between them is collision-free.
Determine the set of all polygon vertices for which is collision-free (and separately for , too).
Apply a shortest-path algorithm (e.g., A*) to find the shortest collision-free path .
It turns out that this algorithm in fact always finds the shortest collision-free path .
Remark. In computational geometry, people have found more efficient algorithms for computing visibility graphs. In practice, though, sampling-based motion planning algorithms are preferred—as we'll see later on.
Voronoi Diagram. Just construct the Voronoi Diagram of the obstacles.
The roadmap graph is then exactly the “boundaries” of the Voronoi diagram. In a sense, this lets you keep a maximum distance away from any obstacle throughout your collision-free path.
One last algorithm archetype.
Cell Decomposition. Split the configuration space into cells, and then find paths between the cells.
For example, here's a cell decomposition by -coordinate of the obstacles.
There are also approximate cell decomposition approaches; for example, here's a quadtree decomposition approach.
The idea is that cells are either empty, full, or mixed, and that “mixed” cells can be zoomed into as needed.
As mentioned earlier, these are all complete algorithms (approximate cell decompositions only up to resolution). But their disadvantages are that they become intractable as the obstacle complexity or dimensionality of the -space increases. (And this happens very often in robotic manipulation!)
§ Sampling-Based Planning
Definition. A (randomized) motion planner is probabilistically complete if, assuming a solution exists, the probability of finding that solution in time tends to one as .
The sampling-based algorithms we discuss in this section will be probabilistically complete. There are two kinds:
Multi-query: The algorithm performs some precomputation—assumes obstacles are fixed across queries.
Single-query: The algorithm does not perform precomputation—useful when obstacles move over time.
Here's the most common multi-query algorithm.
Probabilistic Roadmap (PRM). Construct the roadmap procedurally by repeating the following algorithm.
Randomly pick a point and check if . If it isn't, try again.
If it is, add to , and for each with , add the edge to if that path is collision-free.
The whole point of PRM is to avoid having to compute . Instead, for each , it uses a custom collision-detector to check whether . (Efficient collision-detectors exist, because video games require them.)
As shown above, though, the paths outputted by PRM are not very short. Here are some improvements to PRM:
Find shortcuts—between two points on the path, ask if the straight line between them is collision-free.
Use paths generated by PRM as starting paths for the optimization algorithms described in Lecture 5.
Unfortunately, PRM may fail with nonzero probability because the roadmaps it produces might not satisfy Accessibility and Departability or Connectivity, as shown below.

But PRM just works very well in practice because—even in high dimensions—collision-detection is still very fast.
Sometimes the obstacles do move around, though, in which case we require single-query algorithms.
Rapidly-Exploring Random Trees (RRT). We gradually add points to a connected tree in the following way.
Randomly pick a point and check if . If it isn't, try again.
With probability (the goal bias), our random point will just be , the goal.
(Extend) If it is, then do the following:
Find the nearest point to .
Compute the point that is of the way between and , for some fixed constant .
If the segment lies in , then append to and connect and with a collision-free path.
You can see this algorithm in action using the (warning: AI-generated) widget below.
Note that this algorithm is not the same as a plain random walk—a random walk doesn't tend to go anywhere, whereas RRT will eventually tend to fill the space.
A natural speed-up is RRT-Connect, in which we grow a tree from both and bidirectionally.
Grow trees and out of and , respectively.
Suppose RRT adds a new vertex to (Extend). Then:
Take the nearest point to and take steps (Extend) from to until a collision occurs.
Add any taken steps to the tree . Then swap and .
Allegedly, taking to always be the smaller tree helps even more.
Repeat until the steps taken from to reach without any collisions.
You can see in the widget above that RRT-Connect is much better than RRT for navigating narrow passages.
One last improvement is RRT*, which favors shorter paths between and . Handwavily, it adapts RRT in two ways:
Connect each to whichever nearby gives the shortest path from —not necessarily the closest to .
Afterwards, rewire : if a nearby would have a shorter path from through , reroute it through .
RRT* keeps running even after it reaches so that even shorter paths can be found over time.
One advantage of RRT is that it works even for non-holonomic robots.
Definition. A robot is holonomic if it can freely move in any direction in its configuration space.
The simplified 2D two-rod Kuka IIWA is a holonomic robot.
A car is not a holonomic robot; it cannot translate its body in a lateral direction.
Combinatorial planning algorithms ask whether you can move from to in the configuration space, which is not easily answerable for non-holonomic robots.
But RRT only asks whether, starting from , you can get closer to , thereby landing on . This can be answered for non-holonomic robots by forward-simulating various inputs and checking whether any results land closer to .
Spoilers: it turns out that RRT (or variants of it) just perform the best in practice.





