Skip to content

CMU-IntentLab/ICL-BRT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ICL-BRT

This repo contains the source code for the submitted paper "Your Learned Constraint is Secretly a Backwards Reachable Tube"

Anaconda Environment

create an anaconda environment using the provided environment.yml

Steps to reproduce:

The repo contains two configurations in the ./config directory, one for each model. Throughout this tutorial dubins_model_id = 1 or 2

Compute the groundtruth BRT for the Dubins car (requires: https://github.com/StanfordASL/hj_reachability)

 python brs_hjr.py --dubins_model_id <1 or 2>

Reproduce using the provided expert trajectories:

We include two datasets of expert trajectories for model 1 and model 2. You can use these trajectories to compute the constraint.

  1. Given the expert trajectories and no knowledge of the failure set, train MT-ICL to recover the constraint.
python network_init.py --dubins_model_id <1 or 2> 
python planner_icl.py --dubins_model_id <1 or 2>

After each outer epoch, the constraint model weights will be saved

  1. Visualize the learned constraint
python visualize_constraint.py --dubins_model_id <1 or 2> --epoch <outer iter>

Where epoch is an integer indicating at what outer epoch we want to visualize the constraint.

Compute expert policies, expert rollouts, and train MT-ICL:

If you want to retrain from scratch (i.e. train expert policies, expert rollouts, and then MT-ICL), follow the following steps:

  1. Train an expert policy using PPO given knowledge of the failure set:
python dubins.py --dubins_model_id <1 or 2>
  1. Generate expert rollouts:
python dubins_rollout.py --dubins_model_id <1 or 2>
  1. Follow steps 2 and 3 from the section above

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages