Skip to content

Code of algorithms and simulations in article "Safe Distributed Control of Multi-Robot Systems with Communication Delays," IEEE TVT 2025.

Notifications You must be signed in to change notification settings

lucaballotta/macbf-gnn

Repository files navigation

MACBF-GNN

Learning decentralized control barrier functions using graph neural networks.

Dependencies

To install the requirements:

conda create -n macbf-gnn python=3.9
conda activate macbf-gnn
pip install -r requirements.txt

Then you need to install the torch_geometric package following the official website.

Train

To train the model, use:

python train.py --env SimpleCar -n 10 --steps 500000

One can refer to settings.yaml for the training parameters. The training logs will be saved in folder ./logs/<env>/<algo>/seed<seed>_<training-start-time>

Test

To test the learned model, use:

python test.py --path <path-to-log> --epi <number-of-episodes>

For large-scale tests, one can also use:

bash test.sh <path-to-log> <number-of-episodes>

One can add 1 to the arguments if one wants to generate videos. After the large-scale test, one can use the following command to calculate the safe rate:

python safe_rate.py --path <path-to-log>

About

Code of algorithms and simulations in article "Safe Distributed Control of Multi-Robot Systems with Communication Delays," IEEE TVT 2025.

Topics

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •