Autonomous driving requires reasoning about interactions with surrounding traffic. A prevailing approach is large-scale imitation learning on expert driving datasets, aimed at generalizing across diverse real-world scenarios. For online trajectory generation, such methods must operate at real-time rates. Diffusion models require hundreds of denoising steps at inference, resulting in high latency. Consistency models mitigate this issue but rely on carefully tuned noise schedules to capture the multimodal action distributions common in autonomous driving. Adapting the schedule typically requires expensive retraining. To address these limitations, we propose a framework based on conditional flow matching that jointly predicts future motions of surrounding agents and plans the ego trajectory in real time. We train a lightweight variance estimator that selects the number of inference steps online, removing the need for retraining to balance runtime and imitation learning performance. To further enhance ride quality, we introduce a trajectory post-processing step cast as a convex quadratic program, with negligible computational overhead. Trained on the Waymo Open Motion Dataset, the framework performs maneuvers such as lane changes, cruise control, and navigating unprotected left turns without requiring scenario-specific tuning. Our method maintains a 20 Hz update rate on an NVIDIA RTX 3070 GPU, making it suitable for online deployment. Compared to transformer, diffusion, and consistency model baselines, we achieve improved trajectory smoothness and better adherence to dynamic constraints.
Code will be released publicly.
Ego Lane Change
Ego initiates and completes a lane change with a smooth, lane-aligned trajectory.
Dual Lane Change
Ego performs a two-lane shift while maintaining comfort and dynamic feasibility.
Other Agents Lane Change
Surrounding vehicles change lanes; the policy adapts and preserves safe spacing.
Courtesy
Ego yields appropriately to enable safe and cooperative interactions.
More Courtesy
A more conservative yielding strategy to reduce conflict with surrounding traffic.
Longer Wait Time (Courtesy)
Ego waits longer before proceeding to remain courteous and avoid disrupting others.
Adaptive Cruise Control
Maintains a safe headway while producing smooth speed and acceleration profiles.
ACC Courtesy
Adaptive cruise control with added courtesy, yielding when beneficial for traffic flow.
Unprotected Left Turn
Navigates an unprotected left turn while interacting safely with oncoming traffic.
(a) The ego takes a sharp right exit.
(b) From the same initial pose, the goal is changed to a left lane change. The policy adapts and produces smooth, lane-aligned trajectories.