alphaFeedback

WorksComputer Science

Integrating Flow Matching and Model Predictive Control for Safe Robot Navigation

AI contributions
  • ChatGPT 5
  • 5-Thinking
View details

Abstract

Learning-based path planners based on diffusion and flow matching can generate diverse trajectories from demonstrations but typically lack mechanisms for constraint satisfaction and collision avoidance during deployment. This work proposes a framework that combines flow-matching-based path planning with model predictive path-following control to integrate data-driven path generation with real-time, constraint-aware execution. The flow-matching model captures multimodal path distributions, while the predictive controller adapts motion online to satisfy state and input constraints and avoid obstacles using updated local sensor information. An event-triggered re-planning scheme incorporates predictive control solutions into subsequent path generation, promoting collision-free navigation in environments with previously unseen obstacles. Simulation results for mobile robot navigation demonstrate robust performance across cluttered environments. The framework provides a systematic approach to combining flow matching with predictive control for adaptive, data-driven navigation.

Introduction

Recent advances in robot control for complex tasks have been driven by increasingly capable machine learning algorithms and the availability of high-performance computing resources [1, 2, 3]. Machine learning enables expressive control policies that often outperform classical methods in high-dimensional and multimodal settings, particularly when trained via imitation or reinforcement learning.

To handle multimodal data distributions, recent work has applied deep generative models based on diffusion [4] and flow matching [5, 6], originally developed for image synthesis, to robotics domains including imitation learning [7, 8], offline RL [9], grasping [10, 11], and motion planning [12, 13, 14, 15, 16, 17, 18]. These models are particularly attractive for their ability to represent complex, multimodal trajectory distributions and to generate diverse candidate motions from demonstration data, including different paths from the same initial point. In this article, we use a variant of flow matching the shortcut model [19], which offers fast sampling [20].

One central challenge in learning policies from demonstrations is the lack of guarantees for collision avoidance during deployment. For example, a generative model trained on human-demonstrated trajectories may produce paths that become unsafe when new obstacles are introduced or when dynamics or constraints (e.g., velocity limits) change. Nevertheless, the data remains valuable as a reference for a lower-level controller that can safely adapt to it.

To this end, we combine the deep generative planner with a model predictive path-following controller (MPPFC) [21, 22, 23], which tracks and locally reshapes the generated path to ensure safety, cf. Figure 1. Unlike tracking model predictive control (MPC) [24, 25], MPPFC treats path progression and velocity as optimization variables, enabling adaptive motion profiles and reactive behavior in dynamic environments. By enforcing input and state constraints, including collision avoidance and actuator limits, MPPFC ensures constraint satisfaction even if the reference path must be temporarily deviated from.

Image not extracted

Figure 1. Global flow-matching-based path planning with local adaptation via model predictive path-following control (MPPFC). Given the current and goal system states, a batch of path parametrizations is sampled from the generative model. A collision-free path, considering known obstacles (gray circles), is selected (in blue), and multiple MPPFC instances with varying prediction horizons optimize the system inputs in parallel to follow it. If unforeseen obstacles (light red circle) make the current path or optimal control problem infeasible, the MPC with the shortest feasible prediction horizon is chosen and applied to the system. Once a specific condition is met, replanning is triggered to determine a new global plan biased by the latest state prediction.

Previous works have used simpler generative models, focused on unimodal settings and control-theoretic guarantees [26, 27, 28, 29, 30]. Since combining diffusion and flow matching generative models with predictive control offers a large potential [31], this has been explored by a series of works: [32] uses a diffusion model to learn multi-step predictions and warm-start MPC optimizations; [33] parameterizes MPC feedback using diffusion; [34] applies diffusion models to solve nonlinear MPC problems; and [35, 36] explore diffusion rollouts for model predictive path integral control (MPPIC). Relatedly, [31] uses diffusion to generate subgoals for long-horizon control with MPPIC. However, because of the underlying MPC methods used, these works do not guarantee safety or path-following. In contrast, our approach combines flow-matching for reference generation with MPPFC for local safety and reference tracking, overcoming the limitations of the current methods. By using MPPFC to track and refine paths generated via flow matching, we ensure constraint satisfaction — particularly collision avoidance — and enable real-time adaptation. In this sense, the MPPFC shows similarities to predictive safety filters [37, 38, 39]. However, in contrast to standard safety filters that modify unsafe inputs to ensure safety, we directly apply MPPFC as the main controller, using its structure to dynamically shape both path execution and progression.

The main contributions of this work are: (1) a framework that combines a flow-matching-based path generator, learned from human demonstrations, with MPPFC to enable constraint satisfaction and collision avoidance during execution; (2) a bidirectional coupling in which flow-generated paths guide MPPFC and its predictions bias the flow planner during eventtriggered re-planning; (3) a systematic evaluation demonstrating collision-free path-following in environments with multiple obstacle configurations not observed during training. The remainder of the paper is structured as follows: Section II outlines the problem setting. Section III introduces the generative model used to learn path distributions from demonstrations. Section IV details the MPPFC formulation and its integration with the planner. § 5 presents simulation results, and Section VI concludes the paper.

Problem Formulation

Consider a dynamical system governed by known continuous-time dynamics:

x˙(t)=f(x(t),u(t)),x(t0)=x0,y(t)=h(x(t)).(1)\begin{aligned} \dot{x}(t) &= f(x(t),u(t)), \quad x(t_0) = x_0,\\ y(t) &= h(x(t)). \tag*{(1)} \end{aligned}

Here, x∈X⊆Rnxx \in\mathcal{X} \subseteq\mathbb{R}^{n_x} represents the system state, u∈U⊆Rnuu \in\mathcal{U} \subseteq\mathbb{R}^{n_u} is the control input, and y∈Y⊆Rnyy \in\mathcal{Y} \subseteq\mathbb{R}^{n_y} denotes the system output. The function f:Rnx×Rnu→Rnxf : \mathbb{R}^{n_x} \times\mathbb{R}^{n_u} \to\mathbb{R}^{n_x} defines the system dynamics, while h:Rnx→Rnyh : \mathbb{R}^{n_x} \to\mathbb{R}^{n_y} defines the output map. The initial state at time t0t_0 is given by x0∈Rnxx_0 \in\mathbb{R}^{n_x}.

Given a global reference path, the control objective is to navigate the system through a cluttered environment while strictly satisfying system constraints and avoiding collisions. Rather than relying on classical sampling-based planners (e.g., RRT [40]), we assume access to expert task demonstrations that encode nuanced human preferences for spatial navigation. To model and reproduce these demonstrations, we learn a flow-matching-based generative planner.

Given start and goal configurations, candidate paths are generated by sampling from this learned flow-matching model. Formally, a path is defined as a geometric curve ρ:Cθ→Y\rho: \mathcal{C}_{\theta} \to\mathcal{Y}, θ↦y=ρ(θ)\theta\mapsto y = \rho(\theta) in the system’s output space, parametrized by a scalar path parameter θ\theta. We represent each path as a linear combination of a finite set of fixed-order B-splines, training the flow-matching model directly on the governing coefficients.

While the generative planner provides a strong, obstacle-aware prior based on demonstrations, it is not strictly tasked with enforcing real-time constraints or active collision avoidance using all current local information. Instead, this responsibility is systematically delegated to a lower-level controller that incorporates this information.

Specifically, the generated paths serve as reference priors for parallel instances of an MPPFC, each configured with a different prediction horizon. The predictive controller seamlessly enforces state and input constraints, adapting the trajectory online to navigate environmental changes and previously unseen obstacles. During closed-loop operation, the generative model is selectively resampled whenever predefined criteria are met (e.g., a significant spatial deviation from the reference path). Crucially, these newly generated paths are biased by the predictive controller’s solution trajectory. This bidirectional coupling steers the generative model toward inherently collision-free regions of the task space, ensuring tight consistency between global planning and local execution while minimizing the corrective effort demanded of the controller.

Generative Modeling for Path Planning

We begin by introducing the path parametrization used to represent output paths. We then describe how demonstration data are converted into this parametrized representation for use in learning. Finally, we provide an overview of the generative model of expert behaviors, formulated as a probabilistic model over paths inferred from demonstrations.

From Trajectory Data to Path Parametrization

We parameterize the output path ρ(θ)∈Rny\rho(\theta) \in\mathbb{R}^{n_y} as a linear combination of M∈N∗M \in\mathbb{N}^{*} clamped B-splines of order r∈Nr \in\mathbb{N}. For each dimension jj, the path is given by

ρj(θ)=∑m=1Mξm,jBm,r(θ),(2)\rho_j(\theta) = \sum_{m=1}^{M} \xi_{m,j} B_{m,r}(\theta), \tag*{(2)}

where ξm,j\xi_{m,j} are the governing coefficients and Bm,r(θ)B_{m,r}(\theta) is defined via the Cox–de Boor recursion formula [41]. The full path ρ(θ)\rho(\theta) is thus characterized by MnyM n_y coefficients.

Given N∈N∗N \in\mathbb{N}^{*} time-indexed expert demonstrations τ(i)={(tk,y(tk))}k=0ni\tau^{(i)} = \{(t_k,y(t_k))\}_{k=0}^{n_i}, we convert these into time-independent geometric paths. This representation is agnostic to variations in trajectory lengths, sampling rates, and temporal profiles. We extract the corresponding coefficient dataset Dξ={ξ(i)}i=1N\mathcal{D}_{\xi} = \{\xi^{(i)}\}_{i=1}^{N} from the trajectory data Dτ={τ(i)}i=1N\mathcal{D}_{\tau} = \{\tau^{(i)}\}_{i=1}^{N} by solving a linear least-squares regression for each demonstration as

ξ(i)=arg⁡min⁡ξ(i){∑j=0ni∥y(tj)−ρ(θj)∥2∣(tj,y(tj))∈τ(i)},(3)\xi^{(i)} = \underset{\xi^{(i)}}{\arg\min}\left\{\sum_{j=0}^{n_i}\left\lVert y(t_j)-\rho(\theta_j)\right\rVert^2 \mid(t_j,y(t_j))\in\tau^{(i)}\right\}, \tag*{(3)}

using evaluation points θj=(tj−t0)/(tni−t0)\theta_j = (t_j-t_0)/(t_{n_i}-t_0). This minimization has a standard closed-form solution [42].

Modeling and Learning Expert Behaviors

To model expert behavior, we learn a shortcut model [19], a variant of flow matching, on the dataset Dξ\mathcal{D}_{\xi}. This model encodes the distribution of path coefficients p(ξ∣c)p(\xi\mid c), conditioned on a context c∈Rncc \in\mathbb{R}^{n_c}, representing the start and goal states, and captures the (potentially multi-modal) distribution of expert behaviors in the environment. This distribution is modeled with flow-matching using a time-varying vector field whose solutions map samples from an initial noise distribution to the data distribution. The shortcut model is trained to match the displacement between noise and demonstration samples while enforcing consistency across integration steps, using the loss function

Lζ=Eξ0,ξ1,(λ,δ)[∥vζ(λ,ξλ,0)−(ξ1−ξ0)∥2+∥vζ(λ,ξλ,δ)−vˉ∥2].(4)L_{\zeta} = \mathbb{E}_{\xi_0,\xi_1,(\lambda,\delta)}\left[\left\lVert v_{\zeta}(\lambda,\xi_{\lambda},0)-(\xi_1-\xi_0)\right\rVert^2 + \left\lVert v_{\zeta}(\lambda,\xi_{\lambda},\delta)-\bar{v}\right\rVert^2\right]. \tag*{(4)}

