OSC-Generator can be used to generate ASAM OpenSCENARIO files from vehicle data and an ASAM OpenDRIVE file.
Project description
Description
OSC-Generator is a collection of Python tools to generate ASAM OpenSCENARIO files from vehicle data and an ASAM OpenDRIVE file.
Scope of Application
Currently, OpenSCENARIO V1.0 and OpenDRIVE V1.4 are supported. Intersections may currently cause trouble but will be supported in a future release. All features are tested in Python 3.7 on Windows 10.
Installation
PyPI
- OSC-Generator can be installed using pip
pip install osc-generator
Testing
- Additional dependencies for testing are required.
- Required Python packages can be installed via pip:
pip install -r requirements_dev.txt
- For testing, an ASAM OpenDRIVE file is needed. The file '2017-04-04_Testfeld_A9_Nord_offset.xodr' from here can be used by downloading a copy to the tests/test_data folder. This file uses ASAM OpenDRIVE V1.4 format.
- Required Python packages can be installed via pip:
- Run pytest in the tests folder or a parent folder thereof.
- When everything is set up correctly, all tests should run successfully without raising any warnings.
Usage
- Class: OSC-Generator provides a Python class which can be used to generate a scenario in the OpenSCENARIO format from trajectories and an OpenDRIVE file. The file example.py contains runnable example code for usage of this class.
- CLI:
- OSC-Generator can use arguments provided via Python's commandline interface. For information on how to use this feature, see the output of the help function:
python osc_generator.py -h
- When installed via pip, OSC-Generator can directly be called in the console:
osc_generator -h
- OSC-Generator can use arguments provided via Python's commandline interface. For information on how to use this feature, see the output of the help function:
Open Simulation Interface (OSI) Format Input
-
In order to use OSI format (.osi) input trajectory files with the OSC-Generator, the following steps are required:
- install the Open Simulation Interface (OSI):
- follow the installation instructions: https://github.com/OpenSimulationInterface/open-simulation-interface
- copy the file 'OSITrace.py':
- from "$PATH_TO_OSI_DIRECTORY\open-simulation-interface\format"
- to "$PATH_TO_OSC-GENERATOR_DIRECTORY\OSC-Generator\osc_generator\tools\OSI"
- run tests
- install the Open Simulation Interface (OSI):
-
Usage of this feature functions as described above.
-
if OSI is not installed, the OSC-Generator can still be used with .csv input trajectory files.
Citation
An associated paper describes the original use case for which the OSC-Generator was created. When using this software, please cite the following:
@software{OSC-Generator,
author = {{Montanari, Francesco}, {Akkaya, Yigit Ali}, {Boßmann, Nils}, {Sichermann, Jörg}, {Müller, Marcel}, {Aigner, Axel Jeronimo}, {D'Sa, Dave}},
license = {Apache-2.0},
title = {{OSC-Generator}},
url = {https://github.com/EFS-OpenSource/OSC-Generator},
version = {0.2.0}
}
Acknowledgment
This work is supported by the German Federal Ministry for Digital and Transport (BMDV) within the Automated and Connected Driving funding program under grant No. 01MM20012F (SAVeNoW).
@copyright 2022 e:fs TechHub GmbH and Audi AG. All rights reserved. https://www.efs-techhub.com/ https://www.audi.com/de/company.html
@license Apache v2.0
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file osc_generator-0.2.0.tar.gz
.
File metadata
- Download URL: osc_generator-0.2.0.tar.gz
- Upload date:
- Size: 33.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0123b515a5c5c75ce2e909a1fb76e703ce957b46cd57fbd138c65400ce7a05f5 |
|
MD5 | 6b3fd31f88dc93017c4f8be9d8b1dadb |
|
BLAKE2b-256 | 428b2119115de4da7338f1701d783bd202a1481b93520bf852944a5fb4144093 |