commonroad-crime


Namecommonroad-crime JSON
Version 0.4.0 PyPI version JSON
download
home_pagehttps://commonroad.in.tum.de/tools/commonroad-crime
Summarycriticality measures of automated vehicles
upload_time2024-05-10 15:30:52
maintainerNone
docs_urlNone
authorTechnical University of Munich
requires_pythonNone
licenseBSD 3-Clause
keywords criticality autonomous driving
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # CommonRoad-CriMe
![image info](https://raw.githubusercontent.com/CommonRoad/commonroad-crime/develop/docs/figures/CriMe-banner.png)
[![Linux](https://img.shields.io/badge/os-linux?&logo=Linux&logoColor=white&labelColor=gray)](https://pypi.python.org/pypi/commonroad-openscenario-converter/)
[![PyPI version fury.io](https://badge.fury.io/py/commonroad-crime.svg?style=plastic)](https://pypi.python.org/pypi/commonroad-crime/)
[![PyPI license](https://img.shields.io/pypi/l/commonroad-crime.svg?style=plastic)](https://pypi.python.org/pypi/commonroad-crime/)<br>
[![PyPI download month](https://img.shields.io/pypi/dm/commonroad-crime.svg?style=plastic&label=PyPI%20downloads)](https://pypi.python.org/pypi/commonroad-crime/) 
[![PyPI download week](https://img.shields.io/pypi/dw/commonroad-crime.svg?style=plastic&label=PyPI%20downloads)](https://pypi.python.org/pypi/commonroad-crime/)<br>

Toolbox to compute **Cri**ticality **Me**asures 
(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](https://github.com/orgs/CommonRoad/discussions) /
[Github issue](https://github.com/CommonRoad/commonroad-crime/issues/). 

<a href="https://colab.research.google.com/drive/1T7MbSVqU5XCDZgPTDERKNKYFbAInXRjy">
  <img src="https://raw.githubusercontent.com/CommonRoad/commonroad-crime/develop/docs/figures/live_demo.png" alt="Live Demo">
</a>

## 🚀 Installation Guide

`commonroad-crime` can be installed with:

``` bash
$ pip install commonroad-crime
```
<details>
<summary><b>Develop CriMe locally</b></summary>

For adding new measures, we recommend using [Anaconda](https://www.anaconda.com/) 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](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html).

After installing Anaconda, create a new environment with:
``` bash
$ 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:

```sh
$ conda activate commonroad-py38
or
$ source activate commonroad-py38
```
Then, install the dependencies with:

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

To test the installition, run unittest:
```bash
$ cd tests
$ python -m unittest -v
```

</details>

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

<details>
<summary><b>Add new criticality measure</b></summary>

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

</details>

<details>
<summary><b>Define configuration parameters of the measure</b></summary>

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

</details>

## 🚧 Documentation

The documentation of our toolbox is available on our website: https://cps.pages.gitlab.lrz.de/commonroad/commonroad-criticality-measures/.
<details>
<summary><b>Build documentation locally</b></summary>
In order to generate the documentation via Sphinx locally, run the following commands in the root directory:

```bash
$ 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/``.
</details>

## 🌟 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:
```text
@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](mailto:yuanfei.lin@tum.de) directly.

            

Raw data

            {
    "_id": null,
    "home_page": "https://commonroad.in.tum.de/tools/commonroad-crime",
    "name": "commonroad-crime",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "criticality, autonomous driving",
    "author": "Technical University of Munich",
    "author_email": "commonroad@lists.lrz.de",
    "download_url": "https://files.pythonhosted.org/packages/c2/64/28f105441c3793500532aef3eedc13bb8e7973c6ef18076c0f55803f3442/commonroad_crime-0.4.0.tar.gz",
    "platform": null,
    "description": "# CommonRoad-CriMe\n![image info](https://raw.githubusercontent.com/CommonRoad/commonroad-crime/develop/docs/figures/CriMe-banner.png)\n[![Linux](https://img.shields.io/badge/os-linux?&logo=Linux&logoColor=white&labelColor=gray)](https://pypi.python.org/pypi/commonroad-openscenario-converter/)\n[![PyPI version fury.io](https://badge.fury.io/py/commonroad-crime.svg?style=plastic)](https://pypi.python.org/pypi/commonroad-crime/)\n[![PyPI license](https://img.shields.io/pypi/l/commonroad-crime.svg?style=plastic)](https://pypi.python.org/pypi/commonroad-crime/)<br>\n[![PyPI download month](https://img.shields.io/pypi/dm/commonroad-crime.svg?style=plastic&label=PyPI%20downloads)](https://pypi.python.org/pypi/commonroad-crime/) \n[![PyPI download week](https://img.shields.io/pypi/dw/commonroad-crime.svg?style=plastic&label=PyPI%20downloads)](https://pypi.python.org/pypi/commonroad-crime/)<br>\n\nToolbox to compute **Cri**ticality **Me**asures \n(e.g. time-to-collision, time-to-react,...). Such measures\ncan be used to trigger warnings and emergency maneuvers \nin driver assistance systems or repair an infeasible \ntrajectory. If you have questions or want to report problems or suggestions, please start a [Github discussion](https://github.com/orgs/CommonRoad/discussions) /\n[Github issue](https://github.com/CommonRoad/commonroad-crime/issues/). \n\n<a href=\"https://colab.research.google.com/drive/1T7MbSVqU5XCDZgPTDERKNKYFbAInXRjy\">\n  <img src=\"https://raw.githubusercontent.com/CommonRoad/commonroad-crime/develop/docs/figures/live_demo.png\" alt=\"Live Demo\">\n</a>\n\n## \ud83d\ude80 Installation Guide\n\n`commonroad-crime` can be installed with:\n\n``` bash\n$ pip install commonroad-crime\n```\n<details>\n<summary><b>Develop CriMe locally</b></summary>\n\nFor adding new measures, we recommend using [Anaconda](https://www.anaconda.com/) 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](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html).\n\nAfter installing Anaconda, create a new environment with:\n``` bash\n$ conda create -n commonroad-py38 python=3.8 -y\n```\n\nHere 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:\n\n```sh\n$ conda activate commonroad-py38\nor\n$ source activate commonroad-py38\n```\nThen, install the dependencies with:\n\n```sh\n$ cd <path-to-this-repo>\n$ pip install -e .\n$ conda develop .\n```\n\nTo test the installition, run unittest:\n```bash\n$ cd tests\n$ python -m unittest -v\n```\n\n</details>\n\nTo get started your journey with our criticality measures, check the `tutorials` and the following tips.\n\n<details>\n<summary><b>Add new criticality measure</b></summary>\n\n1. create a new branch with `feature-<measure-name>` and checkout the branch\n2. navigate to `commonroad_crime/data_structure/type.py` to find the correct category of the measure and add an \nenumeration entry `<abbreviation>: <explanation>`\n3. navigate to `commonroad_crime/measure` to find the above-mentioned category and create a python file named\n`<abbreviation>.py`. Then create a class inheriting the `CriMeBase` under `commonroad_crime/data_structure/base.py`\n4. similar to other measures, you need to implement the `compute()` and `visualize()` functions\n\n</details>\n\n<details>\n<summary><b>Define configuration parameters of the measure</b></summary>\n\n1. navigate to `commonroad_crime/data_structure/configuation.py` to find the above-mentioned category and add a new \ninstance to the class as `self.<parameter> = config_relevant.<parameter>`\n2. you can then directly call the values using `self.configuration.<category>.<parameter>` in your measure class\n3. 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\n\n</details>\n\n## \ud83d\udea7 Documentation\n\nThe documentation of our toolbox is available on our website: https://cps.pages.gitlab.lrz.de/commonroad/commonroad-criticality-measures/.\n<details>\n<summary><b>Build documentation locally</b></summary>\nIn order to generate the documentation via Sphinx locally, run the following commands in the root directory:\n\n```bash\n$ pip install -r ./docs/requirements_doc.txt\n$ cd docs/sphinx\n$ make html\n```\n\nThe documentation can then be launched by browsing ``./docs/sphinx/build/html/index.html/``.\n</details>\n\n## \ud83c\udf1f Contributors (in alphabetical order by last name)\n\n- Liguo Chen\n- Marius Erath\n- Yuanfei Lin\n- Sebastian Maierhofer\n- Ivana Peneva\n- Kun Qian\n- Oliver Specht\n- Sicheng Wang\n- Youran Wang\n- Zekun Xing\n- Ziqian Xu\n\n## \ud83d\udd16 Citation\nIf you use `commonroad-crime` for academic work, we highly encourage you to cite our paper:\n```text\n@InProceedings{lin2023crime,\n      title     = {{CommonRoad-CriMe}: {A} Toolbox for Criticality Measures of Autonomous Vehicles},\n      author    = {Yuanfei Lin and Matthias Althoff},\n      booktitle = {Proc. of the IEEE Intell. Veh. Symp.},     \n      pages     = {1-8}, \n      year      = {2023},\n}\n```\nIf you use this project's code in industry, we'd love to hear from you as well; \nfeel free to reach out to [Yuanfei Lin](mailto:yuanfei.lin@tum.de) directly.\n",
    "bugtrack_url": null,
    "license": "BSD 3-Clause",
    "summary": "criticality measures of automated vehicles",
    "version": "0.4.0",
    "project_urls": {
        "Documentation": "https://cps.pages.gitlab.lrz.de/commonroad/commonroad-criticality-measures/",
        "Forum": "https://github.com/CommonRoad/commonroad-crime/issues",
        "Homepage": "https://commonroad.in.tum.de/tools/commonroad-crime",
        "Source": "https://github.com/CommonRoad/commonroad-crime"
    },
    "split_keywords": [
        "criticality",
        " autonomous driving"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4086a12385e87956b5313b52601427bbd7b650fa2ae5cd7851fdf28c87ea661b",
                "md5": "35124d50282272c5f2b355a8d43a22f2",
                "sha256": "37922976b9d7e13ea1f28c8ce94a56e6572d76813c4647157f72378894f723e9"
            },
            "downloads": -1,
            "filename": "commonroad_crime-0.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "35124d50282272c5f2b355a8d43a22f2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 125483,
            "upload_time": "2024-05-10T15:30:50",
            "upload_time_iso_8601": "2024-05-10T15:30:50.552345Z",
            "url": "https://files.pythonhosted.org/packages/40/86/a12385e87956b5313b52601427bbd7b650fa2ae5cd7851fdf28c87ea661b/commonroad_crime-0.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c26428f105441c3793500532aef3eedc13bb8e7973c6ef18076c0f55803f3442",
                "md5": "0945f674ac74208a1c052b77317f982a",
                "sha256": "f577de68f2fb71ccfe56faa851061313069335b731bf11707eaa05ba84650004"
            },
            "downloads": -1,
            "filename": "commonroad_crime-0.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "0945f674ac74208a1c052b77317f982a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 75472,
            "upload_time": "2024-05-10T15:30:52",
            "upload_time_iso_8601": "2024-05-10T15:30:52.541425Z",
            "url": "https://files.pythonhosted.org/packages/c2/64/28f105441c3793500532aef3eedc13bb8e7973c6ef18076c0f55803f3442/commonroad_crime-0.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-10 15:30:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "CommonRoad",
    "github_project": "commonroad-crime",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "commonroad-crime"
}
        
Elapsed time: 0.26318s