Here, ξ0∼N(0,I)\xi_0 \sim\mathcal{N}(0,\mathbb{I}), ξ1∼Dξ\xi_1 \sim\mathcal{D}_{\xi}, and (λ,δ)∼U(0,1)×U(0,1)(\lambda,\delta) \sim\mathcal{U}(0,1) \times\mathcal{U}(0,1). Furthermore, ξλ=(1−λ)ξ0+λξ1\xi_{\lambda} = (1-\lambda)\xi_0+\lambda\xi_1, and vˉ=0.5[vζ(λ,ξλ,0.5δ)+vζ(λ+δ,ξλ+δ,0.5δ)]\bar{v} = 0.5[v_{\zeta}(\lambda,\xi_{\lambda},0.5\delta)+v_{\zeta}(\lambda+\delta,\xi_{\lambda+\delta},0.5\delta)]. The resulting model can efficiently generate expert-like path coefficients, and we refer the reader to [19] for full details.

Model Predictive Control for Path Following and Safety Filtering

Once a path is generated using the expert model, we use it as a reference in a MPPFC. We first review the basics of MPPFC and then discuss its application as an integrated local safety filter and tracking controller, ensuring collision-free closed-loop behavior. Finally, we detail the proposed integration of the learned path planner with the MPPFC.

Model Predictive Path-Following Control

We use a MPPFC to steer the system (1) along a given path, following established approaches [21, 22, 23]. To enable parallel evaluation of multiple horizon lengths, we consider K∈NK \in\mathbb{N} controllers, indexed by i∈{0,1,…,K−1}i \in\{0,1,\ldots,K-1\}. Each controller employs an extended prediction horizon of (T+iδt)(T+i\delta_t), where T∈R>0T \in\mathbb{R}_{>0} denotes a base horizon length and δt∈R>0\delta_t \in\mathbb{R}_{>0} is a fixed increment that enables systematical exploration of longer horizons. The corresponding optimization problem is formulated as

πi(xk)=arg⁡min⁡uˉ,wˉ J(eˉ,uˉ,θ,wˉ)(5)\pi_i(x_k)=\underset{\bar{u},\bar{w}}{\arg\min}\ J(\bar{e},\bar{u},\theta,\bar{w}) \tag*{(5)}
s.t.∀s∈[0,T+iδt]:xˉ˙(s)=f(xˉ(s),uˉ(s)),xˉ(0)=xk(6)\begin{aligned} \text{s.t.}\quad&\forall s \in[0,T+i\delta_t]:\\ &\dot{\bar{x}}(s)=f(\bar{x}(s),\bar{u}(s)),\quad\bar{x}(0)=x_k \tag*{(6)} \end{aligned}
θ˙(s)=g(θ(s),wˉ(s)),θ(0)=θk(7)\dot{\theta}(s)=g(\theta(s),\bar{w}(s)),\quad\theta(0)=\theta_k \tag*{(7)}
yˉ(s)=h(xˉ(s))(8)\bar{y}(s)=h(\bar{x}(s)) \tag*{(8)}
eˉ(s)=ρ(θ(s))−yˉ(s)(9)\bar{e}(s)=\rho(\theta(s))-\bar{y}(s) \tag*{(9)}
θ(s)∈Cθ,wˉ(s)∈W(10)\theta(s)\in\mathcal{C}_{\theta},\quad\bar{w}(s)\in\mathcal{W} \tag*{(10)}
xˉ(s)∈Xsafe⊆X,uˉ(s)∈U(11)\bar{x}(s)\in\mathcal{X}_{\mathrm{safe}}\subseteq\mathcal{X},\quad\bar{u}(s)\in\mathcal{U} \tag*{(11)}
[xˉT(T+iδt) θT(T+iδt)]T∈Ω.(12)\left[\bar{x}^{\mathsf{T}}(T+i\delta_t)\ \theta^{\mathsf{T}}(T+i\delta_t)\right]^{\mathsf{T}}\in\Omega. \tag*{(12)}

The controller πi\pi_i predicts the system’s future behavior using (5b) and (5d) to optimize the future input trajectory uˉ\bar{u}, typically parameterized as piecewise constant. Physical limits and collision-avoidance requirements are captured by the system state and input constraint sets Xsafe\mathcal{X}_{\mathrm{safe}} and U\mathcal{U} in (5g). Concurrently, the virtual dynamics (5c) and virtual input wˉ\bar{w} control the progress along the reference path, effectively coupling planning and control. The corresponding constraints in (5f) act as tuning parameters. The terminal cost (5h) ensures consistency between the true and the virtual states at the end of the horizon, promoting convergence to the reference path while respecting system and path constraints.

The cost function (5a) is defined as

J(eˉ,uˉ,θ,wˉ)=∫0T+iδtL(eˉ(s),uˉ(s),θ(s),wˉ(s)) ds+E(xˉ(T+iδt),θ(T+iδt)),(13)J(\bar{e},\bar{u},\theta,\bar{w})=\int_{0}^{T+i\delta_t}L(\bar{e}(s),\bar{u}(s),\theta(s),\bar{w}(s))\,\mathrm{d}s+E(\bar{x}(T+i\delta_t),\theta(T+i\delta_t)), \tag*{(13)}

where the stage cost LL penalizes path deviations (5e), large control inputs, and the distance of θ\theta to its final value, encouraging forward progress. The terminal cost EE and constraint (5h) jointly ensure convergence to the path when chosen appropriately [22]. Problem (5) can be solved with gradient-based (gMPPFC) or sampling-based (sMPPFC) [43, 44] methods, though the latter do not guarantee strict constraint satisfaction.

MPPFC for Safety Filtering

