AnySafe: Adapting Latent Safety Filters at Runtime via Safety Constraint Parameterization in the Latent Space (ICRA, 2026)
This is the official repository for AnySafe: Adapting Latent Safety Filters at Runtime via Safety Constraint Parameterization in the Latent Space.
git clone https://github.com/CMU-IntentLab/AnySafeReachability.git
cd AnySafeReachabilityThe project is organized into separate branches:
dubins: 3D Dubins Car. Link
git checkout dubinsfranka: Implementation for real world experiment with Franka Panda arm. Link
git checkout frankaThis repository provides the implementation of Constraint-Conditioned Latent Safety Filters for adapting safety behavior at runtime in robotics tasks both in simulation and hardware.
# 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 anysafeYou 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)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- Train decoder
python train_dino_decoder.pyThe best decoder model is saved as checkpoints/testing_decoder.pth
- Train transistion model
python train_dino_wm.pyThe best transistion model is saved as checkpoints/best_testing.pth
python dino_wm/train_failure_classifier.pyThe best transistion model is saved as checkpoints_sem/encoder_{model_name}.pth
