Skip to content

Repository files navigation

MultiRobot-Distribution-Matching

Official implementation of the paper "Optimal Transport-Based Decentralized Multi-Agent Distribution Matching", published in IEEE Transactions on Automatic Control (TAC), 2026.

This repository provides robust control algorithms for multi-robot systems to achieve target distribution matching using Optimal Transport theory.

Links


Repository Overview

We provide implementations for both centralized and decentralized scenarios:

  1. centralized_main.py: Solves the global optimal transport problem sequentially to determine the optimal target position for each robot.
  2. decentralized_main.py: Implements a memory-augmented min-consensus algorithm for scenarios with limited local communication.
  3. (Added) animated_centralized_main.py: An animated visualization of multi-robot distribution matching, extending the original implementation with text- and shape-based target distributions. The robots automatically form patterns matching the specified text or shape. To customize the visualization, modify the target definitions in targets_list. You can replace "TTU", "IEEE\n TAC", or the star-shaped distribution with your desired text or shape. For text targets, the sampling process automatically converts the rendered characters into target points, allowing the robots to match different words, letters, or multiline text without modifying the control algorithm. This demo provides a visual illustration of the proposed distribution matching framework.

Core Dynamics

This implementation applies optimal control based on linear time-invariant (LTI) system dynamics. The control inputs are computed iteratively over a planning horizon $T$. After $T$ steps, the control weights are re-initialized, and the process repeats to achieve convergence to the target distribution.

Nonlinear Control-Affine Dynamics

For the development of control-affine nonlinear dynamics, please refer to the main paper.


Installation & Usage

Requirements

  • Python 3.8+
  • numpy
  • matplotlib

Run Simulations

# Run centralized simulation
python centralized_main.py

# Run decentralized simulation
python decentralized_main.py

License

This code is provided for academic research purposes only. Commercial use is strictly prohibited. See the LICENSE file for details.