The flow matching model generates reference paths that provide a strong, obstacle-aware prior based on the demonstrations. To systematically address dynamic environmental changes, such as new or unforeseen obstacles, we integrate this generative planning with MPPFC using up-to-date local sensor information.

In principle, one could adapt the generative model directly to new obstacles using an energy-based guidance term: an energy function Jg:Rnξ→R≥0J_g : \mathbb{R}^{n_\xi} \to\mathbb{R}_{\geq0} assigns higher values to unsafe regions, and its gradient ∇ξJg(ξ)\nabla_\xi J_g(\xi) biases the sampled path away from obstacles. This yields a modified vector field v~ζ(λ,ξ)=vζ(λ,ξ)−γg∇ξJg(ξ)\tilde{v}_\zeta(\lambda,\xi) = v_\zeta(\lambda,\xi) - \gamma_g \nabla_\xi J_g(\xi), where γg>0\gamma_g > 0 controls the guidance strength. However, evaluating the flow-matching model is computationally expensive, and real-time systems can typically only afford a small number of integration steps [14]. With a limited number integration steps, a large γg\gamma_g risks pushing the generative process out of distribution, while a small γg\gamma_g has negligible effect (see Figure 2). Furthermore, updating the entire global plan for purely local environmental changes is computationally inefficient. To overcome these limitations, we leverage the MPPFC to locally re-plan the system’s behavior, enforcing system dynamics and collision-avoidance constraints exclusively where needed (see Figure 1).

Image not extracted

Figure 2. Path planning using a flow matching model guided by an additive gradient. Blue indicates obstacles present during data collection, whereas new obstacles are depicted in light red, with the red circle denoting a clearance margin for the mobile robot’s footprint. Generated path samples are plotted as green lines. The subfigures demonstrate: (a) unguided sampling, (b) guidance with a low scale (γg=0.2\gamma_g = 0.2), and (c) guidance with a high scale (γg=0.6\gamma_g = 0.6).

At the beginning of task execution, we generate a batch of candidate paths from the generative model and select a collision-free path with respect to known obstacles. Rather than strictly requiring the flow-matching planner to output directly executable trajectories, our framework systematically delegates dynamic feasibility and real-time safety to the predictive controller. The selected path is incorporated into the MPPFC formulation in two complementary ways: it acts as a reference objective within the stage cost and defines the terminal region constraint (12). Specifically, the MPPFC constrains the system to return to and align with the reference path at the end of the prediction horizon. The exact realignment point is dynamically determined by the controller via the path dynamics and virtual input.

This hierarchical integration explicitly accounts for previously unknown static obstacles at runtime.1 Assuming the system is equipped with sensors (e.g., LiDAR), newly detected obstacles are convexified and incorporated into the safe set Xsafe\mathcal{X}_{\mathrm{safe}} as state constraints. Once the system safely bypasses an obstacle and it exits the sensing range, the associated constraints are removed to minimize the computational burden.

Due to the terminal alignment structure of the MPPFC, feasibility dictates that obstacle avoidance and path re-alignment must be achieved within a single prediction horizon. If an obstacle forces a significant deviation, strict terminal alignment may render the optimal control problem infeasible. To ensure robust collision-free operation, we conceptually decouple short-term collision avoidance from strict terminal alignment. While this can be achieved by softening the terminal constraint or employing a generative-guided terminal cost, we adopt a parallelized horizon-extension strategy. We solve multiple MPPFC instances simultaneously, each with an incrementally extended prediction horizon but a fixed number of collocation points. We then execute the solution from the instance with the shortest feasible horizon (see Figure 1). Because a shorter horizon with fixed collocation points implies a smaller integration step size, it naturally yields higher control fidelity. The controller autonomously reverts to the shortest horizon once local feasibility is re-established.

For substantial deviations, event-triggered re-planning using the expert model is employed to improve adherence to the demonstrated global behavior. Re-planning is triggered when the system exits a user-defined neighborhood around an evaded obstacle — after the MPPFC has successfully ensured local safety. This allows the global planner to realign the overall trajectory with the expert distribution. Crucially, switching the reference path within the MPPFC operates seamlessly without requiring modifications to the underlying algorithmic procedure.

Ultimately, this systematic integration of generative planning and predictive control prioritizes real-time adaptability and robust empirical performance over conservative formal constraints. By combining the global geometric awareness of flow-matching with the strict local safety filtering of the MPPFC, the proposed strategy consistently produces collision-free behavior in practice, assuming the existence of a topologically viable alternative path, a standard and practical assumption for agile robotic platforms operating in task-oriented environments.

Biasing the Planner Toward the MPPFC Solution

A key component of the proposed method is re-planning the reference path during evasive maneuvers to improve adherence to demonstrated behaviors. We achieve this by using the predictive controller’s collision-free solution, which incorporates updated local sensor and constraint information, to bias the generative planner toward locally safe trajectories, ensuring candidate paths remain consistent with the current system state.

Introducing this sampling bias in classical generative models, such as VAEs [48], is not straightforward. In denoising-diffusion-like methods, such as flow matching, this is easily integrated by applying noise steps to the previous MPC solution, followed by denoising steps. This approach ensures the generated trajectories remain closer to the MPC prediction than sampling from standard Gaussian noise followed by multiple denoising steps. A similar approach has been used in diffusion models for autonomous racing [49].

Specifically, instead of starting the generative process from pure noise ξ0∼N(0,I)\xi_0 \sim\mathcal{N}(0,I), we propose initializing it from an intermediate step λ=λˉ\lambda= \bar{\lambda}, with 0<λˉ<10 < \bar{\lambda} < 1. This requires a partially noisy sample ξλˉ=(1−λˉ)ξ0+λˉξ1\xi_{\bar{\lambda}} = (1-\bar{\lambda})\xi_0 + \bar{\lambda}\xi_1, which depends on a clean sample ξ1\xi_1. Since the true ξ1\xi_1 is generally unavailable, we use the MPC’s latest prediction to obtain a local approximation ξ^1\hat{\xi}_1. This estimate is obtained by fitting a B-spline using (3), providing a fast-to-compute, biased initialization. The generative process is then started with (ξλˉ,λˉ)(\xi_{\bar{\lambda}},\bar{\lambda}) based on ξ^1\hat{\xi}_1, producing candidate paths that are locally aligned with the controller’s current plan and likely maintain its collision-avoidance guarantees locally.

