Anytime Plug-and-Play Control with Contract-Based Distributed MPC

Sabrina Bodmer, Danilo Saccani, Melanie N. Zeilinger, Andrea Carron

ETH Zürich & EPFL

Eight miniature race cars navigating a figure-eight track in simulation and hardware experiments
Anytime Plug-and-Play Multi-Agent Control. Simulation and hardware experiments conducted using up to eight small-scale race cars on a figure-eight track. Agents can join and leave the communication network at any time without centralized coordination, while maintaining collision avoidance guarantees.

Abstract

Safe Distributed Control Under Changing Network Topologies

A central challenge in many mobile multi-robot applications is that communication topologies are inherently time-varying. Agents may enter or exit the network and such changes cannot generally be restricted a priori. This work introduces a distributed multi-agent control algorithm based on local communication that supports anytime agent joining and leaving the communication network without centralized coordination.

The method scales efficiently with the number of agents by relying on a distance-based neighbor definition and on contracts derived from predicted trajectories. The resulting contract constraints guarantee collision avoidance and constraint satisfaction. We validate the proposed method in an autonomous multi-agent driving scenario, demonstrating effective collision avoidance in high-speed, dynamic environments with agents moving in opposite directions, in both simulated and real-world experiments.

Simulation: 8 agents on a figure-eight track

Hardware: Real race cars navigating safely

Supplementary Video

Full Presentation & Experiments

Overview of the Anytime Plug-and-Play framework, including method explanation, simulation results with up to 8 agents, and hardware experiments on miniature race cars.

Method

Contract-Based Distributed MPC

We replace coupled collision-avoidance constraints with local contracts that can be constructed from a single exchange of predicted trajectories with current neighbors.

Method overview showing communication sets, safety envelopes, and cells for two agents
Method overview. (a) Visualization of the communication set and awareness set for agent i. (b) Safety envelopes constrain the one-step prediction, ensuring the awareness set boundary is not reached in fewer than N steps. (c) Cells separate neighboring agents, and the resulting contracts guarantee collision avoidance.
1

Cells

Stage-wise convex regions computed from predicted trajectories exchanged with neighbors. They locally separate agent trajectories to ensure collision-free paths between neighbors via Voronoi-type partitioning.

2

Safety Envelopes

Scaled-down copies of the awareness set that constrain successive position increments. Their cumulative effect guarantees the predicted trajectory stays inside the awareness set, preserving recursive feasibility.

3

Contract-Based FHOCP

Each agent solves a local optimization problem using only neighbor-to-neighbor communication. The contract (cells + safety envelopes) decouples collision avoidance, enabling fully distributed execution.

Key idea: By combining time-varying cells for neighbor separation with safety envelopes for topology-change robustness, we achieve the first distributed collision-avoidance framework with formal guarantees under anytime plug-and-play operations—no request-based or pre-negotiated coordination needed.
Safety envelope design showing how scaled awareness sets constrain trajectory increments
Safety Envelopes. (a-b) Safety envelopes are scaled-down versions of the awareness set, with scaling factors summing to 1. (c-d) The one-step constraint ensures the shifted solution remains inside the awareness set at the next time step, guaranteeing recursive feasibility.
3D visualization of cells partitioning multiple agents over the prediction horizon
Cells over the Horizon. Visualization of the Voronoi-type partitioning across multiple agents. Each agent is assigned a distinct color, and the cells change as the predicted positions evolve along the horizon.

Experiments

Challenging Multi-Agent Scenarios

We validate the approach in simulation (up to 8 agents) and hardware experiments (up to 6 cars) on a figure-eight track, featuring overtaking, intersection crossing, and oncoming traffic.

Simulation scenarios showing oncoming traffic avoidance and intersection crossing
Simulation Experiments. Colored dots denote predicted positions along the MPC horizon for safe (green) and exploitation (blue) trajectories. Purple bubble: Oncoming traffic—the yellow agent moves off the centerline to avoid collisions with oncoming green and blue agents. Blue bubble: Intersection—the red agent slows down and diverts from the centerline to let blue and green agents cross safely.
Overtaking maneuver in simulation
Simulation

Overtaking

The faster purple agent overtakes the slower green agent on the inner rim of the curve, enabled by curvature-dependent hyperplane angling. Red boxes show safety envelopes constraining position increments.

Hardware

Intersection

Multiple agents simultaneously approach the figure-eight intersection. Each agent navigates safely through the congested area without collisions, using only local neighbor communication.

Intersection crossing in simulation
Simulation

Oncoming Traffic

Agents traveling in opposite directions must avoid each other. The safety envelopes and cells adapt in real time as the communication topology changes with each encounter.

Hardware experiment with 6 race cars approaching an intersection
Hardware Experiment. Each agent is highlighted with a different color and its driving direction is indicated by a colored vector. Five agents approach the intersection simultaneously and safely navigate through it on physical 1/28th scale RC vehicles.

Hardware Videos

Miniature race cars navigating the figure-eight track in real time, demonstrating collision-free operation under anytime plug-and-play conditions.

Four agents with overlays. Trajectory trails and awareness sets (yellow) are visualized in real time, showing how agents coordinate via local contracts as they navigate the figure-eight track.
Six agents — Experiment 1. Frequent intersection crossings and oncoming traffic.
Six agents — Experiment 2. Varying neighbor counts and topology changes.

Results

Comparison & Quantitative Evaluation

Our method is the first to achieve all desirable properties: distributed, nonlinear, anytime plug-and-play, with formal safety guarantees, and non-iterative/non-sequential execution.

Approach Distributed Nonlinear Plug-and-Play Safety Guarantees Non-cooperative Non-Iterative Non-Sequential
Global Coord. Priority-based ××××
Leader-Follower ××××
Distributed SQP partially×
Constraint-based Safety Tube ×××
Consistency Constraint ×
Contract Constraint request-based
ECBF ×
CBF-induced QP ×
Anytime PnP (ours) anytime
Traffic App. Assisting Take-Over ×request-based×××
Bidirectional Mixed-Traffic ×anytime×××
Highway Merging ×n/a××

Bold = our method. ✓ = property satisfied, × = not satisfied. Categories from Scattolini (2009).

Plot showing minimum pairwise distance between agents over time
Minimum Pairwise Distance. The minimum distance between any two agents throughout the hardware experiment. The dashed line indicates the prescribed safety distance. Collisions are avoided throughout the entire experiment.
Bar plot showing number of neighbors per agent over time
Number of Neighbors. The time-varying number of neighboring agents for each agent during the 6-agent experiment (max 5 neighbors). The frequent changes motivate the need for anytime plug-and-play capability.

Citation

BibTeX

@article{bodmer2026anytime,
  title     = {Anytime Plug-and-Play Control with Contract-Based Distributed MPC},
  author    = {Bodmer, Sabrina and Saccani, Danilo and Zeilinger, Melanie N. and Carron, Andrea},
  journal   = {arXiv preprint},
  year      = {2026},
  note      = {To appear}
}