Skip to main content

Implementation of vehicle models with varying abstraction levels ranging from kinematic single track model to a multi-body model.

Project description

Python Vehicle Models of CommonRoad

This package contains all vehicle models of the CommonRoad benchmarks.

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.

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. A simple simulation example for using the single-track model in combination with an odeint solver would be

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, or contact via our forum.

Changelog

Compared to version 2019b the following features were added:

  • kinematic single-track model with on-axle trailer
  • vehicle parameter set for a semi-trailer truck (vehicle ID: 4)
  • single-track drift model: nonlinear single-track model with Pacejka tire forces

Referencing

If you use CommonRoad, please cite

M. Althoff, M. Koschi, and S. Manzinger, ''CommonRoad: Composable Benchmarks for Motion Planning on Roads,'' in Proc. of the IEEE Intelligent Vehicles Symposium, 2017, pp. 719-726.

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-vehicle-models-2.0.0.tar.gz (20.9 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file commonroad-vehicle-models-2.0.0.tar.gz.

File metadata

  • Download URL: commonroad-vehicle-models-2.0.0.tar.gz
  • Upload date:
  • Size: 20.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2.post20201201 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.7.9

File hashes

Hashes for commonroad-vehicle-models-2.0.0.tar.gz
Algorithm Hash digest
SHA256 80fa57b8c71303464a255aa1c98510d876f1f81a1665ca7512785b6105f7e754
MD5 fbaae5b935a2598c47ad98d0c6cda7b7
BLAKE2b-256 264ecafc88caedd3ad09084fc9637c4b3bc252049cf2658e9ca82c917d3e3232

See more details on using hashes here.

File details

Details for the file commonroad_vehicle_models-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: commonroad_vehicle_models-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 37.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2.post20201201 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.7.9

File hashes

Hashes for commonroad_vehicle_models-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c7fe7eff02c2c144553ce83715baad99594973da6447e1ef832aa9b85a3d9f1e
MD5 7b5c3990a4e0ed9560c8b730ca158c25
BLAKE2b-256 6d8a21efbddb7ccd06d46881d889f016ad0455d418a18daa5c649f1b7d71086d

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