Skip to content

CMU-IntentLab/AnySafeReachability

Repository files navigation

AnySafe: Adapting Latent Safety Filters at Runtime via Safety Constraint Parameterization in the Latent Space (ICRA, 2026)

Homepage   •   Paper

This is the official repository for AnySafe: Adapting Latent Safety Filters at Runtime via Safety Constraint Parameterization in the Latent Space.

Flow Diagram


Code Structure

git clone https://github.com/CMU-IntentLab/AnySafeReachability.git
cd AnySafeReachability

The project is organized into separate branches:

  • dubins: 3D Dubins Car. Link
git checkout dubins
  • franka: Implementation for real world experiment with Franka Panda arm. Link
git checkout franka

This repository provides the implementation of Constraint-Conditioned Latent Safety Filters for adapting safety behavior at runtime in robotics tasks both in simulation and hardware.


Installation

# Clone the repository
git clone https://github.com/CMU-IntentLab/AnySafeReachability.git
git checkout franka
cd AnySafe Reachability

# Create and activate the conda environment
conda env create -f environment.yaml
conda activate anysafe

Quick Start: Download Pretrained Models and Dataset

You can download pretrained models: pretrained models.

# Download pretrained world model
gdown LINK

# Download pretrained constraint-conditioned filter

# This will create:
# - dreamer.pt (pretrained world model)
# - filter/ (reachability filter directory)
#   └── model/ (filter checkpoints at different training steps)

Train World Model

You can download the pre-collected dataset for the "Sweeper" task: sweeper dataset.

# Download sweeper dataset
pip install gdown
gdown LINK
unzip pretrained_models.zip
  1. Train decoder
python train_dino_decoder.py

The best decoder model is saved as checkpoints/testing_decoder.pth

  1. Train transistion model
python train_dino_wm.py

The best transistion model is saved as checkpoints/best_testing.pth

Train Semantic Encoder

python dino_wm/train_failure_classifier.py

The best transistion model is saved as checkpoints_sem/encoder_{model_name}.pth

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published