# Python Vehicle Models of CommonRoad
This package contains all vehicle models of the [CommonRoad benchmarks](https://commonroad.in.tum.de/).
We provide implementations of the vehicle dynamics, routines to convert initial states, and vehicle parameters.
## Documentation
For a detailed explanation of the vehicle models, please have a look at the [documentation](https://gitlab.lrz.de/tum-cps/commonroad-vehicle-models/blob/master/vehicleModels_commonRoad.pdf).
## Installation
To use vehicle models and parameters, run
```
pip install commonroad-vehicle-models
```
## Code examples
For an extended simulation example demonstrating the advantages of more complicated models, we refer to our [gitlab repository](https://gitlab.lrz.de/tum-cps/commonroad-vehicle-models/-/tree/master/PYTHON/scripts). A simple simulation example for using the single-track model in combination with an odeint solver would be
```python3
from scipy.integrate import odeint
import numpy
from vehiclemodels.init_ks import init_ks
from vehiclemodels.parameters_vehicle1 import parameters_vehicle1
from vehiclemodels.vehicle_dynamics_ks import vehicle_dynamics_ks
def func_KS(x, t, u, p):
f = vehicle_dynamics_ks(x, u, p)
return f
tStart = 0 # start time
tFinal = 1 # start time
# load vehicle parameters
p = parameters_vehicle1()
# initial state for simulation
delta0 = 0
vel0 = 15
Psi0 = 0
sy0 = 0
initialState = [0, sy0, delta0, vel0, Psi0]
x0_KS = init_ks(initialState)
t = numpy.arange(0, tFinal, 0.01)
u = [0, 5]
x = odeint(func_KS, x0_KS, t, args=(u, p))
```
## Contribute
If you want to contribute new vehicle models, you can create a merge request in our [repository](https://gitlab.lrz.de/tum-cps/commonroad-vehicle-models/), or contact via our [forum](https://commonroad.in.tum.de/forum/).
## Changelog
Compared to version 2.0.0 the following features were added/changed:
* linearized kinematic single-track model added as an additional vehicle model
* vehicle parameters are stored in YAML-files
* parameter configuration of vehicles are generated from YAML-files using [OmegaConf](https://omegaconf.readthedocs.io/en/2.2_branch/) (backwards compatible)
## Referencing
If you use CommonRoad for your research, please cite [our paper](http://mediatum.ub.tum.de/doc/1379638/776321.pdf):
```
@inproceedings{Althoff2017a,
author = {Althoff, Matthias and Koschi, Markus and Manzinger, Stefanie},
title = {CommonRoad: Composable benchmarks for motion planning on roads},
booktitle = {Proc. of the IEEE Intelligent Vehicles Symposium},
year = {2017},
}
```
Raw data
{
"_id": null,
"home_page": "https://commonroad.in.tum.de/",
"name": "commonroad-vehicle-models",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "autonomous automated vehicles driving motion planning",
"author": "Cyber-Physical Systems Group, Technical University of Munich",
"author_email": "commonroad@lists.lrz.de",
"download_url": "https://files.pythonhosted.org/packages/bf/e1/bc6dbacfc1af64c73e0610a7b71a47510c7d77d0d1eba88737c423fa84e1/commonroad-vehicle-models-3.0.2.tar.gz",
"platform": null,
"description": "# Python Vehicle Models of CommonRoad\n\nThis package contains all vehicle models of the [CommonRoad benchmarks](https://commonroad.in.tum.de/).\n\nWe provide implementations of the vehicle dynamics, routines to convert initial states, and vehicle parameters.\n\n## Documentation\n\nFor a detailed explanation of the vehicle models, please have a look at the [documentation](https://gitlab.lrz.de/tum-cps/commonroad-vehicle-models/blob/master/vehicleModels_commonRoad.pdf).\n\n## Installation\n\nTo use vehicle models and parameters, run\n```\npip install commonroad-vehicle-models\n```\n\n## Code examples\n\nFor an extended simulation example demonstrating the advantages of more complicated models, we refer to our [gitlab repository](https://gitlab.lrz.de/tum-cps/commonroad-vehicle-models/-/tree/master/PYTHON/scripts). A simple simulation example for using the single-track model in combination with an odeint solver would be\n\n```python3\nfrom scipy.integrate import odeint\nimport numpy\n\nfrom vehiclemodels.init_ks import init_ks\nfrom vehiclemodels.parameters_vehicle1 import parameters_vehicle1\nfrom vehiclemodels.vehicle_dynamics_ks import vehicle_dynamics_ks\n\ndef func_KS(x, t, u, p):\n f = vehicle_dynamics_ks(x, u, p)\n return f\n\ntStart = 0 # start time\ntFinal = 1 # start time\n\n# load vehicle parameters\np = parameters_vehicle1()\n\n# initial state for simulation\ndelta0 = 0\nvel0 = 15\nPsi0 = 0\nsy0 = 0\ninitialState = [0, sy0, delta0, vel0, Psi0]\nx0_KS = init_ks(initialState)\n\nt = numpy.arange(0, tFinal, 0.01)\nu = [0, 5]\nx = odeint(func_KS, x0_KS, t, args=(u, p))\n\n```\n\n\n\n## Contribute\n\nIf you want to contribute new vehicle models, you can create a merge request in our [repository](https://gitlab.lrz.de/tum-cps/commonroad-vehicle-models/), or contact via our [forum](https://commonroad.in.tum.de/forum/).\n\n\n## Changelog\nCompared to version 2.0.0 the following features were added/changed:\n* linearized kinematic single-track model added as an additional vehicle model\n* vehicle parameters are stored in YAML-files\n* parameter configuration of vehicles are generated from YAML-files using [OmegaConf](https://omegaconf.readthedocs.io/en/2.2_branch/) (backwards compatible) \n\n\n## Referencing\n\nIf you use CommonRoad for your research, please cite [our paper](http://mediatum.ub.tum.de/doc/1379638/776321.pdf): \n\n```\n@inproceedings{Althoff2017a,\n\tauthor = {Althoff, Matthias and Koschi, Markus and Manzinger, Stefanie},\n\ttitle = {CommonRoad: Composable benchmarks for motion planning on roads},\n\tbooktitle = {Proc. of the IEEE Intelligent Vehicles Symposium},\n\tyear = {2017},\n}\n```\n\n\n",
"bugtrack_url": null,
"license": "BSD",
"summary": "Implementation of vehicle models with varying abstraction levels ranging from kinematic single track model to a multi-body model.",
"version": "3.0.2",
"project_urls": {
"Homepage": "https://commonroad.in.tum.de/"
},
"split_keywords": [
"autonomous",
"automated",
"vehicles",
"driving",
"motion",
"planning"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c3050bcea75e39bcb98192bfe908d2e53d636f87d0d9a365dcd95ffe5c1d9373",
"md5": "875754fb8cd85f67d13da42bcaf22a26",
"sha256": "c8a675ddfdbba0c14521a4479cd820cfb42d03eb549723b00bd9384a434ddd6e"
},
"downloads": -1,
"filename": "commonroad_vehicle_models-3.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "875754fb8cd85f67d13da42bcaf22a26",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 44422,
"upload_time": "2022-11-14T19:27:58",
"upload_time_iso_8601": "2022-11-14T19:27:58.574505Z",
"url": "https://files.pythonhosted.org/packages/c3/05/0bcea75e39bcb98192bfe908d2e53d636f87d0d9a365dcd95ffe5c1d9373/commonroad_vehicle_models-3.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "bfe1bc6dbacfc1af64c73e0610a7b71a47510c7d77d0d1eba88737c423fa84e1",
"md5": "0d986eaa61ca77c389d2885936a01211",
"sha256": "874de3b173f7b39869b69ec8da71690f849766af8623525e3e96f8a33d034f8e"
},
"downloads": -1,
"filename": "commonroad-vehicle-models-3.0.2.tar.gz",
"has_sig": false,
"md5_digest": "0d986eaa61ca77c389d2885936a01211",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 24592,
"upload_time": "2022-11-14T19:28:01",
"upload_time_iso_8601": "2022-11-14T19:28:01.180071Z",
"url": "https://files.pythonhosted.org/packages/bf/e1/bc6dbacfc1af64c73e0610a7b71a47510c7d77d0d1eba88737c423fa84e1/commonroad-vehicle-models-3.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-11-14 19:28:01",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "commonroad-vehicle-models"
}