Skip to main content

CommonRoad-CriMe

image info Linux PyPI version fury.io PyPI license
PyPI download month PyPI download week

Toolbox to compute Criticality Measures (e.g. time-to-collision, time-to-react,...). Such measures can be used to trigger warnings and emergency maneuvers in driver assistance systems or repair an infeasible trajectory. If you have questions or want to report problems or suggestions, please start a Github discussion / Github issue.

Live Demo

🚀 Installation Guide

commonroad-crime can be installed with:

$ pip install commonroad-crime
Develop CriMe locally

For adding new measures, we recommend using Anaconda to manage your environment so that even if you mess something up, you can always have a safe and clean restart. A guide for managing python environments with Anaconda can be found here.

After installing Anaconda, create a new environment with:

$ conda create -n commonroad-py310 python=3.10 -y

Here the name of the environment is called commonroad-py310. You may also change this name as you wish. In such case, don't forget to change it in the following commands as well. Always activate this environment before you do anything related:

$ conda activate commonroad-py310
or
$ source activate commonroad-py310

Then, install the dependencies with:

$ cd <path-to-this-repo>
$ pip install -e .
$ conda develop .

To test the installition, run unittest:

$ cd tests
$ python -m unittest -v

To get started your journey with our criticality measures, check the tutorials and the following tips.

Add new criticality measure
  1. create a new branch with feature-<measure-name> and checkout the branch
  2. navigate to commonroad_crime/data_structure/type.py to find the correct category of the measure and add an enumeration entry <abbreviation>: <explanation>
  3. navigate to commonroad_crime/measure to find the above-mentioned category and create a python file named <abbreviation>.py. Then create a class inheriting the CriMeBase under commonroad_crime/data_structure/base.py
  4. similar to other measures, you need to implement the compute() and visualize() functions
Define configuration parameters of the measure
  1. navigate to commonroad_crime/data_structure/configuation.py to find the above-mentioned category and add a new instance to the class as self.<parameter> = config_relevant.<parameter>
  2. you can then directly call the values using self.configuration.<category>.<parameter> in your measure class
  3. to override the default parameter values, create a yaml file (name it the same as the scenario) in ./config_files and modify the values there

🚧 Documentation

The documentation of our toolbox is available on our website: https://cps.pages.gitlab.lrz.de/commonroad/commonroad-criticality-measures/.

Build documentation locally In order to generate the documentation via Sphinx locally, run the following commands in the root directory:
$ pip install -r ./docs/requirements_doc.txt
$ cd docs/sphinx
$ make html

The documentation can then be launched by browsing ./docs/sphinx/build/html/index.html/.

🌟 Contributors (in alphabetical order by last name)

  • Liguo Chen
  • Marius Erath
  • Florian Lercher
  • Yuanfei Lin
  • Sebastian Maierhofer
  • Ivana Peneva
  • Kun Qian
  • Oliver Specht
  • Sicheng Wang
  • Youran Wang
  • Zekun Xing
  • Ziqian Xu

🔖 Citation

If you use commonroad-crime for academic work, we highly encourage you to cite our paper:

@InProceedings{lin2023crime,
      title     = {{CommonRoad-CriMe}: {A} Toolbox for Criticality Measures of Autonomous Vehicles},
      author    = {Yuanfei Lin and Matthias Althoff},
      booktitle = {Proc. of the IEEE Intell. Veh. Symp.},     
      pages     = {1-8}, 
      year      = {2023},
}

If you use this project's code in industry, we'd love to hear from you as well; feel free to reach out to Yuanfei Lin directly.

Metadata

Release files for commonroad-crime 0.4.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for commonroad-crime 0.4.5
File Size Uploaded
commonroad_crime-0.4.5.tar.gz 76.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for commonroad-crime 0.4.5
File Interpreter ABI Platform
commonroad_crime-0.4.5-py3-none-any.whl Python 3 none any Details

Total release size: 202.4 kB

Release files / commonroad_crime-0.4.5.tar.gz

Download URL commonroad_crime-0.4.5.tar.gz
Size 76.5 kB
Tags Source
SHA-256 checksum
How to use checksums
742fc19ffe58b32ebc78022134b89b0f1c7a79bc9485e57a3b1400a0eafbe41f
BLAKE2b-256 checksum
How to use checksums
a75f2d5b6299bee1b634d7fbbe5b74f954c851ae9d7b8302f5aeceb4e4f64c94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.19

Release files / commonroad_crime-0.4.5-py3-none-any.whl

Download URL commonroad_crime-0.4.5-py3-none-any.whl
Size 125.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
744d900ab40918ff7836f975cd349614b6fb7066479743925bef9b96db73115f
BLAKE2b-256 checksum
How to use checksums
9210d0dd97e273d20522c09da9f85eceaf739a874bc0c107d563400449d575b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.19

Release history Release notifications | RSS feed

This release

0.4.5 This release

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page