In addition to aligning the generative process with the MPC plan, the biasing provides notable computational advantages. By initializing the flow-matching model from an intermediate state informed by the MPC prediction, sampling typically requires fewer refinement steps and can therefore be performed more efficiently. Furthermore, by increasing the likelihood of obtaining a collision-free alternative reference path, the bias often reduces the magnitude of corrective actions required by the MPC. This, in turn, generally decreases the computational effort associated with solving the MPC problem.

Simulation Experiments

In this section, we evaluate our framework in simulated tasks. The experiments are constructed to answer the following questions:

  1. What is the system’s behavior in a navigation task with unknown obstacles?

  2. How do the MPC horizon expansion and re-planning strategies influence the success rate?

Environment, Data Collection, and Shortcut Model

To train the shortcut model effectively, we require a diverse and informative dataset of collision-free paths. Such a dataset is constructed in a physically realistic MuJoCo simulation [50], where a human operator navigates a mobile robot through a cluttered environment populated with various static obstacles (see Figure 4). The operator guides the robot between multiple random start and goal positions, producing paths that, due to the non-deterministic nature of human behavior, exhibit a multimodal distribution. The resulting dataset consists of approximately 1800 demonstrations. Our shortcut model is based on a diffusion transformer architecture as in [51]. The model is trained on an NVIDIA A100 GPU, and evaluated on an NVIDIA GeForce RTX 3090 GPU.

Image not extracted

Figure 4. Simulation of a mobile robot navigating a cluttered environment. The robot (gray circle ●) moves from a start (green circle ●) to a goal position (red dot ●). Known static obstacles are blue (●), while previously unknown obstacles are red circles (●) with a red boundary indicating the robot’s size margin (—). The generative planner produces candidate trajectories (solid light-green lines —), from which a single path (dashed black line - -) is selected. The executed closed-loop path is dark green (—), and the current predicted trajectory is dashed light blue (- -). A yellow line (—) denotes a newly chosen path from intermediate samples, while the dashed magenta line (- -) traces the intermediate path currently being followed (the prior yellow path). The dashed gray line (- -) defines the margin condition for sampling new paths.

Dynamics, Environments, and MPPFC Design

We consider a mobile robot with dynamics x˙=[u1cos⁡x3,u1sin⁡x3,u2]T\dot{x} = [u_1 \cos x_3, u_1 \sin x_3, u_2]^\mathsf{T}, where x=[x1,x2,x3]Tx = [x_1,x_2,x_3]^\mathsf{T} denotes the state (planar position (x1,x2)(x_1,x_2) in m and heading x3x_3 in rad), and the inputs are the translational velocity u1∈[−1.5,1.5]u_1 \in[-1.5,1.5] (in m s−1\mathrm{m\,s}^{-1}) and the angular velocity u2∈[−1.5,1.5]u_2 \in[-1.5,1.5] (in rad s−1\mathrm{rad\,s}^{-1}). The output is y=(x1,x2)y = (x_1,x_2), and simulations run with a 50 ms sampling time.

We consider four environments (C1–C4) (Figure 3) containing identical static obstacles (blue) but varying configurations and sizes of previously unknown obstacles (red).

Image not extracted

Figure 3. Simulation environments. Obstacles in blue are present during the demonstrations. During deployment, unknown objects in red might appear.

The MPPFC instances are designed according to (5), with obstacles within the system’s sensing range defining the state constraint set Xsafe\mathcal{X}_{\mathrm{safe}} to enforce obstacle avoidance and ensure local reactivity. We initially tested the MPC framework using a sampling-based approach, but found that the resulting inputs lacked smoothness, which negatively impacted path-following accuracy and traversal time. Consequently, we focus on gradient-based implementations using CasADi [52], which provide smoother control inputs and more reliable path-following performance.

We test three re-planning conditions: (P1) resampling every 10 closed-loop steps; (P2) resampling when a newly detected obstacle causes a collision in the MPC prediction2; and (P3) resampling upon exiting a safety margin around an evaded obstacle.

Closed-Loop Performance

We first consider the environment C4 and the setting shown in Figure 4. We employ K=15K = 15 parallel controller instances with a base horizon length T=1.0T = 1.0 s, an increment δt=0.2\delta_t = 0.2, and 20 equidistant collocation points along each horizon. This results in a maximum horizon length of 3.8 s. We employ the re-planning strategy P3, as proposed earlier.

We sample a batch of paths from the shortcut model, conditioned on a given start and desired goal position (Figure 4a). All sampled paths are collision-free with respect to the obstacles encountered during demonstrations. From this batch, a path is randomly selected, and the parallel MPC instances compute the corresponding optimal inputs. The solution from the instance with the shortest horizon that returns a feasible solution is then executed.

After some time, a previously unknown obstacle appears within the system’s sensing range, causing the current reference path to be in collision (4b). To initiate an evasive maneuver, we include collision avoidance with the detected obstacle as a hard constraint in the MPC. However, adding this constraints can make the optimal control problem infeasible. Specifically, the MPPFC must re-align with the path at the end of each prediction horizon, and depending on the horizon length, input limits, and other state constraints, this may no longer be achievable for any controller instance.

