One of the fundamental problems in robotics is motion planning: given a robot R and an environment (or physical space), a start position pstart and an end position pend, find a path so that the robot can move from start to end, without collisisons. Sometimes we might want the shortest path from pstart to pend; other times just a path (not necessarily the shortest) may be sufficient.
General motion planning is difficult. We'll make the following (simplifying) assumptions:
Different types of motion planning problems will require different types of roadmaps.
The simplest problem is a point robot moving among polygonal obstacles in 2D. Two types of roadmaps are used:
Trapezoidal decomposition: The free space can be decomposed as follows: from each vertex, shoot a vertical ray above and below, until it intersects with an edge (or the bounding box B). This is called a trapezoidal decomposition, and we have seen something very similar when we talked about polygon triangulation; in this case we have a set of polygons, not just one, but the idea is the same. This trapezoidal decomposition can be computed using standard techniques. Each trapezoid corresponds to a region of the free space. To guide movement between adjacent trapezoids, we can construct a road map as follows: we place one node in the center of each trapezoid, and we place one node in the middle of each vertical edge. There is an arc between two nodes if and only iff one node is in the center of a trapezoid and the other node is on the boundary of that same trapezoid. The figure below illustrates this (from 4M book). A path from start to end can be found via BFS in the road map. It can be shown that the road map has linear complexity O(n), which is good. But, paths obtained with this approach are not necessarily shortest. In summary, the roadmap idea is a useful thing to remember in general, but in the simple case of a point robot moving in 2D, we can do better.
The visibility graph: A different type of road map that can be used for finding shortest paths is the visibility graph: this is a graph whose vertices are the vertices of the obstacles, and its edges (u,v) are all the pair of vertices that can "see" each other, that is, segment uv does not intersect the interior of any obstacle. Below are some screenshots (the first screenshot is from http://www.cs.cmu.edu/afs/cs.cmu.edu/academic/class/16311/www/s06/lecture/lec8.html).
Shortest paths in 2D have the very nice and convenient property that they are straight lines, and they have to go through the vertices of the obstacles. This basically means that any shortest path will be contained in the VG. Once the visibility graph (VG) is computed, the shortest paths from start to end can be computed for e.g. using Dijkstra's algorithm.
Perspective: The problem with the VG approach is that the VG may have quadratic complexity in the worst case, and any approach that computes the whole VG is doomed to quadratic complexity. It would be nice to compute the shortest path from s to t on the fly, without using at least quadratic time and space to compute and store the VG.This was an open problem for a while; the quadratic barier was first broken by Joe Mitchell, and subsequently Hershberger and Suri (1993) described an optimal (n lg n) algorithm called the continuous Dijkstra algorithm.