Skip to main content

Generation of OpenSCENARIO and OpenDRIVE xml files

Project description

Python Code style: black

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 user documentation can be found here, the API documentation here and the change log in release_notes.md

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

Coverage

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

  • The xosc module has full coverage of OpenSCENARIO V1.0.0, and most of V1.1.0 , V1.2.0 and v1.3.1, if something is missing please raise an issue or make a pull request.
  • The xodr module has coverage of basic roads, junctions, signals, and objects, based on OpenDrive (V 1.7.1).

For more details se xodr_coverage.txt and xosc_missing_features.txt

Getting Started

pip install scenariogeneration

then run any of the examples provided

Prerequisites

Been tested with Python >3.6.9. With Python versions <3.7 the order of certain xml-elements might not be the same between generations.

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 esmini in the following way:

from scenariogeneration import esmini

def Scenario(ScenarioGenerator): ...


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

clothoids

pyclothoids, used for construction and optimization of clothoids geometries

blender implementation

blender + scenariogeneration

Authors

See AUTHORS file

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.16.3.tar.gz (318.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scenariogeneration-0.16.3-py3-none-any.whl (278.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: scenariogeneration-0.16.3.tar.gz
  • Upload date:
  • Size: 318.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.30.0 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12

File hashes

Hashes for scenariogeneration-0.16.3.tar.gz
Algorithm Hash digest
SHA256 37e7748327c63226eb578ebec7083417236799e4cb890ba933b349f3f75acbd1
MD5 553840218debc77eb24cbc7a95eb5cb7
BLAKE2b-256 c3a12d3c0f4cebc66b37f5bf89b58e3896dde7dd8e9e1bac33e7dec95cc2023c

See more details on using hashes here.

File details

Details for the file scenariogeneration-0.16.3-py3-none-any.whl.

File metadata

  • Download URL: scenariogeneration-0.16.3-py3-none-any.whl
  • Upload date:
  • Size: 278.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.30.0 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12

File hashes

Hashes for scenariogeneration-0.16.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e01bc9e0cf8b6afa43b9c93948af12a61a66f222a0998cb3dfab1cac81d3e846
MD5 e3c7a566e45c66be0e8c73f21e1666cb
BLAKE2b-256 666537dffc7a458bf2a3c445575ec39f858cd5ab5c40348ab52b9c4ddd30da8c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page