top of page

Diffusion-Based Global Path Planning

Path planning is the difference between a robot that “knows where to go” and one that just reacts locally. For legged robots in cluttered indoor spaces (inspection, warehouses, disaster response), planning needs to be fast, reliable, and robust to weird map layouts. The project tackles this by reframing global planning as a generative modeling problem: instead of searching, it generates a whole path in iterative denoising via denoising diffusion conditioned on a map image.


Why classical planning becomes a bottleneck

Search and sampling methods (A*, RRT variants) are effective but can scale poorly: as obstacles increase and maps grow, runtime can rise because they iteratively explore state space. Projects’s key bet is: learn from many optimal demonstrations and then generate paths with a compute budget that can stay constant once you fix diffusion steps.


What it actually is

The project is an image-conditioned diffusion policy for 2D trajectories:

  • Input: map image + start/goal
  • Output: a 2D waypoint sequence (trajectory)

At inference, starts from random noise shaped like a trajectory, then performs iterative denoising until it becomes a valid path (start-to-goal, collision-free).


1) Map generation

Maps are randomized solvable mazes built using Kruskal’s Minimum Spanning Tree process.

2) Trajectory generation

For each map, many start/goal pairs are sampled, and A* is used to generate feasible shortest paths (expert demonstrations).


Model: what is trained

Project uses two core networks:

Visual encoder (map → latent)

A ResNet-18 encoder converts the map image into a spatial embedding (with spatial pooling), trained end-to-end.

Diffusion policy network (trajectory denoiser)

A CNN εθ predicts the noise added to a trajectory sample at diffusion step k, conditioned on the map embedding (and optionally start/goal). Conditioning is implemented using FiLM.

Training minimizes:

  • MSE(true noise, predicted noise) across random diffusion steps k.

Inference: how a path is generated

  1. Sample start and goal
  2. Estimate a path length pathl (number of trajectory points to generate)
  3. Create a pathl × 2 Gaussian noise trajectory and inpaint first/last points with start/goal
  4. Run reverse diffusion for k steps to denoise into a trajectory

Real-World Application (Diffusion-Based Path Finding)

Diffusion planners are valuable for real robots that need fast global replanning in cluttered spaces: the model generates a full start→goal waypoint path from a map image as a trajectory proposal, then the robotics stack applies collision checks, smoothing, and a local controller to enforce dynamics and handle last-meter changes—delivering near-constant planning compute, with the key caveat that path-length/horizon choice must be handled carefully.

Other Real-World Uses of Diffusion Planning/Generation

  • Autonomous driving: generate multiple safe candidate trajectories, then verify/select with constraints.
  • Robot arms: propose collision-free motions; validate with IK + collision checking.
  • Drones: fast 3D trajectory proposals + reactive avoidance.
  • Game AI / crowds: scalable, natural multi-agent path generation.
  • Medical routing analogs: propose feasible paths in constraint maps (e.g., catheter-like routing), then optimize.
  • Routing/logistics: generate candidate routes/schedules; validate/repair for feasibility routing / logistics (abstract graphs):** Generate candidate routes/schedules under constraints, then validate/repair with feasibility checks.

bottom of page