From C-space to graph
The C-space is continuous; computers need discrete graphs. The standard move is to overlay a regular grid: slice each DOF axis into cells of width , giving nodes. Each node connects to its lattice neighbours (4-connected or 8-connected in 2-D; or in -D) with edge weight equal to the Euclidean distance between centres.
Before adding a node or edge to the graph, run the collision checker. Only nodes in are kept. The result is a finite, weighted, undirected graph . Finding the shortest collision-free path from to is now exactly the single-source shortest path problem β and Dijkstra's algorithm solves it optimally. The catch: is exponential in , so grid search only works up to about 4 DOF in practice.
