Giter Club home page Giter Club logo

scenariogeneration's Introduction

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 and V1.2.0, 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): ...


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

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.

scenariogeneration's People

Contributors

mander76 avatar mandolinmicke avatar inatale93 avatar jakobkaths avatar atingber avatar eknabevcc avatar johschmitz avatar johanneswen avatar hoxell avatar nilsgoldbeck avatar slundel6 avatar ishaan95 avatar ronald1995 avatar suanli avatar pyoscx avatar zijianhan-volvocars avatar xpcai2010 avatar mguldogu avatar dongfeng2134 avatar hamishs avatar quepas avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.