ProjekinAja. Robotics Stage 6 · Planning Deployment Lesson 6.1
● Stage 6 · Lesson 6.1

Configuration Space: The Correct Abstraction for Planning

Every planner operates in configuration space whether you know it or not — misunderstanding C-space produces planners that pass geometric collision checks but drive robots into walls.

⏱ ~20 min read 🧠 Planning foundations 🚀 Stage 6 entry point

🎯 By the end you'll understand

What configuration space is and why every planner lives in it. How workspace obstacles map to C-obstacles via the Minkowski sum — and why the mapping is nontrivial. Why a straight-line path in workspace becomes a curve in C-space. What non-holonomic constraints mean for FollowBot's differential drive. The dimensionality curse for high-DOF systems. And the failure mode that catches almost every first-time planner builder: using a 2D (x,y) planner without accounting for heading, so that arriving at the goal requires an impossible instantaneous rotation.

KEY INSIGHTPlanning is always in C-space — whether you admit it or not

A planner that reasons about (x, y) position but ignores the robot's heading is not planning in a lower-dimensional space — it is planning in the wrong space entirely.

Every path planning algorithm operates on a state space that encodes every degree of freedom the robot can independently control. That state space is the configuration space (C-space). Workspace — the Cartesian space the robot physically occupies — looks simpler and more intuitive. But planning directly in workspace is almost always wrong: collision geometry is harder to compute, robot shape must be constantly re-tested, and the planner's search has no clean notion of "the robot fits through here."

🔑 The key shift

In C-space, the robot is a point. Every configuration — every combination of joint angles, or every (x, y, θ) pose — maps to exactly one point in C-space. Obstacles in the workspace map to regions in C-space called C-obstacles. Planning becomes: find a continuous path from the start point to the goal point in C-space that avoids all C-obstacle regions. Once you see planning this way, why algorithms like A*, RRT, and PRM work — and when they fail — becomes self-evident.

DEFINITIONConfiguration space: every DOF, one point

A robot's configuration is the minimal set of values that completely specifies its geometric state — the position of every rigid body in the robot relative to a fixed frame. For a 2-DOF planar arm with joint angles θ₁ and θ₂, the configuration is (θ₁, θ₂) — a point in a 2D space. For FollowBot's differential-drive base, the configuration is (x, y, θ): position plus heading — a point in a 3D space. For FollowBot's 6-DOF arm, the configuration is (θ₁, …, θ₆) — a point in 6D space.

Workspace (W) physical Cartesian space θ₁ θ₂ obstacle workspace EE link 1 link 2 C-space robot is a single point · (θ₁, θ₂) θ₁ θ₂ C-obstacle image of workspace obstacle (θ₁, θ₂) current config maps to →
Left: the 2-DOF arm in workspace. Its configuration is fully described by (θ₁, θ₂). Right: C-space — the arm is a single point. The workspace obstacle maps to a C-obstacle region whose shape is not the same as the original obstacle. The C-obstacle is the set of all (θ₁, θ₂) pairs for which the arm would intersect the obstacle.

Three properties of C-space that planning exploits:

1

The robot is a point

In workspace you must check whether the physical robot body — an extended shape — intersects an obstacle. In C-space you only ask: does this point lie inside a C-obstacle region? This makes collision checking O(1) per query (a point-in-region test) rather than a shape intersection test that depends on the robot's geometry.

2

C-free is the valid planning domain

C-space is partitioned into C-obstacle (configurations that cause collision) and C-free (configurations that are safe). Planning algorithms search for a path through C-free. The shape of C-free encodes all the geometric complexity of the robot interacting with its environment — planners need not reason about that geometry explicitly.

3

Topology matters

C-space is not always R^n. A joint angle like θ₁ is periodic — θ₁ = 0 and θ₁ = 2π are the same configuration. This makes C-space for a revolute joint a circle S¹, not a line segment. A 2-DOF arm lives in the torus T² = S¹ × S¹. Planners that treat periodic dimensions as flat Euclidean space get boundary conditions wrong and may miss paths that cross the ±π wrap.

HOW IT WORKSC-obstacles: the Minkowski sum makes them bigger

