GithubHelp home page GithubHelp logo

commonroad / commonroad-crime Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 1.0 14.57 MB

๐Ÿšง ๐Ÿš” โš  Toolbox to compute Criticality Measures for Automated Vehicles

License: BSD 3-Clause "New" or "Revised" License

Python 4.57% Jupyter Notebook 95.43%
autonomous-driving criticality safety-critical safety-critical-systems safety-monitoring scenario-analysis time-to-collision time-to-react

commonroad-crime's Introduction

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-py38 python=3.8 -y

Here the name of the environment is called commonroad-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 activate this environment before you do anything related:

$ conda activate commonroad-py38
or
$ source activate commonroad-py38

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
  • 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.

commonroad-crime's People

Contributors

lguoad avatar silvercore97 avatar smaierhofer avatar yuanfeilin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

junyang0412

commonroad-crime's Issues

Python 3.11 support

Getting this error when trying to install dependencies using Python 3.11 or higher.

Searching for commonroad-reach>=2023.1
Reading https://pypi.org/simple/commonroad-reach/
Downloading https://files.pythonhosted.org/packages/e8/6a/7bc84173fa859cd8f2dee6384df0626339c5176056d03758decc897fe26b/commonroad_reach-2024.1.tar.gz#sha256=0e0d995c0ef0f2ded6430f1c4e095df59723b2ee552455388087bf2b884fd29a
Best match: commonroad-reach 2024.1
Processing commonroad_reach-2024.1.tar.gz
error: Couldn't find a setup script in /tmp/easy_install-q5c7esh7/commonroad_reach-2024.1.tar.gz

Looks like commonroad-reach doesn't have a release for 3.11 and for whatever reason also can't be compiled.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.