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 anysafe- 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_priv.pth
You can download the pre-trained world model for the "Sweeper" task: sweeper model.
# Download sweeper world model with semantic encoder
pip install gdown
mkdir -p dino_wm/checkpoints_sem
gdown "https://drive.google.com/file/d/1AOBipzDxCQDCHAqT_ieUbocK8J2u9AlD/view?usp=sharing" \
-O dino_wm/checkpoints_sem/encoder_priv.pthpython scripts/run_training_ddpg-dinowm.py # save policyYou can download the pre-trained policy for the "Sweeper" task: sweeper policy.
# Download sweeper policy
pip install gdown
mkdir -p logs/dinowm/epoch_id_16
gdown "https://drive.google.com/file/d/1C3b9bYIZ6ayaGTkQKumICSArmGPJpDD1/view?usp=sharing" \
-O logs/dinowm/epoch_id_16/rotvec_policy_priv.pthpython scripts/sweeper_cp.pyComing soon!
This implementation builds on the following open-source projects:
If you build upon this work, please consider citing our research.
📄 Citation
@article{agrawal2025anysafe,
title={AnySafe: Adapting Latent Safety Filters at Runtime via Safety Constraint Parameterization in the Latent Space},
author={Agrawal, Sankalp and Seo, Junwon and Nakamura, Kensuke and Tian, Ran and Bajcsy, Andrea},
journal={IEEE International Conference on Robotics and Automation (ICRA)},
year={2026}
}
