Alejandro Sánchez Roncero, Rafael I. Cabral Muchacho, and Petter Ögren
This repository contains the MATLAB code used for the experiments in the paper "Multi-Agent Obstacle Avoidance using Velocity Obstacles and Control Barrier Functions."
This project provides a MATLAB implementation that:
- Uses Velocity Obstacles (VO) for guidance as a relaxed constraint in the optimization objective.
- Guarantees safety through a Control Barrier Function (CBF) constraint.
- Works with both second-order integrator dynamics and car-like dynamics.
There are two major folders—one for second-order integrator dynamics and another for car-like dynamics. Each folder has the same structure:
h_cbf_system.m
: Main file implementing the collision avoidance algorithm, including all methods and the optimization problem.run_scenario.m
: Helper script to run simulations, with parameters specified insim_config.m
.scenarios/
: Folder containing various scenarios. Each scenario is constructed as a Simulink file.
If you encounter any issues with the code or have suggestions for improvement, please create a pull request or email [email protected]. Note that the same method can be applied to more complex dynamical systems.
- MATLAB
- Simulink and Simulink 3D Animation
- Symbolic Math Toolbox (used by
generate_functions.m
to create methods stored ingenerated_functions/
. If you do not have this toolbox, you can implement those methods manually.)
- Open MATLAB and set the current folder to the folder corresponding to the dynamics you want to simulate.
- Configure
sim_config.m
with the desired settings for the experiments. - Run
run_scenario.m
to start the simulation.
By default, all demo videos are recorded at a high frame rate, which can result in large file sizes.
If you use this code in your research, please cite our paper:
@misc{roncero2024multiagentobstacleavoidanceusing,
title={Multi-Agent Obstacle Avoidance using Velocity Obstacles and Control Barrier Functions},
author={Alejandro Sánchez Roncero and Rafael I. Cabral Muchacho and Petter Ögren},
year={2024},
eprint={2409.10117},
archivePrefix={arXiv},
primaryClass={cs.RO},
url={https://arxiv.org/abs/2409.10117},
}