Skip to content

Commit fc678cc

Browse files
committed
add test on push,
update readme
1 parent 2535acf commit fc678cc

File tree

2 files changed

+74
-1
lines changed

2 files changed

+74
-1
lines changed

.github/workflows/tests_on_push.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
test-python-script:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Check out code
14+
uses: actions/checkout@v3
15+
with:
16+
submodules: 'recursive'
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v3
20+
with:
21+
python-version: '3.10'
22+
cache: 'pip'
23+
- name: Install dependencies
24+
run: |
25+
pip install --upgrade pip
26+
pip install -r requirements.txt
27+
28+
- name: Run script
29+
run: PYTHONPATH=. python -m unittest discover -s ./tests

README.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,45 @@
1-
# Counter-Example Guided Inductive Synthesis of Control Barrier Functions
1+
<h2 align="center">
2+
FOSCo: FOrmal Synthesis of COntrol Barrier Functions
3+
</h2>
4+
5+
<p align="center">
6+
<a href="https://opensource.org/license/bsd-3-clause/"><img alt="License" src="https://img.shields.io/badge/License-BSD_3--Clause-blue.svg"></a>
7+
<a href="https://python.org"><img alt="Python 3.10" src="https://img.shields.io/badge/python-3.10-blue.svg"></a>
8+
<a href="https://github.com/luigiberducci/cegis_cbf/actions/workflows/tests-on-push.yml/badge.svg"><img alt="Workflow Status" src="https://github.com/luigiberducci/cegis_cbf/actions/workflows/tests-on-push.yml/badge.svg"></a>
9+
<a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
10+
</p>
11+
12+
Learner-verifier framework for synthesis of Control Barrier Functions (CBFs)
13+
for
14+
general (nonlinear) control-affine systems.
15+
16+
We use a counterexample-guided inductive synthesis (CEGIS) approach to
17+
learn a CBF that guarantees forward invariance with respect to a given
18+
system and unsafe set.
19+
20+
![Example CBF Single-Integrator](docs%2Fsingle_integrator.gif)
21+
22+
## Installation
23+
The code is written in Python 3.10 and uses [PyTorch](https://pytorch.org/) for
24+
learning a CBF.
25+
We recommend using a virtual environment.
26+
27+
To install the required dependencies, run
28+
```bash
29+
pip install -r requirements.txt
30+
```
31+
32+
## Examples
33+
We provide a simple example for a single-integrator system in
34+
[`run_example.py`](run_example.py).
35+
36+
To run the example, run
37+
```bash
38+
python run_example.py
39+
```
40+
41+
## Disclaimer
42+
This is a research prototype, tailored for CBF and built on top of [FOSSIL](https://github.com/oxford-oxcav/fossil).
43+
Our implementation aims to refactor the original codebase and keep the minimal functionality required for CBF synthesis.
44+
45+
We invite to refer to the original codebase for synthesis of general Lyapunov certificates.

0 commit comments

Comments
 (0)