MRoPE: Multi-Robot Safe Cooperative Strategy via Predictive Safety Filters and Ellipse-based Constraint Compression
Code of the paper
A. Rosetti, L. Pichierri, D. Cappello, F. Schiano, G. Notarstefano, "MRoPE: A Multi-Robot Safe Cooperative Strategy via combined Predictive Safety Filters and Ellipse-based Constraint Compression", IEEE Robotics and Automation Letters (RA-L), 2026.
MRoPE lets a team of drones cooperatively monitor a moving target in an obstacle-dense environment while guaranteeing collective safety. It is a hierarchically-distributed strategy: every drone runs
- a distributed aggregative planner that computes a (possibly unsafe) reference for joint target tracking;
- an obstacle-compression step that summarizes all static obstacles in a single convex constraint, the safe ellipse, computed by a fully distributed ellipse-consensus algorithm;
- a local Predictive Safety Filter (PSF), a small MPC that minimally modifies the reference to keep the drone inside the safe ellipse and away from its neighbours;
- the CrazyChoir low-level controller of the Crazyflie.
target trajectory
│
┌────────────▼─────────────┐ active constraints ┌───────────────┐
│ obstacle compression │◄──────────────────────►│ neighbours │
│ (distributed ellipse) │ └───────────────┘
└────────────┬─────────────┘
│ safe ellipses over the horizon
┌──────────────┐ ref ▼ ┌─────────────────────┐ safe ref ┌────────────┐
│ aggregative ├────────────────►│ predictive safety ├───────────►│ Crazyflie │
│ planner │ │ filter (local MPC) │ │ controller │
└──────────────┘ └─────────▲───────────┘ └────────────┘
│ neighbours within r_sens
The code is a ROS 2 (Foxy) workspace built on ChoiRbot and CrazyChoir, with simulations in Webots R2022a. Each drone is a set of independent ROS 2 nodes that communicate only with their neighbours.
.
├── docker/ Dockerfile and helper scripts (Ubuntu 20.04, ROS 2 Foxy, Webots R2022a)
├── montecarlo/run_montecarlo.sh Monte Carlo campaigns of Sec. IV-B
├── dependencies.repos third-party ROS 2 packages (webots_ros2, vicon_receiver)
└── src/
├── choirbot/ ChoiRbot (fork), contains the core MRoPE algorithms
├── crazychoir/ CrazyChoir (fork), Crazyflie guidance / control / Webots plugins
├── crazychoir_interfaces/ CrazyChoir messages
└── mrope/ MRoPE ROS 2 nodes, launch files and Webots worlds of the experiments
| Paper | Code |
|---|---|
| Distributed aggregative planner (cost and gradient-tracking update) | src/choirbot/choirbot/choirbot/optimizer/target_tracking_optimizer.py, aggregative_utils.py; ROS node src/crazychoir/crazychoir/guidance/aggregative.py |
| Safe ellipse (maximum-volume inscribed ellipse problem) | src/choirbot/choirbot/choirbot/optimizer/ellipse_optimizer.py |
| Distributed ellipse consensus (constraint consensus and local propagation) | src/choirbot/choirbot/choirbot/guidance/max_ellipse.py |
| Single obstacle-compression node | src/mrope/mrope/aggregative/ellipse.py (and ellipse_huge_forest.py, aggregative_vicon/ellipse_tb.py) |
| Local Predictive Safety Filter (MPC problem) | src/choirbot/choirbot/choirbot/collision/safety_filters/PSF.py; ROS wrapper .../collision/double_integrator_ca_PSF.py |
| Centralized PSF baseline | .../safety_filters/PSF_centr.py, .../collision/centralized_ca_psf.py |
| Linear-constraint (no compression) baseline | .../safety_filters/PSF_no_ell.py, .../collision/no_ell_ca_psf.py |
Weights naming: in the launch files k_dist, k_target, k_feedback are the
planner weights γ₁, γ₂, γ₃; dist_des is d_a; gamma_udes, gamma_u,
gamma_slack are the PSF weights ρ₁, ρ₂, ρ₃; Kp, Kd, Ki are the gains of
the desired-input law; Horizon is T; dt_psf is the discretization step
of the PSF prediction model; freq_collision is the PSF rate; sensing_distance is r_sens.
The experiments were run in the provided Docker image (Ubuntu 20.04, ROS 2 Foxy, Webots R2022a, NVIDIA GPU). The host needs an NVIDIA driver, Docker and the NVIDIA Container Toolkit.
git clone <this repository> mrope_ws
cd mrope_ws
# third-party ROS 2 packages (webots_ros2 1.2.3 and ros2-vicon-receiver)
pip install vcstool # or: sudo apt install python3-vcstool
vcs import --recursive src < dependencies.repos
# build the image (10-20 min) and create the container;
# the repository is mounted in the container as ~/crazychoir_ws
./docker/buildImage docker mrope:1.0
./docker/createContainer crazychoir_psf mrope:1.0Inside the container:
cd ~/crazychoir_ws
source /opt/ros/foxy/setup.bash
colcon build --symlink-install
source install/setup.bashLater you can reopen the container with docker start crazychoir_psf and
docker exec -it crazychoir_psf bash.
Python dependencies are listed in docker/requirements.txt (plus DISROPT,
CVXPY with the CLARABEL solver, networkx). For the real experiment the image
also installs the Vicon DataStream SDK and the Crazyflie Python bindings.
All parameters of each experiment are defined at the top of the corresponding
launch file in src/mrope/launch/, and every launch file
starts with a docstring describing it. Experiments start automatically about
20 s after launch (take-off phase); logged data (positions, references, PSF
solver times) are saved as .pkl files in the save_path set in the launch file,
i.e. under src/mrope/data/ or montecarlo/results/.
Every launch file accepts save_path:=<folder> to change the output folder.
Five Crazyflies track a TurtleBot 3 through a forest of 16 trees with the distributed ellipse consensus. Run the two parts in two terminals of the container:
ros2 launch mrope distributed_ellipse_part1.launch.py # Webots, target, planner, PSF, controllers
ros2 launch mrope distributed_ellipse_part2.launch.py # distributed ellipse-consensus nodesros2 launch mrope huge_forest_webots.launch.py n_obs:=64 # MRoPE (safe ellipse)
ros2 launch mrope huge_forest_webots_no_ell.launch.py n_obs:=64 # one half-space per obstacleThe paper uses n_obs ∈ {4, 16, 32, 64, 128} (default 128).
Run on the host; each trial is executed in the container and stopped after a timeout:
./montecarlo/run_montecarlo.sh consensus # distributed ellipse consensus, 50 runs (Table I)
./montecarlo/run_montecarlo.sh n_robots # MRoPE, N ∈ {4, 6, 8}
./montecarlo/run_montecarlo.sh centralized # centralized PSF baseline, same scenarios
./montecarlo/run_montecarlo.sh target_vel # success rate vs. target velocity, N = 5Trial k uses random seed k (seed 200 + k for target_vel), so every
scenario is reproducible. A subset of trials can be selected with
./montecarlo/run_montecarlo.sh n_robots <first> <last>; set CONTAINER if
your container has another name. Each campaign can also be run trial by trial
with ros2 launch (see the docstring of each launch file).
Four Crazyflie 2.1 and a TurtleBot 3 Burger tracked by a Vicon system:
ros2 launch mrope aggregative_crazyflie_turtlebot_vicon.launch.pyBefore running, edit in the launch file the radio uris of your Crazyflies
(the last digit is also the Vicon object id cf<id>), the obstacle positions
obs and the Vicon hostname. The TurtleBot must be tracked by Vicon as tb0
and receive velocity commands through ChoiRbot. Use the GUI buttons
TAKE-OFF, START and LAND.
If you use this code, please cite:
@article{rosetti2026mrope,
title = {{MRoPE}: A Multi-Robot Safe Cooperative Strategy via combined Predictive Safety Filters and Ellipse-based Constraint Compression},
author = {Rosetti, A. and Pichierri, L. and Cappello, D. and Schiano, F. and Notarstefano, G.},
journal = {IEEE Robotics and Automation Letters},
year = {2026}
}This work builds on ChoiRbot (Testa et al., IEEE RA-L 2021), CrazyChoir (Pichierri et al., IEEE RA-L 2023) and DISROPT.
GNU General Public License v3.0, see LICENSE. The choirbot and
crazychoir packages are modified versions of the OPT4SMART ChoiRbot and
CrazyChoir toolboxes (GPL-3.0).