In such cases, the controller with the shortest horizon among the feasible instances is still selected and executed. Moreover, whenever a new obstacle is added as a collision-avoidance constraint, we initialize the path parameter for the next horizon with θ(T)=1\theta(T)=1, corresponding to the end of the reference path. This has been found beneficial, as it biases the optimizer toward solutions that prioritize significant path progress, increasing the likelihood that one controller instance remains feasible while planning to return to the reference path at the horizon’s end (Figure 4c). If necessary, the prediction horizons of each controller instance can be iteratively extended until feasibility is recovered, depending on the available computation budget.

When the robot exits a user-defined neighborhood around an evaded obstacle (illustrated as a circle in Figure 4d, gray dashed), re-planning is triggered and a new batch of paths (light green) is sampled from the current position to the desired goal. As described in Section IV-C, we bias the planner by initializing it with a noisy version of the MPPFC output at λˉ=0.75\bar{\lambda}=0.75, rather than from standard Gaussian noise. As a result, the planner generates high-quality, locally collision-free candidate paths with only two integration steps.

From the newly generated paths, we select one that is collision-free with respect to both the obstacles in the current sensing range and those encountered during demonstration (yellow line in Figure 4d) and deploy it in all controller instances. If no such path exists, the framework continues without interruption, relying on the parallel MPC instances to handle local feasibility. This procedure is repeated whenever a new, previously unknown obstacle appears (Figure 4e,Figure 4f), until the mobile robot reaches its destination.

Validation using Ablation Studies

We conduct an ablation study to assess MPC horizon expansion and the re-planning strategies. The obstacle configurations and re-planning conditions are evaluated across K={5,7,15}K=\{5,7,15\} controller instances, corresponding to maximum prediction horizons Tmax⁡={1.8 s,2.2 s,3.8 s}T_{\max}=\{1.8\,\mathrm{s},2.2\,\mathrm{s},3.8\,\mathrm{s}\}, respectively. Due to the stochasticity of the generative model, each scenario is simulated 10 times. Results for all tested combinations are shown in Figure 5 in terms of success rates (successful trials over total trials). The number of re-planning events using the generative planner is reported in Figure 6, considering only successful trials.

Image not extracted

Figure 5. Success rates by obstacle configuration and re-planning strategy.

Image not extracted

Figure 6. Number of re-planning events across obstacle configurations and re-planning strategies.

For Tmax⁡=1.8 sT_{\max}=1.8\,\mathrm{s} (K=5K=5), the controller is not always able to find a feasible solution across all scenarios, indicating that the prediction horizon is too short to provide consistently reliable performance. Increasing the horizon to Tmax⁡=2.2 sT_{\max}=2.2\,\mathrm{s} (K=7K=7) improves robustness, although obstacle configuration C3 remains challenging. With the longest horizon, Tmax⁡=3.8 sT_{\max}=3.8\,\mathrm{s} (K=15K=15), all tested combinations achieve a 100% success rate, except for P2 in C4, which achieves 90%. Notably, P3 achieves a 100% success rate across all configurations for both Tmax⁡=2.2 sT_{\max}=2.2\,\mathrm{s} and Tmax⁡=3.8 sT_{\max}=3.8\,\mathrm{s}, while requiring fewer evaluations of the generative planner and thus improving computational efficiency without compromising performance. Overall, the results indicate that the approach enables effective and efficient path planning and tracking in cluttered environments, maintaining collision-free behavior while outperforming naive baseline implementations.

Conclusions

We proposed a framework that combines flow-matching-based generative planning, trained on expert demonstrations, with model predictive path-following control for adaptive navigation in cluttered environments. The generative planner provides diverse candidate paths, while the predictive controller incorporates onboard sensor information to adapt these paths online and ensure constraint satisfaction and collision-free execution, including in the presence of previously unseen obstacles. Event-triggered re-planning further couples path generation and control throughout task execution. Future work will focus on incorporating richer contextual information, such as perception data, into path generation and extending the framework to dynamic environments through motion prediction.

Acknowledgments

During the preparation of this work, the authors used ChatGPT 5 and 5-Thinking by OpenAI to improve language and wording. The authors reviewed and edited the generated content and take full responsibility for the final publication.

