Skip to content

CommonRoad/SanDRA

Repository files navigation

SanDRA

Safe LLM-based Decision-making for Automated Vehicles

Yuanfei Lin*, ✉, Sebastian Illing*, Matthias Althoff

Technical University of Munich

(*) Equal contribution. (✉) Corresponding author.

Project Page Python C++ arXiv Paper

SanDRA GIF

⚙️ Setup

For using SanDRA with OpenAI models, you need an OpenAI API-key. Make sure to export it as environment variable named OPENAI_API_KEY. If you'd rather use local models, you can follow the instructions in section Run with local LLMs.

📦 Dependencies for Reachability Analysis

For leveraging reachability analysis you need to install

  • commonroad-reach-semantic: branch feature/sandra (use export CXX=/usr/bin/g++-10 before installation to use the correct compiler, the whole installation process might take more than 10 minutes.)

Note: After installation, please go to ~/SanDRA/sandra/config.py and update COMMONROAD_REACH_SEMANTIC_ROOT to the directory where you installed commonroad-reach-semantic.

📦 Dependencies for Set-based Predictions

For set-based predictions, you need to install

🔄 Roadmap

  • 📄 Release Paper
  • 📦 Release Code
  • 🌐 Release Project Page
  • 📑 Release Updated Paper

▶️ Main scripts

There are 2 ways to test SanDRA:

  1. With a CommonRoad scenario.
  2. With the highwayenv.

commonroad_run.py and highwayenv_run.py illustrate how to run SanDRA decision making in either of these cases. Please make sure to prepare the seeds for highwayenv / the scenarios for CommonRoad beforehand.

🖥️ Run with local LLMs

To run SanDRA with local models, you need to follow these steps:

  1. 📥 Download Ollama
  2. ⚙️ Install Go (Recommended):
sudo apt update
sudo apt install golang-go
  1. 🤖 Download a model (We recommend to use a model with >=8B parameters to avoid problems with structured outputs):
ollama pull qwen3:8b
  1. ▶️ Start the Ollama server
ollama serve

📝 Cite Us

If you use SanDRA in your research, please cite:

@article{lin2025sandra,
  title     = {SanDRA: Safe Large-Language-Model-Based Decision Making for Automated Vehicles Using Reachability Analysis},
  author    = {Yuanfei Lin and Sebastian Illing and Matthias Althoff},
  journal   = {arXiv preprint arXiv:2510.06717}, 
  year      = {2025}
}

About

Safe LLM-Based Decision Making for Automated Vehicles Using Reachability Analysis

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •