Skip to content

siminliu99/neural-cbf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Safe Control under Input Limits with Neural Control Barrier Functions

Simin Liu, Changliu Liu, John Dolan | CoRL 2022

Paper

Quickstart

Clone the repository

git clone https://github.com/sliu2019/neural-cbf.git
cd neural-cbf

Create and activate the Conda environment

conda create -f environment.yml
conda activate ncbf_env

Install dependencies

pip install -r requirements.txt

Run training

python main.py --affix quad_pend_example

Logs are written to log/quad_pend_example/ and checkpoints to checkpoint/quad_pend_example/.

Key training arguments:

Argument Default Description
--affix default Suffix for experiment folder names
--learner_n_steps 3000 Training iterations
--reg_weight 150.0 Safe-set volume regularization weight
--critic_n_samples 50 Counterexample batch size per critic step
--critic_max_n_steps 20 Gradient ascent steps per critic call
--learner_lr 1e-3 Adam learning rate
--gpu 0 CUDA device index

Repository Structure

src/
├── neural_phi.py        # Neural CBF φ*(x): architecture and forward pass
├── critic.py            # Counterexample search via projected gradient ascent
├── learner.py           # Training loop (Algorithm 1)
├── reg_sampler.py       # Rejection sampler for volume regularization
├── utils.py             # Logging, checkpointing, early stopping, coord transforms
├── create_arg_parser.py # All hyperparameter definitions and defaults
└── problems/
    └── quad_pend.py     # Quadcopter-pendulum dynamics, ρ(x), and control polytope
main.py                  # Entry point: sets up all modules and calls learner.train()
quad_pend_analysis/      # Post-hoc evaluation: CBF slices, rollouts, volume estimates

Citation

If you found this useful, please cite:

@inproceedings{liu2022safe,
  title={Safe control under input limits with neural control barrier functions},
  author={Liu, Simin and Liu, Changliu and Dolan, John},
  booktitle={Conference on Robot Learning (CoRL)},
  year={2022}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors