AnyLearn
All lessons
Roboticsadvanced

Configuration Space and the Planning Problem

Understand why every motion planner secretly works in configuration space: how robots become points, obstacles inflate, and why high-dimensional C-spaces make naive search intractable.

Not signed in β€” your progress and quiz score won't be saved.
Lesson progress1 / 8

What is configuration space?

A configuration qq is a minimal set of parameters that fully specifies the pose of every rigid body in a robot. For a 2-DOF planar arm, q=(ΞΈ1,ΞΈ2)∈[βˆ’Ο€,Ο€)2q = (\theta_1, \theta_2) \in [-\pi, \pi)^2; for a free-flying quadrotor, q∈SE(3)q \in SE(3). The set of all reachable configurations is the configuration space C\mathcal{C}.

The key insight: once you map the robot into C\mathcal{C}, the robot itself disappears. It becomes a single point qq. Planning reduces to connecting two points in C\mathcal{C} without entering the forbidden region. Every collision-avoidance problem, from a 2R arm to a 50-DOF humanoid, shares this common abstraction. All downstream algorithms β€” grids, graphs, sampling β€” operate exclusively in C\mathcal{C}.

Full lesson text

All 8 steps on one page β€” for reading, reference, and search.

Show

1. What is configuration space?

A configuration qq is a minimal set of parameters that fully specifies the pose of every rigid body in a robot. For a 2-DOF planar arm, q=(ΞΈ1,ΞΈ2)∈[βˆ’Ο€,Ο€)2q = (\theta_1, \theta_2) \in [-\pi, \pi)^2; for a free-flying quadrotor, q∈SE(3)q \in SE(3). The set of all reachable configurations is the configuration space C\mathcal{C}.

The key insight: once you map the robot into C\mathcal{C}, the robot itself disappears. It becomes a single point qq. Planning reduces to connecting two points in C\mathcal{C} without entering the forbidden region. Every collision-avoidance problem, from a 2R arm to a 50-DOF humanoid, shares this common abstraction. All downstream algorithms β€” grids, graphs, sampling β€” operate exclusively in C\mathcal{C}.

2. Free space and the obstacle region

Partition C\mathcal{C} into three mutually exclusive sets:

  • Cobs\mathcal{C}_{\text{obs}}: configurations where the robot body intersects an obstacle (or itself).
  • Cfree=Cβˆ–Cobs\mathcal{C}_{\text{free}} = \mathcal{C} \setminus \mathcal{C}_{\text{obs}}: configurations where the robot is collision-free.
  • Boundary βˆ‚Cobs\partial\mathcal{C}_{\text{obs}}: grazing contact.

A motion plan is a continuous path Οƒ:[0,1]β†’Cfree\sigma: [0,1] \to \mathcal{C}_{\text{free}} with Οƒ(0)=qstart\sigma(0) = q_{\text{start}} and Οƒ(1)=qgoal\sigma(1) = q_{\text{goal}}.

Critical subtlety: Cobs\mathcal{C}_{\text{obs}} has no closed-form expression for most robots. For a 2D point robot, it equals the workspace obstacle footprints. For anything else β€” a 6-DOF arm, a car β€” computing Cobs\mathcal{C}_{\text{obs}} analytically is NP-hard. This is why planners resort to collision-checking samples rather than explicitly constructing Cobs\mathcal{C}_{\text{obs}}.

3. Degrees of freedom and dimensionality

The dimension of C\mathcal{C} equals the robot's degrees of freedom (DOF):

RobotDOFC\mathcal{C}
Point in 2D plane2R2\mathbb{R}^2
Planar rigid body3R2Γ—S1\mathbb{R}^2 \times S^1
6-DOF industrial arm6[βˆ’Ο€,Ο€)6[-\pi,\pi)^6
Humanoid (upper body)30+high-dim torus

Joint limits and kinematic constraints carve out further subsets. Notice that C\mathcal{C} is not always Rn\mathbb{R}^n: revolute joints wrap around, giving S1S^1 factors; orientation in 3D lives in SO(3)SO(3), not R3\mathbb{R}^3. Planners must respect topology β€” naive Euclidean distance across a Β±Ο€\pm\pi joint boundary is wrong and creates phantom discontinuities in path cost.

4. Workspace to C-space mapping

A 2-DOF planar arm in workspace maps to a point in the 2D joint angle space; workspace obstacles become C-space obstacles after Minkowski expansion.

flowchart LR
  W["Workspace: robot body + obstacles"]
  FK["Forward kinematics: FK(q)"]
  CC["Collision checker: does FK(q) intersect obstacle?"]
  Cfree["C_free: valid configurations"]
  Cobs["C_obs: forbidden configurations"]
  Planner["Planner: path in C_free from q_start to q_goal"]
  W --> FK
  FK --> CC
  CC --> Cfree
  CC --> Cobs
  Cfree --> Planner

5. Obstacle inflation: the Minkowski sum

For a 2D point robot, Cobs\mathcal{C}_{\text{obs}} is obtained by growing each workspace obstacle by the Minkowski sum with the robot's shape A\mathcal{A}:

Cobs={q∣A(q)∩Wobsβ‰ βˆ…}=WobsβŠ•(βˆ’A)\mathcal{C}_{\text{obs}} = \{ q \mid \mathcal{A}(q) \cap \mathcal{W}_{\text{obs}} \neq \emptyset \} = \mathcal{W}_{\text{obs}} \oplus (-\mathcal{A})

For a circular robot of radius rr, the inflation is simply a dilation by rr β€” each obstacle grows by rr and the robot shrinks to a point. This is the standard trick in 2D navigation: inflate the costmap by the robot's inscribed radius, then plan for a point robot.

For non-circular robots or arms, the Minkowski sum is expensive to compute in closed form. Modern planners skip the explicit computation entirely and instead sample qq, forward-kinematics to workspace, then test geometric intersection β€” trading precomputation for fast per-sample checks using BVH trees or FCL.

6. The curse of dimensionality

Grid-based planners discretize C\mathcal{C} with resolution Ο΅\epsilon. The number of cells scales as (1/Ο΅)n(1/\epsilon)^n where n=dim⁑(C)n = \dim(\mathcal{C}). For a 6-DOF arm at 5∘5^\circ resolution that's 726β‰ˆ1.4Γ—101172^6 \approx 1.4 \times 10^{11} cells β€” totally intractable.

More formally: a ball of radius rr in Rn\mathbb{R}^n has volume VnrnV_n r^n where Vn=Ο€n/2/Ξ“(n/2+1)V_n = \pi^{n/2}/\Gamma(n/2+1). To cover Cfree\mathcal{C}_{\text{free}} with Ο΅\epsilon-balls needs Θ((1/Ο΅)n)\Theta((1/\epsilon)^n) samples. For nβ‰₯6n \geq 6, uniform grids are dead on arrival.

The curse motivates sampling-based planners (RRT, PRM) that replace exhaustive coverage with random exploration β€” they do not require covering the full space, only finding one valid path. The tradeoff: you lose completeness guarantees (only probabilistic completeness) but gain tractability in high nn.

7. Collision checking in practice

A collision checker answers: is q∈Cobsq \in \mathcal{C}_{\text{obs}}? Modern checkers (FCL, libccd, Bullet) have three layers:

  1. Broad phase β€” bounding volume hierarchies (AABB, OBB, k-DOP) cull obviously non-colliding pairs in O(log⁑n)O(\log n).
  2. Narrow phase β€” GJK/EPA for convex pairs, mesh-mesh for non-convex shapes.
  3. Continuous collision checking (CCC) β€” tests the swept volume of a segment [qa,qb][q_a, q_b], critical for validating edges in a roadmap.
import yourdfpy, fcl

def is_collision_free(q, robot, scene):
    robot.set_joint_positions(q)          # FK
    for geom_pair in scene.broadphase(robot):
        if geom_pair.narrow_check():      # GJK
            return False
    return True

Collision checking dominates planner runtime β€” up to 90% of wall time in dense environments. Batch GPU checkers (Isaac Gym, CuRobo) exploit parallelism to amortize cost across thousands of simultaneous queries.

8. Planning problem formulation

The basic motion planning problem (BMPP): given C\mathcal{C}, Cobs\mathcal{C}_{\text{obs}}, qstart∈Cfreeq_{\text{start}} \in \mathcal{C}_{\text{free}}, qgoal∈Cfreeq_{\text{goal}} \in \mathcal{C}_{\text{free}}, find a continuous path Οƒ:[0,1]β†’Cfree\sigma: [0,1] \to \mathcal{C}_{\text{free}} or certify none exists.

Variants add cost:

  • Optimal motion planning: minimize ∫01c(Οƒ(t),ΟƒΛ™(t)) dt\int_0^1 c(\sigma(t), \dot{\sigma}(t))\,dt (path length, energy, time).
  • Kinodynamic planning: qΛ™=f(q,u)\dot{q} = f(q, u) β€” the robot has dynamics and bounded controls.
  • Multi-query planning: answer many (qs,qg)( q_s, q_g ) pairs sharing the same Cobs\mathcal{C}_{\text{obs}}.

For the rest of this cursus, we focus on the geometric case (no dynamics) but flag where dynamics change the picture. Appreciating C\mathcal{C} is the prerequisite: without it, Dijkstra, A*, PRM, and RRT are just opaque algorithms. With it, they are all instances of graph search or sampling in Cfree\mathcal{C}_{\text{free}}.

Check your understanding

The lesson ends with a 5-question quiz. Take it in the player above to see your score.

  1. A 6-DOF industrial arm's configuration space has dimension:
    • 3, because it operates in 3D Cartesian space.
    • 6, one per joint angle.
    • 12, because each joint has a position and a velocity.
    • It depends on the number of obstacles in the workspace.
  2. Why do modern motion planners avoid computing C_obs analytically?
    • Analytical C_obs is too large to store on disk for typical robots.
    • Computing the exact Minkowski sum for articulated robots is NP-hard; per-sample collision checks are cheaper.
    • Analytical methods require convex obstacles, which are uncommon in practice.
    • C_obs is always empty for robots with joint limits.
  3. Inflating a 2D costmap by the robot's inscribed radius before planning with a point robot is valid because:
    • It guarantees the planned path is globally optimal.
    • It converts C_obs into a convex set, simplifying planning.
    • It applies the Minkowski sum trick: obstacles grow by the robot shape, turning the robot into a point.
    • It eliminates the need for collision checking during path execution.
  4. The curse of dimensionality implies that for a 10-DOF robot at resolution Ξ΅:
    • The planner needs O(1/Ξ΅) cells, the same as for a 2D robot.
    • The number of grid cells scales as (1/Ξ΅)^10, making grids computationally intractable.
    • Sampling-based planners also need (1/Ξ΅)^10 samples to guarantee probabilistic completeness.
    • Collision checking becomes free because fewer cells are occupied.
  5. Continuous collision checking (CCC) of an edge [q_a, q_b] is necessary because:
    • Checking only q_a and q_b is sufficient if the resolution Ξ΅ is small enough.
    • The robot may collide with an obstacle at some intermediate configuration even if both endpoints are collision-free.
    • CCC reduces the total number of collision checks compared to endpoint-only checking.
    • Joint limits can only be violated at intermediate configurations, not at endpoints.

Related lessons