This project consists of the implementation of a traffic simulator for autonomous vehicles using a safety-critical path-following controller. The controller is based on the CLF-CBF framework and is able to steer the vehicles towards spline-based paths while avoiding collisions. Published in the Sixth Iberian Robotics Conference - ROBOT2023
In root directory:
$ pip install -e .
Default simulation runs with two vehicles in the pre-defined paths and lane splines. To run the numerical simulation type:
$ python3 run_simulation.py simulationX
X must be replaced by the simulation scenario located in ./simulations/simulationX. In the current version, simulation1 and simulation2 scenarios are avalaible for testing.
After the simulationX is finished, to run the animation type:
$ python3 run_animation.py simulationX
This will run an animation with the previous simulation.
It is also possible to edit splines with edit_spline.py by typing:
$ python3 edit_spline.py simulationX splineY
This opens spline editor for a splineY inside the folder ./simulations/simulationX.
- To add a new vehicle you must also create a new path. For example, you can go to ./simulations/simulation1/paths/ and copy the file path.json to a new one, like pathN.json (for the N-th vehicle). Then you can edit pathN using the spline editor.
- Then go to /simulations/simulationX/simulation.py (replace X by the desired scenario) and:
- Add a new Unicycle robotN (for the N-th robot) object after line 10 (copy and change the existing one);
- Add the created robot object at line 12 list;
- Create another connectivity element at line 14. Note that you should determine (by adding a new column) all other vehicles that will be seen as obstacles to the new robot;
- Create a new EllipticalBarrier object at line 16 and add it to the list of barriers at the creation of the BarrierGrid object at line 17;
- Crete another controller_parameterN dictionary, after line 51, setting the previous connectivity element on the parameters;
- Crete another controllerN object, after line 54, setting the previous controller_parametersN created;
- Add the created controller object to the list of controllers in line 56;
- Enjoy!
@InProceedings{Reis2023,
author = {Matheus F. Reis and Gustavo A. Andrade
and A. Pedro Aguiar},
title = {Safe Autonomous Multi-Vehicle Navigation using Path Following
Control and Spline-based Barrier Functions},
booktitle = {Proceedings on Sixth Iberian Robotics Conference - Coimbra, Portugal, 2023}
}