Package: commonroad-crime
CommonRoad-CriMeToolbox to computeCriticalityMeasures
(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 Guidecommonroad-crimecan be installed with:$pipinstallcommonroad-crimeFor adding new measures, we recommend usingAnacondato 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 foundhere.After installing Anaconda, create a new environment with:$condacreate-ncommonroad-py38python=3.8-yHere the name of the environment is calledcommonroad-py38. 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 activatethis environment before you do anything related:$condaactivatecommonroad-py38
or
$sourceactivatecommonroad-py38Then, install the dependencies with:$cd<path-to-this-repo>
$pipinstall-e.
$condadevelop.To test the installition, run unittest:$cdtests
$python-munittest-vTo get started your journey with our criticality measures, check thetutorialsand the following tips.How to add new criticality measurecreate a new branch withfeature-<measure-name>and checkout the branchnavigate tocommonroad_crime/data_structure/type.pyto find the correct category of the measure and add an
enumeration entry<abbreviation>: <explanation>navigate tocommonroad_crime/measureto find the above-mentioned category and create a python file named<abbreviation>.py. Then create a class inheriting theCriMeBaseundercommonroad_crime/data_structure/base.pysimilar to other measures, you need to implement thecompute()andvisualize()functionsHow to define configuration parameters of the measurenavigate tocommonroad_crime/data_structure/configuation.pyto find the above-mentioned category and add a new
instance to the class asself.<parameter> = config_relevant.<parameter>you can then directly call the values usingself.configuration.<category>.<parameter>in your measure classto override the default parameter values, create ayamlfile (name it the same as the scenario) in./config_filesand modify the values thereDocumentationThe 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:$pipinstall-r./docs/requirements_doc.txt
$cddocs/sphinx
$makehtmlThe documentation can then be launched by browsing./docs/sphinx/build/html/index.html/.Contributors (in alphabetical order by last name)Liguo ChenYuanfei LinSebastian MaierhoferIvana PenevaKun QianOliver SpechtSicheng WangZekun XingZiqian XuCitationIf you usecommonroad-crimefor 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 toYuanfei Lindirectly.