How does a workspace obstacle become a C-obstacle? For a robot that can translate but not rotate (a holonomic point robot), the C-obstacle is just the Minkowski sum of the workspace obstacle and the robot's shape reflected through the origin: C-obs = W-obs ⊕ (−robot). The reflection is the key: you grow the obstacle by the robot's footprint, so that placing the robot's reference point anywhere outside the grown obstacle guarantees no collision.

📖 Minkowski sum (intuition)

The Minkowski sum A ⊕ B is the set of all points a + b where a ∈ A and b ∈ B. Geometrically: slide B's reference point around every point on A's boundary; the swept region is the Minkowski sum. For collision checking: if the robot is a circle of radius r, the C-obstacle is the workspace obstacle grown by radius r in every direction. The robot's reference point (center) must then stay outside this grown obstacle — a single point-in-region test, no shape intersection needed.

For a robot that can rotate (like FollowBot's base with pose (x, y, θ)), the C-obstacle is a 3D region in (x, y, θ)-space. At each heading θ, the robot has a different bounding footprint, so the C-obstacle cross-section at each θ is the Minkowski sum of the workspace obstacle with the robot's footprint at that heading. The 3D C-obstacle is generally not convex even when both the obstacle and the robot's footprint are convex. This is why computing exact C-obstacles analytically is impractical for anything but simple shapes — and why planners like A* operate on discretized costmaps instead.

💡 Costmaps are C-space approximations

Nav2's costmap is a discretized approximation of the (x, y) slice of C-space at a fixed heading (or averaged over headings). The inflation layer — which grows obstacles by the robot's inscribed radius — is precisely the Minkowski sum, computed per grid cell. Understanding C-obstacles makes it clear why the inflation radius must equal the robot's maximum footprint radius, not a smaller conservative estimate: the robot can only be treated as a point in the inflated map if the inflation completely captures the robot's swept volume.

Straight-line paths in workspace are curves in C-space. This is the subtlety that trips people up. Suppose the workspace path is: "move the tip of a 2-DOF arm from point A to point B in a straight line." In workspace (x, y) coordinates this is a line segment. In C-space (θ₁, θ₂) the corresponding configuration sequence is a nonlinear curve — computed by inverse kinematics at every point along the workspace path. A straight line in C-space (interpolating joint angles linearly) traces a curved arc in workspace. Most motion planners that operate in C-space plan a straight line in C-space, not a straight line in workspace. This is usually fine for arms — but for a mobile robot with a person-following task, you may need a specific workspace-straight path to avoid scaring the person. Those are different constraints and require different solvers.

SEE ITC-space visualizer: arm, obstacles, and the FollowBot theta problem

This widget has two modes. The 2-DOF arm mode lets you place a workspace obstacle and watch its C-obstacle form in the joint-angle plane; then draw a straight-line joint-interpolation path and see the resulting arc in workspace. The FollowBot 2D mode shows the failure of planning only in (x,y) while ignoring heading θ.

⚙ Interactive · C-space visualizer

Select a mode and obstacle preset; then step through to watch C-space form. In FollowBot mode, choose a goal heading to see whether in-place rotation is required.

Obstacle preset
Path in C-space
Workspace
C-space (θ₁ × θ₂)

Nominal — no path selected

The blue arm shows the current joint configuration (θ₁, θ₂). The red dot in C-space marks that configuration as a single point. The grey region is the C-obstacle: all (θ₁, θ₂) combinations where the arm would collide with the workspace obstacle. Drag the sliders to move through C-space and watch whether the arm enters the obstacle.

The arm mode reveals why the C-obstacle does not have the same shape as the workspace obstacle: a small box in workspace becomes an irregular, sometimes disconnected region in (θ₁, θ₂)-space. The "straight-line path" option shows how a joint-space straight line traces an arc in workspace — and may pass through the C-obstacle even when the workspace path appears clear. The safe path detours in C-space to avoid the C-obstacle while reaching the same workspace goal.

The FollowBot mode exposes the heading failure: the worst-case scenario occurs when the planner finds a short path to a position near a wall, with the required goal heading pointing into the wall. An in-place rotation is not just inconvenient — it may be geometrically infeasible.

CORE CONCEPTDifferential drive: non-holonomic constraints shrink C-free

FollowBot's base is a differential-drive robot. Its configuration space is 3D: (x, y, θ). But it cannot move in all directions from a given configuration — specifically, it cannot translate sideways. This is a non-holonomic constraint: a constraint on velocities that cannot be integrated into a constraint on configurations.

📖 Non-holonomic vs. holonomic

A holonomic constraint is one on configurations — "the robot must stay in the plane z=0." You can directly integrate it. A non-holonomic constraint is on velocities (or generalized velocities) and cannot be integrated into a configuration constraint. For a differential drive: the robot's instantaneous velocity must be perpendicular to neither wheel axle, which means the lateral velocity is always zero in the robot frame. Written as a Pfaffian constraint: ẋ sin θ − ẏ cos θ = 0. This cannot be written as f(x, y, θ) = constant — there is no "forbidden region" in configuration space, only forbidden velocities at each configuration.

The non-holonomic constraint has a critical planning implication: C-free for a differential-drive robot is the same set as for a holonomic robot (any collision-free (x, y, θ) is in C-free), but not every path in C-free is kinematically feasible. A path that requires a sideways slide cannot be executed by a differential drive. This is why:

🔑 The heading is not an afterthought

Because a differential drive cannot slide, the heading θ is not a nuisance variable that can be handled at arrival — it is a first-class planning dimension. A planner that outputs a sequence of (x, y) waypoints is, implicitly, requiring the local planner to figure out the heading transitions. If the global planner generates a 90° turn at a waypoint and the local planner cannot spin fast enough while also moving forward, the robot misses the waypoint. The global planner must output (x, y, θ) waypoints — or use a planner that intrinsically models heading (like A* on SE(2) or a lattice planner).

Stage 2 (Lesson 2-1) derived the differential-drive kinematics: given wheel velocities (v_l, v_r) and wheel base d, the body-frame velocity is v = (v_l + v_r)/2, ω = (v_r − v_l)/d. The non-holonomic constraint follows directly: the robot's velocity in the y-direction of its own frame is always zero. Any path in (x, y, θ)-space that requires a nonzero lateral velocity component is infeasible — no combination of (v_l, v_r) will produce it.

WEAKNESSHigh-DOF arms: the dimensionality curse

FollowBot's 6-DOF arm lives in a 6D C-space: (θ₁, …, θ₆). If you discretize each dimension at a resolution of 100 values (coarse for a real arm), the number of C-space cells is 100⁶ = 10¹² — one trillion. A grid-based planner is completely intractable at this scale. This is the dimensionality curse of C-space, and it is the primary driver of sampling-based motion planning algorithms.

Robot C-space dims Cells (100-res grid) Feasible planner
Mobile base (x,y)210,000A* on 2D costmap
Mobile base (x,y,θ)31,000,000A* on SE(2) lattice
2-DOF arm210,000A* or potential fields
6-DOF arm610¹²RRT, PRM (sampling-based)
Mobile manipulator (base+arm)910¹⁸Hierarchical or task-space planners

Sampling-based planners (RRT, PRM, their variants) sidestep the curse by not discretizing the entire C-space. Instead they sample random configurations, connect them with local planners, and build a sparse roadmap or tree through C-free. They are probabilistically complete — they will find a path if one exists, given enough time — but not resolution complete, and they do not guarantee optimality (though RRT* and PRM* add asymptotic optimality).

For FollowBot's mobile base, the 3D (x, y, θ) C-space is small enough that a lattice-based planner (Nav2's A* on a costmap, extended to SE(2)) is tractable. For the arm, you will need a sampling-based approach. The stage milestone includes both — but Lessons 6-2 and 6-5 cover each in depth. This lesson's job is to make sure you understand what problem those planners are actually solving.

