TL;DR
Generative models like diffusion and flow matching can plan complex robot trajectories, but they are usually either too slow (requiring many sampling steps) or unsafe when facing new, unseen obstacles. ASAP (Arbitrary-Step SAfe Planning) solves both problems at once: it pairs a fast, arbitrary-step flow model (MeanFlow) with a lightweight, discrete-time safety filter. The result is a planner that can generate formally guaranteed safe trajectories in just a few steps—or even a single step—running 20× to over 200× faster than existing safe generative planners without any retraining.
What Problem Does This Paper Address?
In robotics, generative planners (like Diffuser or flow-matching models) learn to generate entire trajectories from expert data, capturing complex, multimodal behaviors. However, deploying them in the real world hits two major roadblocks:
- Speed: Standard diffusion and flow-matching models require dozens or hundreds of iterative denoising/integration steps to produce a trajectory, making real-time planning difficult.
- Safety under unseen constraints: If a new obstacle appears at test time, how do you guarantee the robot won't hit it? Soft guidance methods can steer trajectories away from obstacles, but they offer no formal guarantees. Recent control-theoretic methods (using Control Barrier Functions, or CBFs) do provide formal safety guarantees, but they rely on continuous-time formulations that require repeated safety corrections at every step of a slow, multi-step generation process.
Fast "arbitrary-step" models like MeanFlow can generate trajectories in 1 to 5 steps, but because each step covers a large jump, continuous-time safety guarantees break down. Bridging the gap between arbitrary-step speed and formal safety is the core challenge ASAP tackles.
Methods
ASAP builds on MeanFlow, a generative model that learns the average velocity over arbitrary time intervals rather than instantaneous velocity, allowing it to jump from noise to a planned trajectory in any number of steps $N \ge 1$.
To make this arbitrary-step generation formally safe without retraining, ASAP introduces a control-augmented update at each sampling step:
- Propose: MeanFlow takes a nominal step toward the trajectory.
- Correct: A virtual control input minimally adjusts the proposed trajectory by solving a lightweight Quadratic Program (QP) subject to an arbitrary-step affine barrier constraint.
Instead of using a continuous-time CBF (which only checks instantaneous safety), ASAP uses a discrete-time barrier condition that directly constrains the next generated sample. It also uses a time-varying relaxation schedule ($\rho_t$), meaning the safety requirement is relaxed at the start of generation (when the sample is still mostly noise) and tightens to full safety at the final step.
Crucially, ASAP defines its barrier function using a Signed Distance Function (SDF)—which measures the exact distance to the nearest obstacle boundary. Because the SDF varies linearly along its gradient direction outside the safe set, linearizing the discrete-time barrier constraint introduces zero approximation error (zero conservatism) when using a minimum-norm correction.
Datasets
The authors evaluate ASAP across four simulation benchmarks and one real-world robotic task, all featuring unseen test-time safety constraints not present in the training data:
- Maze2d (Large) (D4RL): Point-mass navigation with two (and up to five) unseen obstacles added at test time.
- Hopper (Med-Expert) (D4RL): Locomotion where an unseen torso-height constraint is imposed, conflicting with fast forward motion.
- KUKA Block-Stacking: A 7-DoF robotic arm stacking blocks, tested with 10% (and up to 30%) tighter joint-space constraints to prevent self-collision.
- Adroit Relocate (D4RL): A high-dimensional dexterous manipulation task (39D state, 30D action) with arm-position collision constraints.
- Real-World Robot Handover: A Franka robot handing an ice cream to a human through a shop window, with a juicer placed as an unseen obstacle.
Key Insights and Ideas
- Zero-conservatism linearization: Normally, linearizing a nonlinear safety constraint introduces approximation errors that make the planner overly cautious. By exploiting the geometry of Signed Distance Functions ($\|\nabla h\| = 1$), ASAP's minimum-norm QP correction follows the SDF gradient, making the affine barrier exact for any step size $N$.
- One-step vs. few-step planning: For $N=1$, ASAP mathematically reduces to a single MeanFlow inference followed by a final SDF projection. For $N > 1$, it outperforms naive final-step projection because the relaxed intermediate steps gently guide the trajectory around obstacles, preserving task performance.
- Robustness to noise: By adding a simple linear robustness margin to the affine constraint, ASAP maintains zero safety violations even when Gaussian noise is injected into the SDF estimates.
Key Results
Across all benchmarks, ASAP achieves 0.00 safety violations while matching or exceeding the task scores of competing methods, at a fraction of the compute time:
- Simulation Speedups: ASAP plans at least 20× faster than safety-guaranteed baselines (like SafeDiffuser, SafeFlowMatcher, and SAD-Flower) on Maze2d (0.06 s vs. 15.5–35.8 s) and Hopper (0.05 s vs. 1.03–1.66 s), and over 250× faster on KUKA Block-Stacking (0.10 s vs. 37.2–68.8 s).
- High-Dimensional Scaling: On the 39D Adroit Relocate task, ASAP plans in 0.15 s with zero violations, over 2× faster than SafeDiffuser (0.59 s) and 10× faster than SAD-Flower (1.54 s).
- Real-World Handover: ASAP plans in 0.04 s per plan—achieving over a 200× speedup compared to SafeDiffuser (13.23 s)—while matching the best task score (1.00) and maintaining 0.00 safety violations.
Limitations and Future Work
- Differentiability: The formal guarantees assume the SDF is differentiable at the proposed states (though the authors note this holds almost everywhere for regular boundaries and can be handled at corners using generalized gradients).
- Future Directions: The authors plan to extend ASAP beyond current assumptions to incorporate dynamic consistency (ensuring generated trajectories strictly obey physical robot dynamics) and richer constraint geometries for more complex robotic systems.
Summary updated