References

  1. [1]S. Levine, C. Finn, T. Darrell, and P. Abbeel, “End-to-end training of deep visuomotor policies,” J. Mach. Learn. Res., vol. 17, pp. 1–40, 2016.
  2. [2]T. Haarnoja, S. Ha, A. Zhou, J. Tan, G. Tucker, and S. Levine, “Learning to walk via deep reinforcement learning,” in R:SS. XV, 2019.arxiv.org/abs/1812.11103
  3. [3]C. Chi, Z. Xu, S. Feng, E. Cousineau, Y. Du, B. Burchfiel, R. Tedrake, and S. Song, “Diffusion policy: Visuomotor policy learning via action diffusion,” Int. J. Robot. Res., 2024.
  4. [4]J. Ho, A. Jain, and P. Abbeel, “Denoising diffusion probabilistic models,” in NeurIPS, 2020.arxiv.org/abs/2006.11239
  5. [5]Y. Lipman, R. T. Q. Chen, H. Ben-Hamu, M. Nickel, and M. Le, “Flow matching for generative modeling,” arXiv:2210.02747, 2023, Version 2.arxiv.org/abs/2210.02747
  6. [6]Y. Lipman, M. Havasi, P. Holderrieth, N. Shaul, M. Le, B. Karrer, R. T. Q. Chen, D. Lopez-Paz, H. Ben-Hamu, and I. Gat, “Flow matching guide and code,” arXiv:2412.06264, 2024, Version 1.arxiv.org/abs/2412.06264
  7. [7]C. Shi, S. Feng, Y. Du, Z. Xu, E. Cousineau, B. Burchfiel, and S. Song, “Diffusion policy: Visuomotor policy learning via action diffusion,” in R:SS XIX, 2023.
  8. [8]M. Reuss, M. Li, X. Jia, and R. Lioutikov, “Goal-conditioned imitation learning using score-based diffusion policies,” in R:SS XIX, 2023.arxiv.org/abs/2304.02532
  9. [9]M. Janner, Y. Du, J. Tenenbaum, and S. Levine, “Planning with diffusion for flexible behavior synthesis,” in ICML, 2022.arxiv.org/abs/2205.09991
  10. [10]J. Urain, N. Funk, J. Peters, and G. Chalvatzaki, “SE(3)-DiffusionFields: Learning smooth cost functions for joint grasp and motion optimization through diffusion,” in ICRA, 2023.arxiv.org/abs/2209.03855
  11. [11]J. Carvalho, A. T. Le, P. Jahr, Q. Sun, J. Urain, D. Koert, and J. Peters, “Grasp diffusion network: Learning grasp generators from partial point clouds with diffusion models in SO(3)×R³,” arXiv:2412.08398, 2024, Version 1.arxiv.org/abs/2412.08398
  12. [12]J. Carvalho, M. Baierl, J. Urain, and J. Peters, “Conditioned score-based models for learning collision-free trajectory generation,” in NeurIPS 2022 Workshop on Score-Based Methods, 2022.
  13. [13]J. Carvalho, A. T. Le, M. Baierl, D. Koert, and J. Peters, “Motion planning diffusion: Learning and planning of robot motions with diffusion models,” in IROS, 2023.arxiv.org/abs/2308.01557
  14. [14]J. Carvalho, A. T. Le, P. K. Picki, D. Koert, and J. Peters, “Motion planning diffusion: Learning and adapting robot motion planning with diffusion models,” IEEE Trans. Robot., 2025.arxiv.org/abs/2412.19948
  15. [15]J. Liu, M. Stamatopoulou, and D. Kanoulas, “DiPPeR: Diffusion-based 2D path planner applied on legged robots,” in ICRA, 2024, pp. 9264–9270.arxiv.org/abs/2310.07842
  16. [16]K. Nguyen, A. T. Le, T. Pham, M. Huber, J. Peters, and M. N. Vu, “FlowMP: Learning motion fields for robot planning with conditional flow matching,” arXiv:2503.06135, 2025, Version 1.arxiv.org/abs/2503.06135
  17. [17]X. Dai, Z. Yang, D. Yu, S. Zhang, H. Sadighian, S. Haddadin, and S. Hirche, “Safe flow matching: Robot motion planning with control barrier functions,” arXiv:2504.08661, 2025, Version 2.arxiv.org/abs/2504.08661
  18. [18]M. Braun, N. Jaquier, L. Rozo, and T. Asfour, “Riemannian flow matching policy for robot motion learning,” arXiv:2403.10672, 2024, Version 2.arxiv.org/abs/2403.10672
  19. [19]K. Frans, D. Hafner, S. Levine, and P. Abbeel, “One step diffusion via shortcut models,” arXiv:2410.12557, 2024, Version 3.arxiv.org/abs/2410.12557
  20. [20]J. Schusterbauer, M. Gui, F. Fundel, and B. Ommer, “Diff2Flow: Training flow matching models via diffusion model alignment,” arXiv:2506.02221, 2025, Version 1.arxiv.org/abs/2506.02221
  21. [21]J. Matschek, T. Bäthge, T. Faulwasser, and R. Findeisen, “Nonlinear predictive control for trajectory tracking and path following: An introduction and perspective,” in Handbook of Model Predictive Control, Springer, 2019, pp. 169–198.DOI
  22. [22]T. Faulwasser and R. Findeisen, “Nonlinear model predictive control for constrained output path following,” IEEE Trans. Autom. Control, vol. 61, no. 4, pp. 1026–1039, 2015.DOI
  23. [23]T. Faulwasser, B. Kern, and R. Findeisen, “Model predictive path-following for constrained nonlinear systems,” in CDC, 2009, pp. 8642–8647.DOI
  24. [24]J. B. Rawlings, D. Q. Mayne, and M. Diehl, Model Predictive Control: Theory, Computation, and Design, 2nd ed. Madison, Wisconsin: Nob Hill Publishing, 2019.
  25. [25]R. Findeisen, T. Raff, and F. Allgöwer, “Sampled-data model predictive control for constrained continuous time systems,” in Advanced Strategies in Control Systems with Input and Output Constraints, Berlin, Heidelberg: Springer Berlin Heidelberg, 2007, pp. 207–235.DOI
  26. [26]J. Matschek, A. Himmel, K. Sundmacher, and R. Findeisen, “Constrained Gaussian process learning for model predictive control,” IFAC-PapersOnLine, vol. 53, no. 2, pp. 971–976, 2020.arxiv.org/abs/1911.10809
  27. [27]J. Matschek, T. Gonschorek, M. Hansen, N. Elkmann, F. Ortemier, and R. Findeisen, “Learning references with Gaussian processes in model predictive control applied to robot assisted surgery,” in ECC, 2020, pp. 362–367.arxiv.org/abs/1911.10793
  28. [28]J. Matschek, J. Bethge, M. Soliman, B. Elsayed, and R. Findeisen, “Constrained reference learning for continuous-time model predictive tracking control of autonomous systems,” IFAC-PapersOnLine, vol. 54, no. 6, pp. 329–334, 2021.DOI
  29. [29]P. Holzmann, J. Matschek, M. Pfefferkorn, and R. Findeisen, “Learning secure corridors for model predictive path following control of autonomous systems in cluttered environments,” in ECC, 2022, pp. 1748–1753.DOI
  30. [30]M. Pfefferkorn, P. Holzmann, J. Matschek, and R. Findeisen, “Safe corridor learning for model predictive path following control,” IFAC-PapersOnLine, vol. 55, no. 30, pp. 79–84, 2022.DOI
  31. [31]Z. Huang, Y. Lin, F. Yang, and D. Berenson, “Subgoal diffuser: Coarse-to-fine subgoal generation to guide model predictive control for robot manipulation,” arXiv:2403.13805, 2024, Version 1.
  32. [32]G. Zhou, S. Swaminathan, R. V. Raju, J. S. Guntupalli, W. Lehrach, J. Ortiz, A. Dedieu, M. Lázaro-Gredilla, and K. Murphy, “Diffusion model predictive control,” arXiv:2410.05364, 2025, Version 2.arxiv.org/abs/2410.05364
  33. [33]P. Marquez Julbe, J. Nubert, H. Hose, S. Trimpe, and K. J. Kuchenbecker, “Diffusion-based approximate MPC: Fast and consistent imitation of multi-modal action distributions,” arXiv:2504.04603, 2025, Version 2.arxiv.org/abs/2504.04603
  34. [34]T.-Y. Huang, A. Lederer, N. Hoischen, J. Brüdigam, X. Xiao, S. Sosnowski, and S. Hirche, “Toward near-globally optimal nonlinear model predictive control via diffusion models,” arXiv:2412.08278, 2025, Version 3.arxiv.org/abs/2412.08278
  35. [35]H. Xue, C. Pan, Z. Yi, G. Qu, and G. Shi, “Full-order sampling-based for torque-level locomotion control via diffusion-style annealing,” arXiv:2409.15610, 2024, Version 1.arxiv.org/abs/2409.15610
  36. [36]V. Kurtz and J. W. Burdick, “Generative predictive control: Flow matching policies for dynamic and difficult-to-demonstrate tasks,” arXiv:2502.13406, 2025.arxiv.org/abs/2502.13406
  37. [37]E. Milios, K. P. Wabersich, F. Berkel, and L. Schwenkel, “Stability mechanisms for predictive safety filters,” in CDC, 2023, pp. 2409–2416.arxiv.org/abs/2404.05496
  38. [38]K. P. Wabersich and M. N. Zeilinger, “A predictive safety filter for learning-based control of constrained nonlinear dynamical systems,” Automatica, vol. 129, 2021, 109597.arxiv.org/abs/1812.05506
  39. [39]K. P. Wabersich, A. J. Taylor, J. J. Choi, K. Sreenath, C. J. Tomlin, A. D. Ames, and M. N. Zeilinger, “Data-driven safety filters: Hamilton-Jacobi reachability, control barrier functions, and predictive methods for uncertain systems,” IEEE Control Syst., vol. 43, no. 5, pp. 137–177, 2023.DOI
  40. [40]J. Kuffner and S. LaValle, “Rrt-connect: An efficient approach to single-query path planning,” in IEEE ICRA, 2000.
  41. [41]C. de Boor, “Splines as linear combinations of B-splines. A survey.,” University of Wisconsin - Madison, Mathematics Research Center, Tech. Rep., 1976.
  42. [42]C. M. Bishop and N. M. Nasrabadi, Pattern recognition and machine learning. Springer, 2006, vol. 4.
  43. [43]G. Williams, P. Drews, B. Goldfain, J. M. Rehg, and E. A. Theodorou, “Information-theoretic model predictive control: Theory and applications to autonomous driving,” IEEE Trans. Robot., vol. 34, pp. 1603–1622, 6 2018.arxiv.org/abs/1707.02342
  44. [44]E. Theodorou, J. Buchli, and S. Schaal, “A generalized path integral control approach to reinforcement learning,” J. Mach. Learn. Res., vol. 11, 2010.
  45. [45]T. Brüdigam, A. Capone, S. Hirche, D. Wollherr, and M. Leibold, “Gaussian process-based stochastic model predictive control for overtaking in autonomous racing,” in ICRA, 2021.
  46. [46]J. Bethge, M. Pfefferkorn, A. Rose, J. Peters, and R. Findeisen, “Model predictive control with Gaussian-process-supported dynamical constraints for autonomous vehicles,” IFAC-PapersOnLine, vol. 56, no. 2, pp. 507–512, 2023.arxiv.org/abs/2303.04725
  47. [47]T. M. J. T. Baltussen, A. Katriniok, E. Lefeber, R. Tóth, and W. P. M. H. Heemels, “Online learning of interaction dynamics with dual model predictive control for multi-agent systems using Gaussian processes,” in ACC, 2025.
  48. [48]D. P. Kingma and M. Welling, “Auto-encoding variational bayes,” in ICLR, 2014.arxiv.org/abs/1312.6114
  49. [49]H. Ma, S. Bodmer, A. Carron, M. Zeilinger, and M. Muehlebach, “Constraint-aware diffusion guidance for robotics: Real-time obstacle avoidance for autonomous racing,” in Conference on Robot Learning, PMLR, 2025, pp. 1756–1776.arxiv.org/abs/2505.13131
  50. [50]E. Todorov, T. Erez, and Y. Tassa, “Mujoco: A physics engine for model-based control,” in 2012 IEEE/RSJ international conference on intelligent robots and systems, IEEE, 2012, pp. 5026–5033.DOI
  51. [51]W. Peebles and S. Xie, “Scalable diffusion models with transformers,” arXiv:2212.09748, 2023.arxiv.org/abs/2212.09748
  52. [52]J. A. E. Andersson, J. Gillis, G. Horn, J. B. Rawlings, and M. Diehl, “CasADi – A software framework for nonlinear optimization and optimal control,” Math. Program. Comput., vol. 11, no. 1, pp. 1–36, 2019.

Paper details

vlnc:W_pcj475z5
v1 · latestHistory (1)

published · Fresh — added to the Hub within the last 30 days

added ·

Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

CC BY 4.0

Original source

  • Computer Science

ChatGPT 5, 5-Thinking · View statement →

Looking for related papers…
Contents