What Is Path Planning?
You tell your robot: "Go to the kitchen." It's 10 meters away, around a corner, past a chair. How does the robot figure out which way to go?
This is path planning — the art of finding a safe, efficient route through space.
The Core Problem
Path planning answers one question: Given where I am and where I want to be, how do I get there without crashing?
Sounds simple. But consider what a robot needs to handle:
- Static obstacles: walls, furniture, trees
- Dynamic obstacles: people, other robots, pets
- Narrow passages: doorways, gaps between tables
- Constraints: the robot can't turn in place, or can only reverse slowly
- Efficiency: the path should be short, smooth, and fast to compute
A human brain solves this effortlessly. For a robot, it's a hard computational problem.
Configuration Space (C-Space)
Here's a key insight: instead of planning in physical space, robots plan in configuration space — the space of all possible robot poses.
For a simple 2D robot at position (x, y) with heading θ, the configuration space is 3D: (x, y, θ). Every point in this space represents a possible robot state.
| Configuration | Example |
|---|---|
| (x, y) | Position on a map (for robots that can spin in place) |
| (x, y, θ) | Position + heading (for robots that can't spin freely) |
| (x, y, z, roll, pitch, yaw) | Full 3D pose (for drones, robot arms) |
| Joint angles | For manipulator arms (6-7 dimensions or more) |
The beautiful thing: obstacles in physical space become "forbidden regions" in C-space. A path planner's job is to find a collision-free path through C-space.
Why bother with C-space? It simplifies the problem. Instead of checking "does this 2m-wide robot fit through this gap?" you ask "is this C-space point inside an obstacle?" The robot's geometry is baked into the C-space representation.
Obstacles: The Inflation Trick
Imagine a circular robot with radius 0.3m trying to navigate around a wall. The robot's center must stay at least 0.3m away from the wall, or it'll collide.
Instead of constantly checking "is my circle touching the wall?", we inflate the obstacle by the robot's radius. Now the robot is a point, and we check "is my point inside the inflated obstacle?"
Real space: C-space (inflated):
Wall Inflated wall
████ ████████
████ ████████
████ ████████
O (robot) · (point)
This trick turns collision checking into a simple point-in-polygon test. Much faster.
The inflation approach assumes the robot is a circle (or can be bounded by one). For oddly-shaped robots, you need more sophisticated collision checking — but the principle is the same: simplify the geometry to speed up planning.
Types of Path Planning
Different scenarios need different approaches:
Grid-Based Planning
Divide the world into a grid (like graph paper). Mark cells as "free" or "occupied." Search for a path through free cells using algorithms like A* or Dijkstra's.
Pros: Simple, reliable, works well for 2D maps. Cons: Grid resolution trades off accuracy vs. speed. Struggles in high dimensions (6D arm planning).
Sampling-Based Planning
Randomly sample robot configurations, check if they're collision-free, and build a graph connecting nearby samples. Algorithms like RRT (Rapidly-exploring Random Tree) use this approach.
Pros: Works in high dimensions (robot arms, complex spaces). Cons: Paths are often jagged and suboptimal without post-processing.
Optimization-Based Planning
Treat the path as a curve, then optimize it to minimize cost (length, smoothness, time) while avoiding obstacles. Used for smooth, natural-looking motion.
Pros: Beautiful, smooth paths. Cons: Computationally expensive, requires good initial guess.
We'll dive deeper into grid-based and sampling-based approaches in the next lessons.
The Two-Stage Pipeline
Most robots use a two-stage approach:
-
Global planning: Compute a high-level path from start to goal using a map. This path might be 100 waypoints over 50 meters. Updated infrequently (1-10 Hz).
-
Local planning: Follow the global path while avoiding immediate obstacles (people, chairs that weren't on the map). Updated frequently (10-50 Hz).
Think of it like driving: your GPS gives you a global plan ("turn left in 200m"), but you steer and brake to avoid cars and pedestrians.
What's Next?
You now understand what path planning is and why it's hard. Next, we'll implement the most popular global planning algorithm: A* search on occupancy grids — the workhorse of 2D robot navigation.