Skip to main content

Generation of OpenSCENARIO and OpenDRIVE xml files

Project description

scenariogeneration

The Python scenariogeneration package is a collection of libraries for generating OpenSCENARIO (.xosc) and OpenDRIVE (.xodr) XML files.

This combined package (which includes the former pyoscx, pyodrx) can be used to jointly generate OpenSCENARIO based scenarios with interlinked OpenDRIVE based road network maps. Nevertheless, it is still possible to separately generate OpenSCENARIO or OpenDRIVE files by using only a subset of the provided functionality.

The package consists of the scenario_generator module and two Python subpackages, xosc (OpenSCENARIO) and xodr (OpenDRIVE), together with some support functionality for auto generation with parametrization as well as easy viewing with esmini.

The package documentation can be found here: https://pyoscx.github.io/

Please note that this is not an official implementation of either OpenSCENARIO or OpenDRIVE.

Coverage

As of V0.2.0, the coverage of the modules varies:

  • The xosc module has full coverage of OpenSCENARIO (V 1.0.0), if something is missing please raise an issue.
  • The xodr module has coverage of basic roads, junctions, signals, and objects, based on OpenDrive (V 1.5.0).

For more details se xodr_coverage.txt

Getting Started

pip install scenariogeneration

then run any of the examples provided

Prerequisites

Been tested with Python >3.6.9

Installing

pip install scenariogeneration

Usage

Please see the user guide for more information: https://pyoscx.github.io/

Running with esmini

Esmini can be used to visualize the generated scenarios. Visit https://github.com/esmini/esmini and follow the "Binaries and demos" section. Your scenarios can be visualized directly by making use of esminiRunner in the following way:

from scenariogeneration import esmini

def Scenario(ScenarioGenerator): ...


s = Scenario()
if __name__ == "__main__":
    s = Scenario()
    
    esmini(s,esminipath ='path to esmini', index_to_run = 'first')

where index_to_run can be 'first', 'random', 'middle' or an integer, and esmini will run that scenario/road for you.

Related work

esmini

esmini is a basic OpenSCENARIO player

spirals

pyeulerspiral, used this lib for calculating euler spirals

Authors

Data formats

The wrappers is based on the OpenSCENARIO and OpenDRIVE standards.

OpenDRIVE

describes the static content of a scenario, like the road, lanes, signs and so on.

OpenSCENARIO

describes the dynamic content on top of a road network, e.g. traffic maneuvers, weather conditions, and so on.

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

scenariogeneration-0.4.0.tar.gz (99.7 kB view details)

Uploaded Source

File details

Details for the file scenariogeneration-0.4.0.tar.gz.

File metadata

  • Download URL: scenariogeneration-0.4.0.tar.gz
  • Upload date:
  • Size: 99.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.0

File hashes

Hashes for scenariogeneration-0.4.0.tar.gz
Algorithm Hash digest
SHA256 4aa503a9bf06037905f4e91706496d16ab53ea458fe443d36bf6eb55f63c0e3e
MD5 302696eea0771fbab2123061fec26e02
BLAKE2b-256 6e069123829660711fae5f15e50d5e22a8998b8b1aa50106cbdbe4a7cd05f686

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