FOLLOWBOTConfiguring the C-space for Nav2

FollowBot's Nav2 planning stack operates in (x, y, θ) C-space, discretized to a 2D costmap grid with a separate heading dimension handled by the local planner. Here is how the C-obstacle construction maps to Nav2 configuration:

1

Robot footprint → inflation radius

FollowBot's base has a circular footprint of radius r = 0.20 m. The C-obstacle for a 2D (x,y)-slice of C-space is the workspace obstacle grown by r via the Minkowski sum. In Nav2, this is the inflation_radius parameter on the inflation_layer. Setting it to 0.20 m means the robot's center can approach to within 0.20 m of any obstacle boundary before hitting the C-obstacle boundary. Add a safety margin of 0.05 m: set inflation_radius: 0.25. This is the most direct translation of C-obstacle theory to costmap configuration.

2

The heading problem in Nav2's A* global planner

Nav2's default SmacPlanner with SE(2) lattice natively plans in (x, y, θ). If you use the older NavFn (pure 2D Dijkstra/A*), it plans in (x, y) only. For FollowBot's person-following task where the robot must arrive facing the person, NavFn is the wrong choice — it will produce positions without guaranteed heading, and the DWA local planner must handle heading transitions that may be kinematically difficult. SmacPlanner (Hybrid A* or lattice) is the correct choice. This is not a configuration detail — it is a direct consequence of C-space dimensionality.

3

Non-holonomic constraints in DWA

The DWA local planner enforces non-holonomic constraints by construction: it only samples (v, ω) pairs, never lateral velocities. But it requires correct kinematic limits: max_vel_x, min_vel_x, max_vel_theta, and the acc_lim_* constraints that bound the dynamic window. If these are wrong — set from a different robot's config — DWA will sample trajectories FollowBot physically cannot execute, pick the "best" infeasible one, and command velocities the motor driver cannot deliver. The non-holonomic C-space and the dynamic window are the same physical constraint expressed at two different levels of abstraction. They must be consistent.

followbot_nav2.yamlNav2 planner config — C-space aware
# Global planner: SmacPlanner with SE(2) lattice
# Reasons in (x,y,theta) C-space, not just (x,y)
planner_server:
  ros__parameters:
    planner_plugins: ["GridBased"]
    GridBased:
      plugin: "nav2_smac_planner/SmacPlannerHybrid"
      allow_unknown: true
      max_planning_time: 5.0          # seconds; fail fast if C-free blocked
      minimum_turning_radius: 0.0       # diff drive: can spin in place (=0)
      reverse_penalty: 2.0             # penalize reversing (undesirable for following)

# Costmap: C-obstacle via inflation (Minkowski sum approximation)
local_costmap:
  local_costmap:
    ros__parameters:
      footprint: "[[0.20,0.0],[-0.20,0.15],[-0.20,-0.15]]"  # triangle approx
      inflation_layer:
        plugin: "nav2_costmap_2d/InflationLayer"
        inflation_radius: 0.25          # robot radius (0.20) + 0.05 safety
        cost_scaling_factor: 3.5        # exponential decay away from obstacle

# DWA local planner: enforces non-holonomic constraint via velocity sampling
controller_server:
  ros__parameters:
    controller_plugins: ["FollowPath"]
    FollowPath:
      plugin: "dwb_core/DWBLocalPlanner"
      max_vel_x: 0.60                   # FollowBot hardware limit
      min_vel_x: -0.10                  # slight reverse allowed
      max_vel_theta: 1.2                # rad/s; measured from motors
      acc_lim_x: 0.50                   # m/s² — bounds the dynamic window
      acc_lim_theta: 1.50
💡 Stage 6 milestone preview

The full FollowBot Nav2 stack — A* global planner on the SLAM map, DWA local planner, inflation-layer costmap, and a behavior tree orchestrating detect → navigate → follow → recover — is assembled across Lessons 6-1 through 6-7. This lesson provides the C-space foundation that makes every subsequent configuration choice legible. When Lesson 6-4 asks you to tune the inflation radius, you will know that you are setting the C-obstacle boundary, not just adjusting a fudge factor.

WEAKNESSWhere the C-space abstraction bites

✗ The (x,y)-only planner: the heading failure mode

This is the most common beginner mistake in mobile robot planning. You implement an A* planner on a 2D occupancy grid, find a clear path to the goal (x,y) position, declare success, and send the path to the local planner. The local planner follows it — and the robot arrives at (x,y) pointing in whatever direction the path happened to exit. For a person-following robot, this means arriving at the tracked person's last known position while pointing sideways. The robot then performs an in-place rotation to face forward. This looks alarming and, if the person has moved and the tracked goal is near a wall or furniture, the in-place rotation may be geometrically infeasible. The fix is not a hack at the arrival: it is to use a planner that treats (x,y,θ) as its state — because that is C-space for a differential-drive robot.

