luigiberducci / fosco

Learner-Verifier Framework for formal synthesis of Control Barrier Functions (CBF).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FOSCo: FOrmal Synthesis of COntrol Barrier Functions

License Python 3.10 Workflow Status Code style: black

Learner-verifier framework for synthesis of Control Barrier Functions (CBFs) for (nonlinear) control-affine systems.

We use a counterexample-guided inductive synthesis (CEGIS) approach to learn a CBF which is guaranteed to be valid.

Example CBF Single-Integrator

🔧 Installation

The code is written in Python 3.10 and uses PyTorch for learning a CBF. We recommend using a virtual environment.

To install the required dependencies, run

pip install -r requirements.txt

🚀 Examples

We provide a simple example for a single-integrator system in run_example.py.

To run the example, run

python run_example.py

⚠️ Disclaimer

This is a research prototype, tailored for CBF and built on top of FOSSIL. Our implementation aims to refactor the original codebase and keep the minimal functionality required for CBF synthesis.

We invite to refer to the original codebase for synthesis of general Lyapunov certificates.

About

Learner-Verifier Framework for formal synthesis of Control Barrier Functions (CBF).

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 100.0%