Skip to main content

criticality measures of automated vehicles

Project description

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.

Installation Guide

commonroad-crime can be installed with:

$ pip install commonroad-crime

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-py37 python=3.7 -y

Here the name of the environment is called commonroad-py37. 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-py37
or
$ source activate commonroad-py37

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.

How to 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

How to 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-criticality-measures/.

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
  • Yuanfei Lin
  • Sebastian Maierhofer
  • Ivana Peneva
  • Kun Qian
  • Oliver Specht
  • Sicheng Wang
  • 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

commonroad-crime-0.3.0.tar.gz (67.4 kB view details)

Uploaded Source

Built Distribution

commonroad_crime-0.3.0-py3-none-any.whl (107.5 kB view details)

Uploaded Python 3

File details

Details for the file commonroad-crime-0.3.0.tar.gz.

File metadata

  • Download URL: commonroad-crime-0.3.0.tar.gz
  • Upload date:
  • Size: 67.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.5.0 importlib_metadata/4.11.3 pkginfo/1.7.1 requests/2.29.0 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.7.11

File hashes

Hashes for commonroad-crime-0.3.0.tar.gz
Algorithm Hash digest
SHA256 ee2651ef3e26d732d78f856233d97877b46c9171d9181c06504fcaea656aaece
MD5 ed50711720dcee1791933897c1664b57
BLAKE2b-256 b4554e31f8ac365b11564ba68d3ee647120b6e3488f3484a74552551cb7dd27b

See more details on using hashes here.

File details

Details for the file commonroad_crime-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: commonroad_crime-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 107.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.5.0 importlib_metadata/4.11.3 pkginfo/1.7.1 requests/2.29.0 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.7.11

File hashes

Hashes for commonroad_crime-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1214e47fa04645d3c817904e212882b824d3f593969d6c6f6a43308dfb74d32c
MD5 072aa811b32a3cc6b33977f4d9947e4b
BLAKE2b-256 adfa0285477f38768b9a42cf48fc6f72f1635d0505171b85b4bd3734fe54c113

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page