✗ Setting inflation_radius too small (or too large)

Too small: the C-obstacle boundary does not fully enclose the dangerous region. The robot's body can collide with the obstacle even when the grid shows the path as "free." Too large: narrow passages — doorways, gaps between furniture — become infeasible in the costmap, even when the physical robot could fit through. The correct inflation radius is the robot's maximum extent (the circumscribed circle radius), plus a minimal safety margin. Not the inscribed radius (which leaves corners exposed), not an arbitrary large buffer (which closes passages). This is not a tuning parameter — it is a direct consequence of the Minkowski sum computation. Wrong values produce planners that fail systematically in the most important scenarios (tight spaces), not randomly.

✗ Ignoring joint angle periodicity in arm C-space

A planner that samples θ ∈ [−π, π] for a revolute joint but does not wrap distances across the ±π boundary will compute the distance from θ = +3.1 rad to θ = −3.1 rad as 6.2 rad (far apart), when the kinematically correct distance is 0.08 rad (almost the same configuration). This causes RRT to waste samples, A* on a discretized space to pick the wrong neighbors, and IK solvers to report no solution near joint limits. Every sampling-based planner must handle periodic dimensions explicitly: use the shortest angular distance (atan2 of the sine-cosine), not the raw difference. This is not an edge case — it occurs routinely near 180° configurations, and most 6-DOF industrial tasks have solutions near those configurations.

KEY INSIGHTHow this connects

  • 2.1 · Differential Drive Kinematics: FollowBot's Motion Model — derives the (v, ω) model and the non-holonomic constraint ẋ sin θ − ẏ cos θ = 0. That constraint is what makes θ a first-class dimension in C-space and invalidates (x,y)-only planning for FollowBot.
  • 4.9 · Multi-Sensor Fusion on FollowBot: Architecture and Covariance Design — the state estimation that feeds the planner. The (x,y,θ) estimate from the EKF is the query point in C-space. An uncertain or biased pose estimate maps to an incorrect C-space position, causing the planner to compute paths relative to the wrong start configuration — connecting the Estimate and Plan failure modes.
  • 6.2 · Graph Search: A*, Heuristics, and Costmap Planning — takes C-space as given and builds the A* planner on top. The costmap is now legible as a discretized C-space representation; the heuristic is a distance in C-space; the expansion strategy shapes which regions of C-free get explored.

Configuration space is the organizing concept for Stage 6 the way the sense-think-act loop was the organizing concept for Stage 1. Every planner, every costmap parameter, every kinematic constraint in the stage's subsequent lessons is a statement about C-space. Keep this abstraction visible as you build the Nav2 stack — it transforms configuration decisions from guesswork into deductions.

GLOSSARYKey terms introduced

Configuration space (C-space)
The space of all possible robot configurations, where each configuration is the minimal set of values that fully specifies the robot's geometric state. Planning algorithms treat the robot as a point in this space.
Configuration
A single point in C-space — a specific assignment of values to all degrees of freedom of the robot (e.g., joint angles for an arm, or (x, y, θ) for a mobile base).
C-obstacle
The set of all configurations in C-space at which the robot would be in collision with a workspace obstacle. The complement of C-obstacles is C-free, the valid planning domain.
C-free
The collision-free subset of C-space. Path planning algorithms search for a continuous path from start to goal that lies entirely within C-free.
Minkowski sum
The set A ⊕ B = {a+b : a∈A, b∈B}. Used to compute C-obstacles by growing workspace obstacles by the robot's shape, reducing robot-as-extended-body collision checks to point-in-region tests.
Non-holonomic constraint
A constraint on the robot's velocities (generalized velocities) that cannot be integrated into a constraint on configurations. Differential-drive robots have one: they cannot translate sideways. This restricts which paths in C-free are kinematically feasible, even when they are geometrically valid.
Dimensionality curse
The exponential growth in the number of C-space cells with the number of robot degrees of freedom. Makes grid-based planning tractable only up to ~3-DOF systems; motivates sampling-based planners (RRT, PRM) for higher-DOF robots.
Inflation radius
In Nav2's costmap, the radius by which obstacles are expanded, approximating the Minkowski sum of the obstacle with the robot's footprint. Should be set to the robot's circumscribed circle radius plus a safety margin to ensure the inflated map correctly encodes the C-obstacle boundary.

