scenariogeneration


Namescenariogeneration JSON
Version 0.14.3 PyPI version JSON
download
home_pagehttps://github.com/pyoscx/scenariogeneration
SummaryGeneration of OpenSCENARIO and OpenDRIVE xml files
upload_time2024-01-24 07:06:05
maintainer
docs_urlNone
authorMikael Andersson, Irene Natale, Andreas Tingberg
requires_python>=3.6
licenseMPL-2.0
keywords opendrive openscenario xml
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![Python](https://github.com/pyoscx/scenariogeneration/actions/workflows/python.yml/badge.svg?branch=main)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/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](https://github.com/esmini/esmini).

The user documentation can be found [here](https://pyoscx.github.io/), the API documentation [here](https://pyoscx.github.io/scenariogeneration/index.html) and the change log in [release_notes.md](https://github.com/pyoscx/scenariogeneration/blob/main/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): ...


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](https://github.com/esmini/esmini) is a basic OpenSCENARIO player

### clothoids

[pyclothoids](https://github.com/phillipd94/pyclothoids), used for construction and optimization of clothoids geometries

### blender implementation

[blender + scenariogeneration](https://github.com/johschmitz/blender-driving-scenario-creator)

## Authors

See [AUTHORS](https://github.com/pyoscx/scenariogeneration/blob/main/AUTHORS) file

## Data formats

The wrappers is based on the OpenSCENARIO and OpenDRIVE standards.

[OpenDRIVE](https://www.asam.net/standards/detail/opendrive/)

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

[OpenSCENARIO](https://www.asam.net/standards/detail/openscenario/)

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

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pyoscx/scenariogeneration",
    "name": "scenariogeneration",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "OpenDRIVE,OpenSCENARIO,xml",
    "author": "Mikael Andersson, Irene Natale, Andreas Tingberg",
    "author_email": "andmika@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/4d/21/e0510c5a9de202f98b81f61ea7e2943ef9ca486b38658d7d7acddfbd2abd/scenariogeneration-0.14.3.tar.gz",
    "platform": null,
    "description": "![Python](https://github.com/pyoscx/scenariogeneration/actions/workflows/python.yml/badge.svg?branch=main)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\n# scenariogeneration\n\nThe Python scenariogeneration package is a collection of libraries for generating OpenSCENARIO (.xosc) and OpenDRIVE (.xodr) XML files.\n\nThis 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.\n\nThe 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](https://github.com/esmini/esmini).\n\nThe user documentation can be found [here](https://pyoscx.github.io/), the API documentation [here](https://pyoscx.github.io/scenariogeneration/index.html) and the change log in [release_notes.md](https://github.com/pyoscx/scenariogeneration/blob/main/release_notes.md)\n\nPlease note that this is not an official implementation of either OpenSCENARIO or OpenDRIVE.\n\n## Coverage\n\nAs of V0.11.0, the coverage of the modules varies:\n- 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.\n- The xodr module has coverage of basic roads, junctions, signals, and objects, based on OpenDrive (V 1.7.1).\n\nFor more details se xodr_coverage.txt and xosc_missing_features.txt\n\n## Getting Started\n\n```\npip install scenariogeneration\n```\nthen run any of the examples provided\n\n### Prerequisites\n\nBeen tested with Python >3.6.9.\nWith Python versions <3.7 the order of certain xml-elements might not be the same between generations.\n\n### Installing\n\n```\npip install scenariogeneration\n```\n\n## Usage\n\nPlease see the user guide for more information: https://pyoscx.github.io/\n\n### Running with esmini\n\nEsmini can be used to visualize the generated scenarios. Visit https://github.com/esmini/esmini and follow the \"Binaries and demos\" section.\nYour scenarios can be visualized directly by making use of *esmini* in the following way:\n\n```\nfrom scenariogeneration import esmini\n\ndef Scenario(ScenarioGenerator): ...\n\n\nif __name__ == \"__main__\":\n    s = Scenario()\n\n    esmini(s,esminipath ='path to esmini', index_to_run = 'first')\n```\nwhere *index_to_run* can be 'first', 'random', 'middle' or an integer, and esmini will run that scenario/road for you.\n\n## Related work\n\n### esmini\n\n[esmini](https://github.com/esmini/esmini) is a basic OpenSCENARIO player\n\n### clothoids\n\n[pyclothoids](https://github.com/phillipd94/pyclothoids), used for construction and optimization of clothoids geometries\n\n### blender implementation\n\n[blender + scenariogeneration](https://github.com/johschmitz/blender-driving-scenario-creator)\n\n## Authors\n\nSee [AUTHORS](https://github.com/pyoscx/scenariogeneration/blob/main/AUTHORS) file\n\n## Data formats\n\nThe wrappers is based on the OpenSCENARIO and OpenDRIVE standards.\n\n[OpenDRIVE](https://www.asam.net/standards/detail/opendrive/)\n\ndescribes the static content of a scenario, like the road, lanes, signs and so on.\n\n[OpenSCENARIO](https://www.asam.net/standards/detail/openscenario/)\n\ndescribes the dynamic content on top of a road network, e.g. traffic maneuvers, weather conditions, and so on.",
    "bugtrack_url": null,
    "license": "MPL-2.0",
    "summary": "Generation of OpenSCENARIO and OpenDRIVE xml files",
    "version": "0.14.3",
    "project_urls": {
        "Download": "https://github.com/pyoscx/scenariogeneration/archive/v0.14.3.tar.gz",
        "Homepage": "https://github.com/pyoscx/scenariogeneration"
    },
    "split_keywords": [
        "opendrive",
        "openscenario",
        "xml"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4d21e0510c5a9de202f98b81f61ea7e2943ef9ca486b38658d7d7acddfbd2abd",
                "md5": "f21df75ea97b17c2542bbbc007c37c9e",
                "sha256": "ea9a9d27689abb865556d2037618291130c4aaf80abb1fa1e02d801246823b3d"
            },
            "downloads": -1,
            "filename": "scenariogeneration-0.14.3.tar.gz",
            "has_sig": false,
            "md5_digest": "f21df75ea97b17c2542bbbc007c37c9e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 227742,
            "upload_time": "2024-01-24T07:06:05",
            "upload_time_iso_8601": "2024-01-24T07:06:05.588673Z",
            "url": "https://files.pythonhosted.org/packages/4d/21/e0510c5a9de202f98b81f61ea7e2943ef9ca486b38658d7d7acddfbd2abd/scenariogeneration-0.14.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-24 07:06:05",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pyoscx",
    "github_project": "scenariogeneration",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "scenariogeneration"
}
        
Elapsed time: 0.17489s