ACTIVE RECALLCheck your understanding

Answer in your own words first, then reveal.

1Why is planning in C-space preferable to planning in workspace for a robot arm? What specific computational advantage does C-space give you?›

In workspace, the robot has an extended shape. Every collision check requires testing whether the robot's body (a complex 3D or 2D shape) intersects an obstacle — a shape-intersection test whose cost grows with geometric complexity. In C-space, the robot is a point. The workspace obstacles have been pre-transformed into C-obstacle regions that account for the robot's shape. Every collision check is then a point-in-region test: does this configuration point lie inside a C-obstacle? That is much cheaper per query and, crucially, separates the preprocessing of obstacle geometry from the online planning search. The planner never needs to "know" what the robot looks like at planning time — that information has been encoded into C-space.

2FollowBot plans a straight-line (x,y) path to a goal near a wall. It arrives at the goal position but must spin 180° in place to face the required direction. Why does this happen, and what is the correct fix?›

The 2D (x,y) planner treats C-space as 2D, ignoring the heading dimension θ. For a differential-drive robot, the true C-space is 3D: (x, y, θ). The planner finds a valid (x,y) path but makes no commitment about the robot's heading at arrival. The robot arrives with whatever heading it happened to have at the end of the path — which may be very different from the required goal heading. The 180° in-place rotation is the robot correcting its heading after the fact. The correct fix is to use a planner that operates in the full (x,y,θ) C-space — such as Nav2's SmacPlannerHybrid or a lattice planner — which will generate a path that arrives at the goal with the required heading, or explicitly state that the goal heading is unconstrained and let the local planner handle a smooth final rotation. The fix is upstream in the global planner, not a post-processing patch.

3A 6-DOF arm has a C-space obstacle that is disconnected — two separate regions, even though the workspace obstacle is a single convex box. Is this possible? Why or why not?›

Yes, this is entirely possible and common. The mapping from workspace obstacles to C-obstacles via the forward kinematics is nonlinear: the same end-effector position may correspond to multiple joint configurations (arm above vs. below the obstacle; elbow up vs. elbow down). A single convex workspace obstacle can block multiple distinct groups of configurations that correspond to the same workspace region but via different kinematic solutions. The C-obstacle is the set of all joint configurations (θ₁,...,θ₆) that place any part of the arm inside the workspace obstacle — and this set can have a complex, disconnected topology in the 6D joint space even if the workspace obstacle is a simple box. This is one reason why 6-DOF arm planning is hard: C-free can have narrow passages and disconnected components that sampling-based planners must discover without any global map of the space.

4You set Nav2's inflation_radius to 0.10 m on FollowBot (robot radius 0.20 m). The planner succeeds but the robot clips obstacles in deployment. What went wrong and what is the theoretically correct value?›

The inflation radius determines the C-obstacle boundary in the 2D costmap. Setting it to 0.10 m means the planner believes the robot's center can safely approach to within 0.10 m of any obstacle boundary. But FollowBot's actual radius is 0.20 m — so when the robot's center is 0.10 m from the obstacle surface, the robot's body is 0.10 m inside the obstacle. The C-obstacle boundary is too tight; it fails to correctly represent the true C-obstacle. The theoretically correct minimum value is the robot's circumscribed circle radius (0.20 m, the maximum extent from the robot's reference point to any point on its body), because that is the correct Minkowski sum distance: grow the obstacle by 0.20 m so that the robot's center (the point) is always at least 0.20 m from the obstacle surface. In practice, add a safety margin (e.g., 0.25 m total) to account for localization uncertainty. Do not set it lower than the circumscribed radius unless you have a specific reason (e.g., precise known footprint) and accept the collision risk.

Next: graph search — building an A* planner on the C-space costmap →