├── bind ├── pyxodr │ ├── requirements.txt │ ├── __init__.py │ ├── __test__.py │ └── CMakeLists.txt ├── pyxosc │ ├── requirements.txt │ ├── __init__.py │ ├── __test__.py │ ├── CMakeLists.txt │ └── pyxosc.cxx └── CMakeLists.txt ├── .gitattributes ├── src ├── CMakeLists.txt ├── xodr │ ├── CMakeLists.txt │ └── xodr.cxx └── xosc │ └── CMakeLists.txt ├── .gitmodules ├── config.h.in ├── appln ├── main_xosc.cxx ├── main_xodr.cxx └── CMakeLists.txt ├── deps └── CMakeLists.txt ├── cmake ├── FindPugiXML.cmake └── utils.cmake ├── LICENSE ├── CMakeLists.txt ├── .gitignore ├── README.md └── samples └── TrafficJam.xosc /bind/pyxodr/requirements.txt: -------------------------------------------------------------------------------- 1 | ifaddr 2 | -------------------------------------------------------------------------------- /bind/pyxosc/requirements.txt: -------------------------------------------------------------------------------- 1 | ifaddr 2 | -------------------------------------------------------------------------------- /bind/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(pyxodr) 2 | add_subdirectory(pyxosc) 3 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf whitespace=tab-in-indent,trailing-space,tabwidth=4 2 | -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(xodr) #Opendrive 1.6 2 | add_subdirectory(xosc) #OpenSCENARIO 1.0.0 3 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "deps/pybind11"] 2 | path = deps/pybind11 3 | url = https://github.com/pybind/pybind11 4 | [submodule "deps/pugixml"] 5 | path = deps/pugixml 6 | url = https://github.com/zeux/pugixml.git 7 | -------------------------------------------------------------------------------- /bind/pyxodr/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | 4 | import os,sys 5 | 6 | sys.path.append(os.path.dirname(__file__)) 7 | 8 | import pyxodr 9 | 10 | from pyxodr import xodr 11 | 12 | print ("Importing pyxodr %s"%str(pyxodr.__doc__)) 13 | 14 | __all__=['xodr'] 15 | -------------------------------------------------------------------------------- /bind/pyxosc/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | 4 | import os,sys 5 | 6 | sys.path.append(os.path.dirname(__file__)) 7 | 8 | import pyxodr 9 | 10 | from pyxodr import xodr 11 | 12 | print ("Importing pyxodr %s"%str(pyxodr.__doc__)) 13 | 14 | __all__=['xodr'] 15 | -------------------------------------------------------------------------------- /config.h.in: -------------------------------------------------------------------------------- 1 | #ifndef _CONFIG_H_ 2 | #define _CONFIG_H_ 3 | 4 | #pragma once 5 | 6 | // the configured options and settings for Tutorial 7 | #define XODR_VERSION @XODR_VERSION@ 8 | 9 | #define __DIRECTORY__ "@CMAKE_BINARY_DIR@" 10 | #define __DATA_DIR__ "@CMAKE_SOURCE_DIR@/samples" 11 | 12 | #endif // _CONFIG_H_ 13 | -------------------------------------------------------------------------------- /appln/main_xosc.cxx: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "xosc.h" 5 | 6 | int main (int argc , char **argv) 7 | { 8 | std::string filename = (argc > 1 ? argv[1]: std::string(__DATA_DIR__)+"/TrafficJam.xosc"); 9 | 10 | std::cout<<"Loading filename .. "< 2 | #include 3 | 4 | #include "xodr.h" 5 | 6 | int main (int argc , char **argv) 7 | { 8 | std::string filename = (argc > 1 ? argv[1]: std::string(__DATA_DIR__)+"/Town01.xodr"); 9 | 10 | std::cout<<"Loading filename .. "< ${CMAKE_CURRENT_BINARY_DIR} 19 | $ # 20 | ) 21 | 22 | set(CMAKE_CXX_VISIBILITY_PRESET hidden) 23 | set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) 24 | 25 | GENERATE_EXPORT_HEADER(${LIBRARY_NAME}) 26 | 27 | SET_TARGET_PROPERTIES(${LIBRARY_NAME} PROPERTIES FOLDER ${PROJECT_NAME}/lib) 28 | 29 | SET_TARGET_PROPERTIES(${LIBRARY_NAME} PROPERTIES VERSION ${XODR_VERSION} SOVERSION ${XODR_VERSION_MAJOR}) 30 | 31 | install(FILES ${TARGET_INSTALL_HEADERS} ${TARGET_HEADERS} ${CMAKE_CURRENT_BINARY_DIR}/${LIBRARY_NAME}_export.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include) 32 | -------------------------------------------------------------------------------- /src/xosc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(LIBRARY_NAME xosc) 2 | 3 | SET(TARGET_HEADERS 4 | xosc.h 5 | ) 6 | 7 | SET(TARGET_SOURCES 8 | xosc.cxx 9 | ) 10 | 11 | INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) # for export_header.h 12 | 13 | ADD_LIBRARY(${LIBRARY_NAME} ${TARGET_SOURCES} ${TARGET_HEADERS}) 14 | 15 | TARGET_LINK_LIBRARIES(${LIBRARY_NAME} pugixml) 16 | 17 | TARGET_INCLUDE_DIRECTORIES(${LIBRARY_NAME} PUBLIC 18 | $ ${CMAKE_CURRENT_BINARY_DIR} 19 | $ # 20 | ) 21 | 22 | set(CMAKE_CXX_VISIBILITY_PRESET hidden) 23 | set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) 24 | 25 | GENERATE_EXPORT_HEADER(${LIBRARY_NAME}) 26 | 27 | SET_TARGET_PROPERTIES(${LIBRARY_NAME} PROPERTIES FOLDER ${PROJECT_NAME}/lib) 28 | 29 | SET_TARGET_PROPERTIES(${LIBRARY_NAME} PROPERTIES VERSION ${XODR_VERSION} SOVERSION ${XODR_VERSION_MAJOR}) 30 | 31 | install(FILES ${TARGET_INSTALL_HEADERS} ${TARGET_HEADERS} ${CMAKE_CURRENT_BINARY_DIR}/${LIBRARY_NAME}_export.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include) 32 | -------------------------------------------------------------------------------- /appln/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------------------------------------------- 2 | SET(EXE_XODR_NAME xodr) 3 | INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) 4 | SET(TARGET_XODR_NAME ${EXE_XODR_NAME}-${PLATFORM}_${ARCH}) 5 | SET(TARGET_XODR_SOURCES main_xodr.cxx) 6 | ADD_EXECUTABLE(${TARGET_XODR_NAME} ${TARGET_XODR_SOURCES} ) 7 | TARGET_LINK_LIBRARIES(${TARGET_XODR_NAME} PUBLIC xodr) 8 | SET_TARGET_PROPERTIES(${TARGET_XODR_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) 9 | #------------------------------------------------------------------------------------------------- 10 | SET(EXE_XOSC_NAME xosc) 11 | INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) 12 | SET(TARGET_XOSC_NAME ${EXE_XOSC_NAME}-${PLATFORM}_${ARCH}) 13 | SET(TARGET_XOSC_SOURCES main_xosc.cxx) 14 | ADD_EXECUTABLE(${TARGET_XOSC_NAME} ${TARGET_XOSC_SOURCES} ) 15 | TARGET_LINK_LIBRARIES(${TARGET_XOSC_NAME} PUBLIC xosc) 16 | SET_TARGET_PROPERTIES(${TARGET_XOSC_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) 17 | #------------------------------------------------------------------------------------------------- 18 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 moonstarsky37 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /bind/pyxodr/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(TARGET_NAME pyxodr) 2 | 3 | find_package(PythonInterp 3) 4 | find_package(PythonLibs 3) 5 | 6 | IF(PYTHONINTERP_FOUND) 7 | add_definitions( 8 | -DPYTHON_EMBED 9 | ) 10 | ENDIF() 11 | 12 | IF ( ${CMAKE_SYSTEM_NAME} MATCHES "Windows") 13 | IF (${CMAKE_BUILD_TYPE} STREQUAL "Debug") 14 | message(STATUS "Debug output enabled -- $$$ Python Binding $$$ .. removing postfix") 15 | SET(CMAKE_DEBUG_POSTFIX "") 16 | ENDIF() 17 | ENDIF() 18 | 19 | 20 | set (HEADER_FILES "") 21 | set (SOURCE_FILES pyxodr.cxx) 22 | set (CONFIG_FILES __init__.py __test__.py) 23 | 24 | pybind11_add_module(${TARGET_NAME} 25 | ${HEADER_FILES} 26 | ${SOURCE_FILES} 27 | ${CONFIG_FILES} 28 | ) 29 | 30 | target_link_libraries (${TARGET_NAME} PRIVATE xodr ) 31 | 32 | SET(TARGET_PATH ${CMAKE_BINARY_DIR}/pybind) 33 | 34 | add_custom_command(TARGET ${TARGET_NAME} PRE_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory ${TARGET_PATH}) 35 | 36 | file(GLOB_RECURSE py_srcs "*.py") 37 | foreach(pyfile ${py_srcs}) 38 | add_custom_command(TARGET ${TARGET_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${pyfile} ${TARGET_PATH}) 39 | endforeach() 40 | 41 | #add_custom_command(TARGET ${TARGET_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/config/config.json ${TARGET_PATH}/network.json) 42 | 43 | add_custom_command(TARGET ${TARGET_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $ ${TARGET_PATH}) 44 | -------------------------------------------------------------------------------- /bind/pyxosc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(TARGET_NAME pyxosc) 2 | 3 | find_package(PythonInterp 3) 4 | find_package(PythonLibs 3) 5 | 6 | IF(PYTHONINTERP_FOUND) 7 | add_definitions( 8 | -DPYTHON_EMBED 9 | ) 10 | ENDIF() 11 | 12 | IF ( ${CMAKE_SYSTEM_NAME} MATCHES "Windows") 13 | IF (${CMAKE_BUILD_TYPE} STREQUAL "Debug") 14 | message(STATUS "Debug output enabled -- $$$ Python Binding $$$ .. removing postfix") 15 | SET(CMAKE_DEBUG_POSTFIX "") 16 | ENDIF() 17 | ENDIF() 18 | 19 | 20 | set (HEADER_FILES "") 21 | set (SOURCE_FILES pyxosc.cxx) 22 | set (CONFIG_FILES __init__.py __test__.py) 23 | 24 | pybind11_add_module(${TARGET_NAME} 25 | ${HEADER_FILES} 26 | ${SOURCE_FILES} 27 | ${CONFIG_FILES} 28 | ) 29 | 30 | target_link_libraries (${TARGET_NAME} PRIVATE xosc) 31 | 32 | SET(TARGET_PATH ${CMAKE_BINARY_DIR}/pybind) 33 | 34 | add_custom_command(TARGET ${TARGET_NAME} PRE_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory ${TARGET_PATH}) 35 | 36 | file(GLOB_RECURSE py_srcs "*.py") 37 | foreach(pyfile ${py_srcs}) 38 | add_custom_command(TARGET ${TARGET_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${pyfile} ${TARGET_PATH}) 39 | endforeach() 40 | 41 | #add_custom_command(TARGET ${TARGET_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/config/config.json ${TARGET_PATH}/network.json) 42 | 43 | add_custom_command(TARGET ${TARGET_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $ ${TARGET_PATH}) 44 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | 3 | PROJECT(ad-xolib LANGUAGES C CXX) 4 | 5 | SET(CMAKE_CXX_STANDARD 14) 6 | 7 | INCLUDE (${CMAKE_SOURCE_DIR}/cmake/utils.cmake) 8 | INCLUDE(GenerateExportHeader) 9 | 10 | ADD_PLATFORM_ARCH() 11 | 12 | OPTION(BUILD_SHARED_LIBS "Build project with shared Opendds library" ON) 13 | OPTION(BUILD_PYTHON_EMBED "Build project with Python embed " ON) 14 | 15 | SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ON) 16 | 17 | IF( EXISTS "${CMAKE_CURRENT_BINARY_DIR}/compile_commands.json" ) 18 | EXECUTE_PROCESS( COMMAND ${CMAKE_COMMAND} -E copy_if_different 19 | ${CMAKE_CURRENT_BINARY_DIR}/compile_commands.json 20 | ${CMAKE_CURRENT_SOURCE_DIR}/compile_commands.json 21 | ) 22 | ENDIF() 23 | 24 | IF ( ${CMAKE_SYSTEM_NAME} MATCHES "Windows") 25 | IF (NOT CMAKE_BUILD_TYPE) 26 | SET(CMAKE_BUILD_TYPE Debug CACHE STRING 27 | "Choose the type of build, options are : None Debug Release RelWithDebInfo MinSizeRel." 28 | FORCE) 29 | ENDIF() 30 | ENDIF() 31 | 32 | SET(CMAKE_DISABLE_SOURCE_CHANGES ON) 33 | SET(CMAKE_DISABLE_IN_SOURCE_BUILD ON) 34 | 35 | SET(PROJECT_CMAKE_ROOT "${CMAKE_SOURCE_DIR}/cmake") 36 | 37 | SET(CMAKE_MODULE_PATH "${PROJECT_CMAKE_ROOT};${CMAKE_MODULE_PATH}") 38 | 39 | #FIND_PACKAGE(PugiXML REQUIRED) 40 | 41 | # The version number. 42 | SET (XODR_VERSION_MAJOR 0) 43 | SET (XODR_VERSION_MINOR 1) 44 | SET (XODR_VERSION_PATCH 0) 45 | 46 | set(XODR_VERSION ${XODR_VERSION_MAJOR}.${XODR_VERSION_MINOR}.${XODR_VERSION_PATCH}) 47 | 48 | # configure a header file to pass some of the CMake settings 49 | # to the source code 50 | CONFIGURE_FILE ( 51 | "${PROJECT_SOURCE_DIR}/config.h.in" 52 | "${PROJECT_BINARY_DIR}/config.h" 53 | ) 54 | 55 | # Always include the source and build directories in the include path. 56 | SET(CMAKE_INCLUDE_CURRENT_DIR ON) 57 | 58 | #SET(CMAKE_CXX_VISIBILITY_PRESET hidden) 59 | #SET(CMAKE_VISIBILITY_INLINES_HIDDEN 1) 60 | 61 | INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}) 62 | INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/deps/pugixml/src) 63 | 64 | ADD_SUBDIRECTORY(deps) # for pybind11 & pugixml 65 | ADD_SUBDIRECTORY(src) 66 | IF(BUILD_PYTHON_EMBED) 67 | ADD_SUBDIRECTORY(bind) 68 | ENDIF() 69 | ADD_SUBDIRECTORY(appln) 70 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | pip-wheel-metadata/ 24 | share/python-wheels/ 25 | *.egg-info/ 26 | .installed.cfg 27 | *.egg 28 | MANIFEST 29 | 30 | # PyInstaller 31 | # Usually these files are written by a python script from a template 32 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 33 | *.manifest 34 | *.spec 35 | 36 | # Installer logs 37 | pip-log.txt 38 | pip-delete-this-directory.txt 39 | 40 | # Unit test / coverage reports 41 | htmlcov/ 42 | .tox/ 43 | .nox/ 44 | .coverage 45 | .coverage.* 46 | .cache 47 | nosetests.xml 48 | coverage.xml 49 | *.cover 50 | *.py,cover 51 | .hypothesis/ 52 | .pytest_cache/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | target/ 76 | 77 | # Jupyter Notebook 78 | .ipynb_checkpoints 79 | 80 | # IPython 81 | profile_default/ 82 | ipython_config.py 83 | 84 | # pyenv 85 | .python-version 86 | 87 | # pipenv 88 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 89 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 90 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 91 | # install all needed dependencies. 92 | #Pipfile.lock 93 | 94 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 95 | __pypackages__/ 96 | 97 | # Celery stuff 98 | celerybeat-schedule 99 | celerybeat.pid 100 | 101 | # SageMath parsed files 102 | *.sage.py 103 | 104 | # Environments 105 | .env 106 | .venv 107 | env/ 108 | venv/ 109 | ENV/ 110 | env.bak/ 111 | venv.bak/ 112 | 113 | # Spyder project settings 114 | .spyderproject 115 | .spyproject 116 | 117 | # Rope project settings 118 | .ropeproject 119 | 120 | # mkdocs documentation 121 | /site 122 | 123 | # mypy 124 | .mypy_cache/ 125 | .dmypy.json 126 | dmypy.json 127 | 128 | # Pyre type checker 129 | .pyre/ 130 | 131 | # vs 132 | .vs* -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # Pyxodr - Read opendrive with python/c++ parser 3 | This project is fork from [here](https://github.com/javedulu/ad-xolib) with some modification for utf-8 based user. Also, test building the python API with python 3.8 (built test with VS2017, VS2019 in Windows 10). 4 | 5 | C++ library for Parsing OpenScenario (1.0.0) & OpenDrive format files (1.6) with Python bindings for 3.+ 6 | 7 | ## Introduction 8 | 9 | This repository provides a library for reading ASAM's OpenStandards OpenScenario & OpenDrive Data files, the parsing conforms to 10 | 11 | [ASAM OpenDRIVE 1.6 12 | Specification](https://www.asam.net/index.php?eID=dumpFile&t=f&f=3495&token=56b15ffd9dfe23ad8f759523c806fc1f1a90a0e8) 13 | 14 | [ASAM OpenScenario 1.0.0 15 | Specification](https://www.asam.net/index.php?eID=dumpFile&t=f&f=3496&token=df4fdaf41a8463e585495001cc3db3298b57d426) 16 | 17 | ![Image of asam-logo](https://www.asam.net/typo3conf/ext/asam_cms/Resources/Public/Images/asam-logo.svg) 18 | 19 | 20 | ## Inspiration 21 | 22 | 23 | - https://github.com/carla-simulator/map 24 | - https://github.com/esmini/esmini.git 25 | 26 | 27 | ## Getting started 28 | The project is compiled with c++14 enabled compiler, choose your stack accordingly . 29 | 30 | #### Build from Source for C++ and pybind 31 | 32 | ```bash 33 | git clone https://github.com/moonstarsky37/ad-xolib 34 | cd ad-xolib 35 | git submodule update --init --recursive 36 | # build by cmake, if you not link a alias, the default is "C:\Program Files\CMake\bin\cmake.exe" 37 | # i.e below command can be using as 38 | # "C:\Program Files\CMake\bin\cmake.exe" . -B build 39 | cmake . -B build # it will create a folder named "build", if not, created by "mkdir build" 40 | cmake . --target build 41 | 42 | ``` 43 | #### Build for python 44 | To now, you will create a folder named build with following code. 45 | 46 | ![](https://i.imgur.com/O0cZZGC.png) 47 | Open the "ad-xolib.sln" with VS. 48 | And Click the "Local Window Debugger" will create the pybind result python API. 49 | That is, after building the src, it will create some folder like this the API file is under the folder named "pybind". 50 | 51 | ![](https://i.imgur.com/Me3xv8w.png) 52 | 53 | In my case, the builted result under python 3.8 will like following: 54 | 55 | ![](https://i.imgur.com/Fd1jaW2.png) 56 | 57 | If you missing any of *.dll in this folder, just copy 58 | ``` 59 | 1. ./build/src/xosc/Debug/xosc.dll 60 | 2. ./build/src/xodr/Debug/xodr.dll 61 | 3. ./build/deps/pugixml/Debug/pugixml.dll 62 | ``` 63 | to ```./build/pybind``` folder. 64 | 65 | Finally, you can import pyxodr now and read opendrive file 66 | 67 | ![](https://i.imgur.com/9NhAlKq.png) 68 | ![](https://i.imgur.com/A9CwZip.png) 69 | 70 | 71 | 72 | ## Alternatives 73 | - [https://github.com/JensKlimke/odrparser](https://github.com/JensKlimke/odrparser)- OpenDrive 1.5 74 | - [https://github.com/DLR-TS/xodr](https://github.com/DLR-TS/xodr) - OpenDrive 1.4 75 | - [https://github.com/pyoscx/pyoscx](https://github.com/pyoscx/pyoscx) - pyoscx 76 | - [https://github.com/carla-simulator/scenario_runner](https://github.com/carla-simulator/scenario_runner) - Scenario Runner 77 | - [https://github.com/MrMushroom/CarlaScenarioLoader](https://github.com/MrMushroom/CarlaScenarioLoader) - CarlaScenarioLoader 78 | -------------------------------------------------------------------------------- /cmake/utils.cmake: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------------------------- 2 | MACRO (SET_GLOBAL_VARIABLE name value) 3 | SET (${name} ${value} CACHE INTERNAL "Used to pass variables between directories" FORCE) 4 | ENDMACRO (SET_GLOBAL_VARIABLE) 5 | #------------------------------------------------------------------------------- 6 | MACRO(SUBDIRLIST RESULT CURDIR) 7 | FILE(GLOB children RELATIVE ${CURDIR} ${CURDIR}/*) 8 | SET(dirlist "") 9 | FOREACH(child ${children}) 10 | IF(IS_DIRECTORY ${CURDIR}/${child}) 11 | LIST(APPEND dirlist ${child}) 12 | ENDIF() 13 | ENDFOREACH() 14 | SET(${RESULT} ${dirlist}) 15 | ENDMACRO() 16 | #------------------------------------------------------------------------------- 17 | MACRO(ADD_REMOTE_EXECUTABLE exe_name) 18 | 19 | SET(REMOTE_PLATFORM "linux") 20 | SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/deps/ssh2exec/cmake") 21 | 22 | INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) 23 | INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/deps/ssh2exec) 24 | INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) 25 | 26 | FIND_PACKAGE(SSH2 REQUIRED) 27 | 28 | SET(REMOTE_PLATFORM_ARCH ${REMOTE_PLATFORM}_${ARCH}) 29 | 30 | SET(TARGET_HEADERS 31 | #${CMAKE_SOURCE_DIR}/deps/ssh2exec/libssh2.hxx 32 | #${CMAKE_BINARY_DIR}/sshxconfig.h 33 | ) 34 | 35 | # configure a header file to pass some of the CMake settings 36 | # to the source code 37 | configure_file ( 38 | "${CMAKE_SOURCE_DIR}/sshxs/remotexec.cxx.in" 39 | "${CMAKE_CURRENT_BINARY_DIR}/${EXE_NAME}-remotexec.cxx" 40 | ) 41 | 42 | SET(TARGET_SOURCES 43 | "${CMAKE_CURRENT_BINARY_DIR}/${EXE_NAME}-remotexec.cxx" 44 | ) 45 | 46 | ADD_EXECUTABLE(${EXE_NAME}-remote 47 | ${TARGET_SOURCES} 48 | ${TARGET_HEADERS} 49 | ) 50 | 51 | TARGET_LINK_LIBRARIES(${EXE_NAME}-remote ${LIBSSH2_LIBRARY}) 52 | 53 | SET_TARGET_PROPERTIES(${EXE_NAME}-remote PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) 54 | 55 | SET_TARGET_PROPERTIES(${EXE_NAME}-remote PROPERTIES FOLDER sshxs) 56 | 57 | ENDMACRO() 58 | #------------------------------------------------------------------------------- 59 | MACRO (ADD_PLATFORM_ARCH) 60 | set(ARCH "x32") 61 | IF (${CMAKE_SIZEOF_VOID_P} EQUAL 8) 62 | set(ARCH "x64") 63 | ENDIF() 64 | 65 | if(APPLE) 66 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-narrowing -Wno-deprecated-declarations") 67 | endif() 68 | 69 | IF ( ${CMAKE_SYSTEM_NAME} MATCHES "Windows") 70 | set(PLATFORM "win32") 71 | add_definitions(-D_WIN32) 72 | add_definitions(-DNOMINMAX) 73 | ENDIF ( ${CMAKE_SYSTEM_NAME} MATCHES "Windows") 74 | IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") 75 | # Mac OS X specific code 76 | set (CMAKE_MACOSX_RPATH 1) 77 | add_definitions(-DMAC_OSX) 78 | set(PLATFORM "darwin") 79 | ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") 80 | IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") 81 | # Linux specific code 82 | add_definitions(-DLINUX) 83 | set(PLATFORM "linux") 84 | ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") 85 | ENDMACRO() 86 | 87 | 88 | #IF (APPLE) 89 | # SET(REMOTE_BUILD "YES" CACHE BOOL "REMOTE BUILD FROM OSX to LINUX") 90 | #ENDIF() 91 | # 92 | #IF(REMOTE_BUILD) 93 | ##TODO: 94 | ## 1. rsync the build directory to ros-linux 95 | ## 2. cd to build directory on ros-linux 96 | ## 3. make on build direcotry on ros-linux 97 | #set(REMOTE_URL ros@SJOLAP037.esi-internal.esi-group.com) 98 | ##set(REMOTE_URL ros@localhost) 99 | #string(TIMESTAMP TODAY "%Y%m%d") 100 | #set(REMOTE_DIR /tmp/${PROJECT_NAME}-${TODAY}) 101 | # 102 | #ADD_CUSTOM_COMMAND(OUTPUT ${TARGET_NAME}Make 103 | # COMMAND rsync -arvzh --exclude={xbuild/} ${CMAKE_SOURCE_DIR}/ ${REMOTE_URL}:${REMOTE_DIR} 104 | # COMMAND ssh -t ${REMOTE_URL} \"mkdir -p ${REMOTE_DIR}/build && cd ${REMOTE_DIR}/build && cmake .. -DREMOTE_BUILD:BOOL=NO\" 105 | # COMMAND ssh -t ${REMOTE_URL} \"cd ${REMOTE_DIR}/build && make\" 106 | # DEPENDS ${TARGET_NAME} 107 | # WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} 108 | # COMMENT "BUILDING ASSIMPLOADER ... " 109 | #) 110 | # 111 | #ADD_CUSTOM_TARGET(${TARGET_NAME}Build ALL DEPENDS ${TARGET_NAME}Make) 112 | # 113 | #ENDIF(REMOTE_BUILD) 114 | -------------------------------------------------------------------------------- /samples/TrafficJam.xosc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | -------------------------------------------------------------------------------- /src/xodr/xodr.cxx: -------------------------------------------------------------------------------- 1 | // 2 | // opendrive_16_core.cxx 3 | // xsd2cxx- for OpenDrive CXX classes 4 | // 5 | // Created by Javed Shaik on Sat Jul 11 12:40:05 2020 6 | // # AUTO-GENERATED FILE - DO NOT EDIT!! 7 | // -- UUIDv4 : cee7ecd4-d9a0-4773-a2fc-a907ec37b010 -- 8 | // All BUGS are Credited to ME :) - javedulu@gmail.com 9 | // 10 | // 11 | #include "xodr.h" 12 | e_unit::e_unit(pugi::xml_attribute attr) 13 | { 14 | if (isvalid(attr.as_string())) { unitDistance = str2enum(attr.as_string()); } 15 | if (isvalid(attr.as_string())) { unitSpeed = str2enum(attr.as_string()); } 16 | if (isvalid(attr.as_string())) { unitMass = str2enum(attr.as_string()); } 17 | if (isvalid(attr.as_string())) { unitSlope = str2enum(attr.as_string()); } 18 | } 19 | e_countryCode::e_countryCode(pugi::xml_attribute attr) 20 | { 21 | if ( (m_e_countryCode_iso3166alpha2 = attr.as_string()) ) { return ; } // Typedef redirected to read value 22 | if ( (m_e_countryCode_iso3166alpha3_deprecated = attr.as_string()) ) { return ; } // Typedef redirected to read value 23 | if (isvalid(attr.as_string())) { countryCode_deprecated = str2enum(attr.as_string()); } 24 | } 25 | t_maxSpeed::t_maxSpeed(pugi::xml_attribute attr) 26 | { 27 | if ( (m_t_grEqZero = attr.as_double()) ) { return ; } // Typedef redirected to read value 28 | if (isvalid(attr.as_string())) { maxSpeedString = str2enum(attr.as_string()); } 29 | } 30 | t_road_signals_signal_U::t_road_signals_signal_U(pugi::xml_node node) 31 | { 32 | if (strcmp(node.name(),"positionRoad")==0) { m_positionRoad = std::make_shared(node); } 33 | if (strcmp(node.name(),"positionInertial")==0) { m_positionInertial = std::make_shared(node); } 34 | } 35 | t_road_planView_geometry_U::t_road_planView_geometry_U(pugi::xml_node node) 36 | { 37 | if (strcmp(node.name(),"line")==0) { m_line = std::make_shared(node); } 38 | if (strcmp(node.name(),"spiral")==0) { m_spiral = std::make_shared(node); } 39 | if (strcmp(node.name(),"arc")==0) { m_arc = std::make_shared(node); } 40 | if (strcmp(node.name(),"poly3")==0) { m_poly3 = std::make_shared(node); } 41 | if (strcmp(node.name(),"paramPoly3")==0) { m_paramPoly3 = std::make_shared(node); } 42 | } 43 | t_road_objects_object_outlines_outline_U::t_road_objects_object_outlines_outline_U(pugi::xml_node node) 44 | { 45 | for (pugi::xml_node e_cornerRoad : node.children()) 46 | { 47 | if (strcmp(node.name(),"cornerRoad")==0) 48 | { 49 | m_cornerRoads.push_back(std::make_shared(e_cornerRoad)); 50 | } 51 | } 52 | for (pugi::xml_node e_cornerLocal : node.children()) 53 | { 54 | if (strcmp(node.name(),"cornerLocal")==0) 55 | { 56 | m_cornerLocals.push_back(std::make_shared(e_cornerLocal)); 57 | } 58 | } 59 | } 60 | t_road_lanes_laneSection_lr_lane_U::t_road_lanes_laneSection_lr_lane_U(pugi::xml_node node) 61 | { 62 | for (pugi::xml_node e_border : node.children()) 63 | { 64 | if (strcmp(node.name(),"border")==0) 65 | { 66 | m_borders.push_back(std::make_shared(e_border)); 67 | } 68 | } 69 | for (pugi::xml_node e_width : node.children()) 70 | { 71 | if (strcmp(node.name(),"width")==0) 72 | { 73 | m_widths.push_back(std::make_shared(e_width)); 74 | } 75 | } 76 | } 77 | t_dataQuality::t_dataQuality(pugi::xml_node node) 78 | { 79 | if (node.child("error")) { m_error = std::make_shared(node.child("error")); } 80 | if (node.child("rawData")) { m_rawData = std::make_shared(node.child("rawData")); } 81 | } 82 | t_dataQuality_Error::t_dataQuality_Error(pugi::xml_node node) 83 | { 84 | if (node.attribute("xyAbsolute")) { xyAbsolute = node.attribute("xyAbsolute").as_double(); } //required 85 | if (node.attribute("zAbsolute")) { zAbsolute = node.attribute("zAbsolute").as_double(); } //required 86 | if (node.attribute("xyRelative")) { xyRelative = node.attribute("xyRelative").as_double(); } //required 87 | if (node.attribute("zRelative")) { zRelative = node.attribute("zRelative").as_double(); } //required 88 | } 89 | t_dataQuality_RawData::t_dataQuality_RawData(pugi::xml_node node) 90 | { 91 | if (node.attribute("date")) { date = node.attribute("date").as_string(); } //required 92 | if (node.attribute("source")) { source = str2enum(node.attribute("source").as_string()); } // enum 93 | if (node.attribute("sourceComment")) { sourceComment = node.attribute("sourceComment").as_string(); } //optional 94 | if (node.attribute("postProcessing")) { postProcessing = str2enum(node.attribute("postProcessing").as_string()); } // enum 95 | if (node.attribute("postProcessingComment")) { postProcessingComment = node.attribute("postProcessingComment").as_string(); } //optional 96 | } 97 | t_header::t_header(pugi::xml_node node) 98 | { 99 | if (revMajor != node.attribute("revMajor").as_int()) { throw ("revMajor not matching "); } 100 | if (node.attribute("revMinor")) { revMinor = node.attribute("revMinor").as_int(); } //required 101 | if (node.attribute("name")) { name = node.attribute("name").as_string(); } //optional 102 | if (node.attribute("version")) { version = node.attribute("version").as_string(); } //optional 103 | if (node.attribute("date")) { date = node.attribute("date").as_string(); } //optional 104 | if (node.attribute("north")) { north = node.attribute("north").as_double(); } //optional 105 | if (node.attribute("south")) { south = node.attribute("south").as_double(); } //optional 106 | if (node.attribute("east")) { east = node.attribute("east").as_double(); } //optional 107 | if (node.attribute("west")) { west = node.attribute("west").as_double(); } //optional 108 | if (node.attribute("vendor")) { vendor = node.attribute("vendor").as_string(); } //optional 109 | if (node.child("geoReference")) { m_geoReference = std::make_shared(node.child("geoReference")); } 110 | if (node.child("offset")) { m_offset = std::make_shared(node.child("offset")); } 111 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 112 | } 113 | t_header_GeoReference::t_header_GeoReference(pugi::xml_node node) 114 | { 115 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 116 | } 117 | t_header_Offset::t_header_Offset(pugi::xml_node node) 118 | { 119 | if (node.attribute("x")) { x = node.attribute("x").as_double(); } //required 120 | if (node.attribute("y")) { y = node.attribute("y").as_double(); } //required 121 | if (node.attribute("z")) { z = node.attribute("z").as_double(); } //required 122 | if (node.attribute("hdg")) { hdg = node.attribute("hdg").as_float(); } //required 123 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 124 | } 125 | t_include::t_include(pugi::xml_node node) 126 | { 127 | if (node.attribute("file")) { file = node.attribute("file").as_string(); } //required 128 | } 129 | t_userData::t_userData(pugi::xml_node node) 130 | { 131 | if (node.attribute("code")) { code = node.attribute("code").as_string(); } //required 132 | if (node.attribute("value")) { value = node.attribute("value").as_string(); } //optional 133 | } 134 | t_road_railroad::t_road_railroad(pugi::xml_node node) 135 | { 136 | for (pugi::xml_node e_switch = node.child("switch"); e_switch; e_switch= e_switch.next_sibling("switch")) 137 | { 138 | m_switchs.push_back(std::make_shared(e_switch)); 139 | } 140 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 141 | } 142 | t_road_railroad_switch::t_road_railroad_switch(pugi::xml_node node) 143 | { 144 | if (node.attribute("name")) { name = node.attribute("name").as_string(); } //required 145 | if (node.attribute("id")) { id = node.attribute("id").as_string(); } //required 146 | if (node.attribute("position")) { position = str2enum(node.attribute("position").as_string()); } // enum 147 | if (node.child("mainTrack")) { m_mainTrack = std::make_shared(node.child("mainTrack")); } 148 | if (node.child("sideTrack")) { m_sideTrack = std::make_shared(node.child("sideTrack")); } 149 | if (node.child("partner")) { m_partner = std::make_shared(node.child("partner")); } 150 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 151 | } 152 | t_road_railroad_switch_mainTrack::t_road_railroad_switch_mainTrack(pugi::xml_node node) 153 | { 154 | if (node.attribute("id")) { id = node.attribute("id").as_string(); } //required 155 | if (node.attribute("s")) { s = node.attribute("s").as_double(); } //typedef 156 | if (node.attribute("dir")) { dir = str2enum(node.attribute("dir").as_string()); } // enum 157 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 158 | } 159 | t_road_railroad_switch_partner::t_road_railroad_switch_partner(pugi::xml_node node) 160 | { 161 | if (node.attribute("name")) { name = node.attribute("name").as_string(); } //optional 162 | if (node.attribute("id")) { id = node.attribute("id").as_string(); } //required 163 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 164 | } 165 | t_road_railroad_switch_sideTrack::t_road_railroad_switch_sideTrack(pugi::xml_node node) 166 | { 167 | if (node.attribute("id")) { id = node.attribute("id").as_string(); } //required 168 | if (node.attribute("s")) { s = node.attribute("s").as_double(); } //typedef 169 | if (node.attribute("dir")) { dir = str2enum(node.attribute("dir").as_string()); } // enum 170 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 171 | } 172 | t_station::t_station(pugi::xml_node node) 173 | { 174 | if (node.attribute("name")) { name = node.attribute("name").as_string(); } //required 175 | if (node.attribute("id")) { id = node.attribute("id").as_string(); } //required 176 | if (node.attribute("type")) { type = str2enum(node.attribute("type").as_string()); } // enum 177 | for (pugi::xml_node e_platform = node.child("platform"); e_platform; e_platform= e_platform.next_sibling("platform")) 178 | { 179 | m_platforms.push_back(std::make_shared(e_platform)); 180 | } 181 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 182 | } 183 | t_station_platform::t_station_platform(pugi::xml_node node) 184 | { 185 | if (node.attribute("name")) { name = node.attribute("name").as_string(); } //optional 186 | if (node.attribute("id")) { id = node.attribute("id").as_string(); } //required 187 | for (pugi::xml_node e_segment = node.child("segment"); e_segment; e_segment= e_segment.next_sibling("segment")) 188 | { 189 | m_segments.push_back(std::make_shared(e_segment)); 190 | } 191 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 192 | } 193 | t_station_platform_segment::t_station_platform_segment(pugi::xml_node node) 194 | { 195 | if (node.attribute("roadId")) { roadId = node.attribute("roadId").as_string(); } //required 196 | if (node.attribute("sStart")) { sStart = node.attribute("sStart").as_double(); } //typedef 197 | if (node.attribute("sEnd")) { sEnd = node.attribute("sEnd").as_double(); } //typedef 198 | if (node.attribute("side")) { side = str2enum(node.attribute("side").as_string()); } // enum 199 | } 200 | t_junction::t_junction(pugi::xml_node node) 201 | { 202 | if (node.attribute("name")) { name = node.attribute("name").as_string(); } //optional 203 | if (node.attribute("id")) { id = node.attribute("id").as_string(); } //required 204 | if (node.attribute("type")) { type = str2enum(node.attribute("type").as_string()); } // enum 205 | for (pugi::xml_node e_connection = node.child("connection"); e_connection; e_connection= e_connection.next_sibling("connection")) 206 | { 207 | m_connections.push_back(std::make_shared(e_connection)); 208 | } 209 | for (pugi::xml_node e_priority = node.child("priority"); e_priority; e_priority= e_priority.next_sibling("priority")) 210 | { 211 | m_prioritys.push_back(std::make_shared(e_priority)); 212 | } 213 | for (pugi::xml_node e_controller = node.child("controller"); e_controller; e_controller= e_controller.next_sibling("controller")) 214 | { 215 | m_controllers.push_back(std::make_shared(e_controller)); 216 | } 217 | if (node.child("surface")) { m_surface = std::make_shared(node.child("surface")); } 218 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 219 | } 220 | t_junction_connection::t_junction_connection(pugi::xml_node node) 221 | { 222 | if (node.attribute("id")) { id = node.attribute("id").as_string(); } //required 223 | if (node.attribute("type")) { type = str2enum(node.attribute("type").as_string()); } // enum 224 | if (node.attribute("incomingRoad")) { incomingRoad = node.attribute("incomingRoad").as_string(); } //optional 225 | if (node.attribute("connectingRoad")) { connectingRoad = node.attribute("connectingRoad").as_string(); } //optional 226 | if (node.attribute("contactPoint")) { contactPoint = node.attribute("contactPoint").as_string(); } //optional 227 | if (node.child("predecessor")) { m_predecessor = std::make_shared(node.child("predecessor")); } 228 | if (node.child("successor")) { m_successor = std::make_shared(node.child("successor")); } 229 | for (pugi::xml_node e_laneLink = node.child("laneLink"); e_laneLink; e_laneLink= e_laneLink.next_sibling("laneLink")) 230 | { 231 | m_laneLinks.push_back(std::make_shared(e_laneLink)); 232 | } 233 | } 234 | t_junction_connection_laneLink::t_junction_connection_laneLink(pugi::xml_node node) 235 | { 236 | if (node.attribute("from")) { from = node.attribute("from").as_int(); } //required 237 | if (node.attribute("to")) { to = node.attribute("to").as_int(); } //required 238 | } 239 | t_junction_controller::t_junction_controller(pugi::xml_node node) 240 | { 241 | if (node.attribute("id")) { id = node.attribute("id").as_string(); } //required 242 | if (node.attribute("type")) { type = node.attribute("type").as_string(); } //optional 243 | if (node.attribute("sequence")) { sequence = node.attribute("sequence").as_ullong(); } //optional 244 | } 245 | t_junction_predecessorSuccessor::t_junction_predecessorSuccessor(pugi::xml_node node) 246 | { 247 | if (elementType != node.attribute("elementType").as_string()) { throw ("elementType not matching "); } 248 | if (node.attribute("elementId")) { elementId = node.attribute("elementId").as_string(); } //required 249 | if (node.attribute("elementS")) { elementS = node.attribute("elementS").as_double(); } //typedef 250 | if (node.attribute("elementDir")) { elementDir = str2enum(node.attribute("elementDir").as_string()); } // enum 251 | } 252 | t_junction_priority::t_junction_priority(pugi::xml_node node) 253 | { 254 | if (node.attribute("high")) { high = node.attribute("high").as_string(); } //optional 255 | if (node.attribute("low")) { low = node.attribute("low").as_string(); } //optional 256 | } 257 | t_junction_surface::t_junction_surface(pugi::xml_node node) 258 | { 259 | for (pugi::xml_node e_CRG = node.child("CRG"); e_CRG; e_CRG= e_CRG.next_sibling("CRG")) 260 | { 261 | m_CRGs.push_back(std::make_shared(e_CRG)); 262 | } 263 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 264 | } 265 | t_junction_surface_CRG::t_junction_surface_CRG(pugi::xml_node node) 266 | { 267 | if (node.attribute("file")) { file = node.attribute("file").as_string(); } //required 268 | if (mode != str2enum(node.attribute("mode").as_string())) { throw ("mode not matching "); } 269 | if (node.attribute("purpose")) { purpose = str2enum(node.attribute("purpose").as_string()); } // enum 270 | if (node.attribute("zOffset")) { zOffset = node.attribute("zOffset").as_double(); } //optional 271 | if (node.attribute("zScale")) { zScale = node.attribute("zScale").as_double(); } //optional 272 | } 273 | t_junctionGroup::t_junctionGroup(pugi::xml_node node) 274 | { 275 | if (node.attribute("name")) { name = node.attribute("name").as_string(); } //optional 276 | if (node.attribute("id")) { id = node.attribute("id").as_string(); } //required 277 | if (node.attribute("type")) { type = str2enum(node.attribute("type").as_string()); } // enum 278 | for (pugi::xml_node e_junctionReference = node.child("junctionReference"); e_junctionReference; e_junctionReference= e_junctionReference.next_sibling("junctionReference")) 279 | { 280 | m_junctionReferences.push_back(std::make_shared(e_junctionReference)); 281 | } 282 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 283 | } 284 | t_junctionGroup_junctionReference::t_junctionGroup_junctionReference(pugi::xml_node node) 285 | { 286 | if (node.attribute("junction")) { junction = node.attribute("junction").as_string(); } //required 287 | } 288 | t_controller::t_controller(pugi::xml_node node) 289 | { 290 | if (node.attribute("id")) { id = node.attribute("id").as_string(); } //required 291 | if (node.attribute("name")) { name = node.attribute("name").as_string(); } //optional 292 | if (node.attribute("sequence")) { sequence = node.attribute("sequence").as_ullong(); } //optional 293 | for (pugi::xml_node e_control = node.child("control"); e_control; e_control= e_control.next_sibling("control")) 294 | { 295 | m_controls.push_back(std::make_shared(e_control)); 296 | } 297 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 298 | } 299 | t_controller_control::t_controller_control(pugi::xml_node node) 300 | { 301 | if (node.attribute("signalId")) { signalId = node.attribute("signalId").as_string(); } //required 302 | if (node.attribute("type")) { type = node.attribute("type").as_string(); } //optional 303 | } 304 | t_road_signals::t_road_signals(pugi::xml_node node) 305 | { 306 | for (pugi::xml_node e_signal = node.child("signal"); e_signal; e_signal= e_signal.next_sibling("signal")) 307 | { 308 | m_signals.push_back(std::make_shared(e_signal)); 309 | } 310 | for (pugi::xml_node e_signalReference = node.child("signalReference"); e_signalReference; e_signalReference= e_signalReference.next_sibling("signalReference")) 311 | { 312 | m_signalReferences.push_back(std::make_shared(e_signalReference)); 313 | } 314 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 315 | } 316 | t_road_signals_signal::t_road_signals_signal(pugi::xml_node node) 317 | { 318 | if (node.attribute("s")) { s = node.attribute("s").as_double(); } //typedef 319 | if (node.attribute("t")) { t = node.attribute("t").as_double(); } //required 320 | if (node.attribute("id")) { id = node.attribute("id").as_string(); } //required 321 | if (node.attribute("name")) { name = node.attribute("name").as_string(); } //optional 322 | if (node.attribute("dynamic")) { dynamic = str2enum(node.attribute("dynamic").as_string()); } // enum 323 | if (node.attribute("orientation")) { orientation = str2enum(node.attribute("orientation").as_string()); } // enum 324 | if (node.attribute("zOffset")) { zOffset = node.attribute("zOffset").as_double(); } //required 325 | if (node.attribute("country")) { country = e_countryCode(node.attribute("country")); } // TODO: >> union - handle properly 326 | if (node.attribute("countryRevision")) { countryRevision = node.attribute("countryRevision").as_string(); } //optional 327 | if (node.attribute("type")) { type = node.attribute("type").as_string(); } //required 328 | if (node.attribute("subtype")) { subtype = node.attribute("subtype").as_string(); } //required 329 | if (node.attribute("value")) { value = node.attribute("value").as_double(); } //optional 330 | if (node.attribute("unit")) { unit = e_unit(node.attribute("unit")); } // TODO: >> union - handle properly 331 | if (node.attribute("height")) { height = node.attribute("height").as_double(); } //typedef 332 | if (node.attribute("width")) { width = node.attribute("width").as_double(); } //typedef 333 | if (node.attribute("text")) { text = node.attribute("text").as_string(); } //optional 334 | if (node.attribute("hOffset")) { hOffset = node.attribute("hOffset").as_double(); } //optional 335 | if (node.attribute("pitch")) { pitch = node.attribute("pitch").as_double(); } //optional 336 | if (node.attribute("roll")) { roll = node.attribute("roll").as_double(); } //optional 337 | for (pugi::xml_node e_validity = node.child("validity"); e_validity; e_validity= e_validity.next_sibling("validity")) 338 | { 339 | m_validitys.push_back(std::make_shared(e_validity)); 340 | } 341 | for (pugi::xml_node e_dependency = node.child("dependency"); e_dependency; e_dependency= e_dependency.next_sibling("dependency")) 342 | { 343 | m_dependencys.push_back(std::make_shared(e_dependency)); 344 | } 345 | for (pugi::xml_node e_reference = node.child("reference"); e_reference; e_reference= e_reference.next_sibling("reference")) 346 | { 347 | m_references.push_back(std::make_shared(e_reference)); 348 | } 349 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 350 | //t_road_signals_signal_U m_t_road_signals_signal; 351 | if (node.first_child()) { m_t_road_signals_signal = std::make_shared(node.first_child()); } 352 | } 353 | t_road_signals_signal_dependency::t_road_signals_signal_dependency(pugi::xml_node node) 354 | { 355 | if (node.attribute("id")) { id = node.attribute("id").as_string(); } //required 356 | if (node.attribute("type")) { type = node.attribute("type").as_string(); } //optional 357 | } 358 | t_road_signals_signal_positionInertial::t_road_signals_signal_positionInertial(pugi::xml_node node) 359 | { 360 | if (node.attribute("x")) { x = node.attribute("x").as_double(); } //required 361 | if (node.attribute("y")) { y = node.attribute("y").as_double(); } //required 362 | if (node.attribute("z")) { z = node.attribute("z").as_double(); } //required 363 | if (node.attribute("hdg")) { hdg = node.attribute("hdg").as_double(); } //required 364 | if (node.attribute("pitch")) { pitch = node.attribute("pitch").as_double(); } //optional 365 | if (node.attribute("roll")) { roll = node.attribute("roll").as_double(); } //optional 366 | } 367 | t_road_signals_signal_positionRoad::t_road_signals_signal_positionRoad(pugi::xml_node node) 368 | { 369 | if (node.attribute("roadId")) { roadId = node.attribute("roadId").as_string(); } //required 370 | if (node.attribute("s")) { s = node.attribute("s").as_double(); } //typedef 371 | if (node.attribute("t")) { t = node.attribute("t").as_double(); } //required 372 | if (node.attribute("zOffset")) { zOffset = node.attribute("zOffset").as_double(); } //required 373 | if (node.attribute("hOffset")) { hOffset = node.attribute("hOffset").as_double(); } //required 374 | if (node.attribute("pitch")) { pitch = node.attribute("pitch").as_double(); } //optional 375 | if (node.attribute("roll")) { roll = node.attribute("roll").as_double(); } //optional 376 | } 377 | t_road_signals_signal_reference::t_road_signals_signal_reference(pugi::xml_node node) 378 | { 379 | if (node.attribute("elementType")) { elementType = str2enum(node.attribute("elementType").as_string()); } // enum 380 | if (node.attribute("elementId")) { elementId = node.attribute("elementId").as_string(); } //required 381 | if (node.attribute("type")) { type = node.attribute("type").as_string(); } //optional 382 | } 383 | t_road_signals_signalReference::t_road_signals_signalReference(pugi::xml_node node) 384 | { 385 | if (node.attribute("s")) { s = node.attribute("s").as_double(); } //typedef 386 | if (node.attribute("t")) { t = node.attribute("t").as_double(); } //required 387 | if (node.attribute("id")) { id = node.attribute("id").as_string(); } //required 388 | if (node.attribute("orientation")) { orientation = str2enum(node.attribute("orientation").as_string()); } // enum 389 | for (pugi::xml_node e_validity = node.child("validity"); e_validity; e_validity= e_validity.next_sibling("validity")) 390 | { 391 | m_validitys.push_back(std::make_shared(e_validity)); 392 | } 393 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 394 | } 395 | t_road::t_road(pugi::xml_node node) 396 | { 397 | if (node.attribute("name")) { name = node.attribute("name").as_string(); } //optional 398 | if (node.attribute("length")) { length = node.attribute("length").as_string(); } //required 399 | if (node.attribute("id")) { id = node.attribute("id").as_string(); } //required 400 | if (node.attribute("junction")) { junction = node.attribute("junction").as_string(); } //required 401 | if (node.attribute("rule")) { rule = str2enum(node.attribute("rule").as_string()); } // enum 402 | if (node.child("link")) { m_link = std::make_shared(node.child("link")); } 403 | for (pugi::xml_node e_type = node.child("type"); e_type; e_type= e_type.next_sibling("type")) 404 | { 405 | m_types.push_back(std::make_shared(e_type)); 406 | } 407 | if (node.child("planView")) { m_planView = std::make_shared(node.child("planView")); } 408 | if (node.child("elevationProfile")) { m_elevationProfile = std::make_shared(node.child("elevationProfile")); } 409 | if (node.child("lateralProfile")) { m_lateralProfile = std::make_shared(node.child("lateralProfile")); } 410 | if (node.child("lanes")) { m_lanes = std::make_shared(node.child("lanes")); } 411 | if (node.child("objects")) { m_objects = std::make_shared(node.child("objects")); } 412 | if (node.child("signals")) { m_signals = std::make_shared(node.child("signals")); } 413 | if (node.child("surface")) { m_surface = std::make_shared(node.child("surface")); } 414 | if (node.child("railroad")) { m_railroad = std::make_shared(node.child("railroad")); } 415 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 416 | } 417 | t_road_elevationProfile::t_road_elevationProfile(pugi::xml_node node) 418 | { 419 | for (pugi::xml_node e_elevation = node.child("elevation"); e_elevation; e_elevation= e_elevation.next_sibling("elevation")) 420 | { 421 | m_elevations.push_back(std::make_shared(e_elevation)); 422 | } 423 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 424 | } 425 | t_road_elevationProfile_elevation::t_road_elevationProfile_elevation(pugi::xml_node node) 426 | { 427 | if (node.attribute("s")) { s = node.attribute("s").as_double(); } //typedef 428 | if (node.attribute("a")) { a = node.attribute("a").as_double(); } //required 429 | if (node.attribute("b")) { b = node.attribute("b").as_double(); } //required 430 | if (node.attribute("c")) { c = node.attribute("c").as_double(); } //required 431 | if (node.attribute("d")) { d = node.attribute("d").as_double(); } //required 432 | } 433 | t_road_lateralProfile::t_road_lateralProfile(pugi::xml_node node) 434 | { 435 | for (pugi::xml_node e_superelevation = node.child("superelevation"); e_superelevation; e_superelevation= e_superelevation.next_sibling("superelevation")) 436 | { 437 | m_superelevations.push_back(std::make_shared(e_superelevation)); 438 | } 439 | for (pugi::xml_node e_shape = node.child("shape"); e_shape; e_shape= e_shape.next_sibling("shape")) 440 | { 441 | m_shapes.push_back(std::make_shared(e_shape)); 442 | } 443 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 444 | } 445 | t_road_lateralProfile_shape::t_road_lateralProfile_shape(pugi::xml_node node) 446 | { 447 | if (node.attribute("s")) { s = node.attribute("s").as_double(); } //typedef 448 | if (node.attribute("t")) { t = node.attribute("t").as_double(); } //required 449 | if (node.attribute("a")) { a = node.attribute("a").as_double(); } //required 450 | if (node.attribute("b")) { b = node.attribute("b").as_double(); } //required 451 | if (node.attribute("c")) { c = node.attribute("c").as_double(); } //required 452 | if (node.attribute("d")) { d = node.attribute("d").as_double(); } //required 453 | } 454 | t_road_lateralProfile_superelevation::t_road_lateralProfile_superelevation(pugi::xml_node node) 455 | { 456 | if (node.attribute("s")) { s = node.attribute("s").as_double(); } //typedef 457 | if (node.attribute("a")) { a = node.attribute("a").as_double(); } //required 458 | if (node.attribute("b")) { b = node.attribute("b").as_double(); } //required 459 | if (node.attribute("c")) { c = node.attribute("c").as_double(); } //required 460 | if (node.attribute("d")) { d = node.attribute("d").as_double(); } //required 461 | } 462 | t_road_link::t_road_link(pugi::xml_node node) 463 | { 464 | if (node.child("predecessor")) { m_predecessor = std::make_shared(node.child("predecessor")); } 465 | if (node.child("successor")) { m_successor = std::make_shared(node.child("successor")); } 466 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 467 | } 468 | t_road_link_predecessorSuccessor::t_road_link_predecessorSuccessor(pugi::xml_node node) 469 | { 470 | if (node.attribute("elementId")) { elementId = node.attribute("elementId").as_string(); } //required 471 | if (node.attribute("elementType")) { elementType = node.attribute("elementType").as_string(); } //optional 472 | if (node.attribute("contactPoint")) { contactPoint = node.attribute("contactPoint").as_string(); } //optional 473 | if (node.attribute("elementS")) { elementS = node.attribute("elementS").as_double(); } //typedef 474 | if (node.attribute("elementDir")) { elementDir = node.attribute("elementDir").as_string(); } //optional 475 | } 476 | t_road_planView::t_road_planView(pugi::xml_node node) 477 | { 478 | for (pugi::xml_node e_geometry = node.child("geometry"); e_geometry; e_geometry= e_geometry.next_sibling("geometry")) 479 | { 480 | m_geometrys.push_back(std::make_shared(e_geometry)); 481 | } 482 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 483 | } 484 | t_road_planView_geometry::t_road_planView_geometry(pugi::xml_node node) 485 | { 486 | if (node.attribute("s")) { s = node.attribute("s").as_double(); } //typedef 487 | if (node.attribute("x")) { x = node.attribute("x").as_double(); } //required 488 | if (node.attribute("y")) { y = node.attribute("y").as_double(); } //required 489 | if (node.attribute("hdg")) { hdg = node.attribute("hdg").as_double(); } //required 490 | if (node.attribute("length")) { length = node.attribute("length").as_string(); } //required 491 | //t_road_planView_geometry_U m_t_road_planView_geometry; 492 | if (node.first_child()) { m_t_road_planView_geometry = std::make_shared(node.first_child()); } 493 | } 494 | t_road_planView_geometry_arc::t_road_planView_geometry_arc(pugi::xml_node node) 495 | { 496 | if (node.attribute("curvature")) { curvature = node.attribute("curvature").as_double(); } //required 497 | } 498 | t_road_planView_geometry_line::t_road_planView_geometry_line(pugi::xml_node node) 499 | { 500 | } 501 | t_road_planView_geometry_paramPoly3::t_road_planView_geometry_paramPoly3(pugi::xml_node node) 502 | { 503 | if (node.attribute("aU")) { aU = node.attribute("aU").as_double(); } //required 504 | if (node.attribute("bU")) { bU = node.attribute("bU").as_double(); } //required 505 | if (node.attribute("cU")) { cU = node.attribute("cU").as_double(); } //required 506 | if (node.attribute("dU")) { dU = node.attribute("dU").as_double(); } //required 507 | if (node.attribute("aV")) { aV = node.attribute("aV").as_double(); } //required 508 | if (node.attribute("bV")) { bV = node.attribute("bV").as_double(); } //required 509 | if (node.attribute("cV")) { cV = node.attribute("cV").as_double(); } //required 510 | if (node.attribute("dV")) { dV = node.attribute("dV").as_double(); } //required 511 | if (node.attribute("pRange")) { pRange = str2enum(node.attribute("pRange").as_string()); } // enum 512 | } 513 | t_road_planView_geometry_poly3::t_road_planView_geometry_poly3(pugi::xml_node node) 514 | { 515 | if (node.attribute("a")) { a = node.attribute("a").as_double(); } //required 516 | if (node.attribute("b")) { b = node.attribute("b").as_double(); } //required 517 | if (node.attribute("c")) { c = node.attribute("c").as_double(); } //required 518 | if (node.attribute("d")) { d = node.attribute("d").as_double(); } //required 519 | } 520 | t_road_planView_geometry_spiral::t_road_planView_geometry_spiral(pugi::xml_node node) 521 | { 522 | if (node.attribute("curvStart")) { curvStart = node.attribute("curvStart").as_double(); } //required 523 | if (node.attribute("curvEnd")) { curvEnd = node.attribute("curvEnd").as_double(); } //required 524 | } 525 | t_road_surface::t_road_surface(pugi::xml_node node) 526 | { 527 | for (pugi::xml_node e_CRG = node.child("CRG"); e_CRG; e_CRG= e_CRG.next_sibling("CRG")) 528 | { 529 | m_CRGs.push_back(std::make_shared(e_CRG)); 530 | } 531 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 532 | } 533 | t_road_surface_CRG::t_road_surface_CRG(pugi::xml_node node) 534 | { 535 | if (node.attribute("file")) { file = node.attribute("file").as_string(); } //required 536 | if (node.attribute("sStart")) { sStart = node.attribute("sStart").as_double(); } //typedef 537 | if (node.attribute("sEnd")) { sEnd = node.attribute("sEnd").as_double(); } //typedef 538 | if (node.attribute("orientation")) { orientation = str2enum(node.attribute("orientation").as_string()); } // enum 539 | if (node.attribute("mode")) { mode = str2enum(node.attribute("mode").as_string()); } // enum 540 | if (node.attribute("purpose")) { purpose = str2enum(node.attribute("purpose").as_string()); } // enum 541 | if (node.attribute("sOffset")) { sOffset = node.attribute("sOffset").as_double(); } //optional 542 | if (node.attribute("tOffset")) { tOffset = node.attribute("tOffset").as_double(); } //optional 543 | if (node.attribute("zOffset")) { zOffset = node.attribute("zOffset").as_double(); } //optional 544 | if (node.attribute("zScale")) { zScale = node.attribute("zScale").as_double(); } //optional 545 | if (node.attribute("hOffset")) { hOffset = node.attribute("hOffset").as_double(); } //optional 546 | } 547 | t_road_type::t_road_type(pugi::xml_node node) 548 | { 549 | if (node.attribute("s")) { s = node.attribute("s").as_double(); } //typedef 550 | if (node.attribute("type")) { type = str2enum(node.attribute("type").as_string()); } // enum 551 | if (node.attribute("country")) { country = e_countryCode(node.attribute("country")); } // TODO: >> union - handle properly 552 | if (node.child("speed")) { m_speed = std::make_shared(node.child("speed")); } 553 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 554 | } 555 | t_road_type_speed::t_road_type_speed(pugi::xml_node node) 556 | { 557 | if (node.attribute("max")) { max = t_maxSpeed(node.attribute("max")); } // TODO: >> union - handle properly 558 | if (node.attribute("unit")) { unit = str2enum(node.attribute("unit").as_string()); } // enum 559 | } 560 | t_road_objects::t_road_objects(pugi::xml_node node) 561 | { 562 | for (pugi::xml_node e_object = node.child("object"); e_object; e_object= e_object.next_sibling("object")) 563 | { 564 | m_objects.push_back(std::make_shared(e_object)); 565 | } 566 | for (pugi::xml_node e_objectReference = node.child("objectReference"); e_objectReference; e_objectReference= e_objectReference.next_sibling("objectReference")) 567 | { 568 | m_objectReferences.push_back(std::make_shared(e_objectReference)); 569 | } 570 | for (pugi::xml_node e_tunnel = node.child("tunnel"); e_tunnel; e_tunnel= e_tunnel.next_sibling("tunnel")) 571 | { 572 | m_tunnels.push_back(std::make_shared(e_tunnel)); 573 | } 574 | for (pugi::xml_node e_bridge = node.child("bridge"); e_bridge; e_bridge= e_bridge.next_sibling("bridge")) 575 | { 576 | m_bridges.push_back(std::make_shared(e_bridge)); 577 | } 578 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 579 | } 580 | t_road_objects_bridge::t_road_objects_bridge(pugi::xml_node node) 581 | { 582 | if (node.attribute("s")) { s = node.attribute("s").as_double(); } //typedef 583 | if (node.attribute("length")) { length = node.attribute("length").as_double(); } //typedef 584 | if (node.attribute("name")) { name = node.attribute("name").as_string(); } //optional 585 | if (node.attribute("id")) { id = node.attribute("id").as_string(); } //required 586 | if (node.attribute("type")) { type = str2enum(node.attribute("type").as_string()); } // enum 587 | for (pugi::xml_node e_validity = node.child("validity"); e_validity; e_validity= e_validity.next_sibling("validity")) 588 | { 589 | m_validitys.push_back(std::make_shared(e_validity)); 590 | } 591 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 592 | } 593 | t_road_objects_object::t_road_objects_object(pugi::xml_node node) 594 | { 595 | if (node.attribute("t")) { t = node.attribute("t").as_double(); } //required 596 | if (node.attribute("zOffset")) { zOffset = node.attribute("zOffset").as_double(); } //required 597 | if (node.attribute("type")) { type = str2enum(node.attribute("type").as_string()); } // enum 598 | if (node.attribute("validLength")) { validLength = node.attribute("validLength").as_double(); } //typedef 599 | if (node.attribute("orientation")) { orientation = str2enum(node.attribute("orientation").as_string()); } // enum 600 | if (node.attribute("subtype")) { subtype = node.attribute("subtype").as_string(); } //optional 601 | if (node.attribute("dynamic")) { dynamic = str2enum(node.attribute("dynamic").as_string()); } // enum 602 | if (node.attribute("hdg")) { hdg = node.attribute("hdg").as_double(); } //optional 603 | if (node.attribute("name")) { name = node.attribute("name").as_string(); } //optional 604 | if (node.attribute("pitch")) { pitch = node.attribute("pitch").as_double(); } //optional 605 | if (node.attribute("id")) { id = node.attribute("id").as_string(); } //required 606 | if (node.attribute("roll")) { roll = node.attribute("roll").as_double(); } //optional 607 | if (node.attribute("height")) { height = node.attribute("height").as_double(); } //optional 608 | if (node.attribute("s")) { s = node.attribute("s").as_double(); } //typedef 609 | if (node.attribute("length")) { length = node.attribute("length").as_double(); } //optional 610 | if (node.attribute("width")) { width = node.attribute("width").as_double(); } //optional 611 | if (node.attribute("radius")) { radius = node.attribute("radius").as_double(); } //optional 612 | for (pugi::xml_node e_repeat = node.child("repeat"); e_repeat; e_repeat= e_repeat.next_sibling("repeat")) 613 | { 614 | m_repeats.push_back(std::make_shared(e_repeat)); 615 | } 616 | if (node.child("outline")) { m_outline = std::make_shared(node.child("outline")); } 617 | if (node.child("outlines")) { m_outlines = std::make_shared(node.child("outlines")); } 618 | for (pugi::xml_node e_material = node.child("material"); e_material; e_material= e_material.next_sibling("material")) 619 | { 620 | m_materials.push_back(std::make_shared(e_material)); 621 | } 622 | for (pugi::xml_node e_validity = node.child("validity"); e_validity; e_validity= e_validity.next_sibling("validity")) 623 | { 624 | m_validitys.push_back(std::make_shared(e_validity)); 625 | } 626 | if (node.child("parkingSpace")) { m_parkingSpace = std::make_shared(node.child("parkingSpace")); } 627 | if (node.child("markings")) { m_markings = std::make_shared(node.child("markings")); } 628 | if (node.child("borders")) { m_borders = std::make_shared(node.child("borders")); } 629 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 630 | } 631 | t_road_objects_object_borders::t_road_objects_object_borders(pugi::xml_node node) 632 | { 633 | for (pugi::xml_node e_border = node.child("border"); e_border; e_border= e_border.next_sibling("border")) 634 | { 635 | m_borders.push_back(std::make_shared(e_border)); 636 | } 637 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 638 | } 639 | t_road_objects_object_borders_border::t_road_objects_object_borders_border(pugi::xml_node node) 640 | { 641 | if (node.attribute("width")) { width = node.attribute("width").as_double(); } //typedef 642 | if (node.attribute("type")) { type = str2enum(node.attribute("type").as_string()); } // enum 643 | if (node.attribute("outlineId")) { outlineId = node.attribute("outlineId").as_ullong(); } //required 644 | if (node.attribute("useCompleteOutline")) { useCompleteOutline = str2enum(node.attribute("useCompleteOutline").as_string()); } // enum 645 | for (pugi::xml_node e_cornerReference = node.child("cornerReference"); e_cornerReference; e_cornerReference= e_cornerReference.next_sibling("cornerReference")) 646 | { 647 | m_cornerReferences.push_back(std::make_shared(e_cornerReference)); 648 | } 649 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 650 | } 651 | t_road_objects_object_markings::t_road_objects_object_markings(pugi::xml_node node) 652 | { 653 | for (pugi::xml_node e_marking = node.child("marking"); e_marking; e_marking= e_marking.next_sibling("marking")) 654 | { 655 | m_markings.push_back(std::make_shared(e_marking)); 656 | } 657 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 658 | } 659 | t_road_objects_object_markings_marking::t_road_objects_object_markings_marking(pugi::xml_node node) 660 | { 661 | if (node.attribute("side")) { side = str2enum(node.attribute("side").as_string()); } // enum 662 | if (node.attribute("weight")) { weight = str2enum(node.attribute("weight").as_string()); } // enum 663 | if (node.attribute("width")) { width = node.attribute("width").as_string(); } //optional 664 | if (node.attribute("color")) { color = str2enum(node.attribute("color").as_string()); } // enum 665 | if (node.attribute("zOffset")) { zOffset = node.attribute("zOffset").as_double(); } //typedef 666 | if (node.attribute("spaceLength")) { spaceLength = node.attribute("spaceLength").as_double(); } //typedef 667 | if (node.attribute("lineLength")) { lineLength = node.attribute("lineLength").as_string(); } //required 668 | if (node.attribute("startOffset")) { startOffset = node.attribute("startOffset").as_double(); } //required 669 | if (node.attribute("stopOffset")) { stopOffset = node.attribute("stopOffset").as_double(); } //required 670 | for (pugi::xml_node e_cornerReference = node.child("cornerReference"); e_cornerReference; e_cornerReference= e_cornerReference.next_sibling("cornerReference")) 671 | { 672 | m_cornerReferences.push_back(std::make_shared(e_cornerReference)); 673 | } 674 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 675 | } 676 | t_road_objects_object_markings_marking_cornerReference::t_road_objects_object_markings_marking_cornerReference(pugi::xml_node node) 677 | { 678 | if (node.attribute("id")) { id = node.attribute("id").as_ullong(); } //required 679 | } 680 | t_road_objects_object_material::t_road_objects_object_material(pugi::xml_node node) 681 | { 682 | if (node.attribute("surface")) { surface = node.attribute("surface").as_string(); } //optional 683 | if (node.attribute("friction")) { friction = node.attribute("friction").as_double(); } //typedef 684 | if (node.attribute("roughness")) { roughness = node.attribute("roughness").as_double(); } //typedef 685 | } 686 | t_road_objects_object_outlines::t_road_objects_object_outlines(pugi::xml_node node) 687 | { 688 | for (pugi::xml_node e_outline = node.child("outline"); e_outline; e_outline= e_outline.next_sibling("outline")) 689 | { 690 | m_outlines.push_back(std::make_shared(e_outline)); 691 | } 692 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 693 | } 694 | t_road_objects_object_outlines_outline::t_road_objects_object_outlines_outline(pugi::xml_node node) 695 | { 696 | if (node.attribute("id")) { id = node.attribute("id").as_ullong(); } //optional 697 | if (node.attribute("fillType")) { fillType = str2enum(node.attribute("fillType").as_string()); } // enum 698 | if (node.attribute("outer")) { outer = str2enum(node.attribute("outer").as_string()); } // enum 699 | if (node.attribute("closed")) { closed = str2enum(node.attribute("closed").as_string()); } // enum 700 | if (node.attribute("laneType")) { laneType = str2enum(node.attribute("laneType").as_string()); } // enum 701 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 702 | //t_road_objects_object_outlines_outline_U m_t_road_objects_object_outlines_outline; 703 | if (node.first_child()) { m_t_road_objects_object_outlines_outline = std::make_shared(node.first_child()); } 704 | } 705 | t_road_objects_object_outlines_outline_cornerLocal::t_road_objects_object_outlines_outline_cornerLocal(pugi::xml_node node) 706 | { 707 | if (node.attribute("u")) { u = node.attribute("u").as_double(); } //required 708 | if (node.attribute("v")) { v = node.attribute("v").as_double(); } //required 709 | if (node.attribute("z")) { z = node.attribute("z").as_double(); } //required 710 | if (node.attribute("height")) { height = node.attribute("height").as_double(); } //required 711 | if (node.attribute("id")) { id = node.attribute("id").as_ullong(); } //optional 712 | } 713 | t_road_objects_object_outlines_outline_cornerRoad::t_road_objects_object_outlines_outline_cornerRoad(pugi::xml_node node) 714 | { 715 | if (node.attribute("s")) { s = node.attribute("s").as_double(); } //typedef 716 | if (node.attribute("t")) { t = node.attribute("t").as_double(); } //required 717 | if (node.attribute("dz")) { dz = node.attribute("dz").as_double(); } //required 718 | if (node.attribute("height")) { height = node.attribute("height").as_double(); } //required 719 | if (node.attribute("id")) { id = node.attribute("id").as_ullong(); } //optional 720 | } 721 | t_road_objects_object_parkingSpace::t_road_objects_object_parkingSpace(pugi::xml_node node) 722 | { 723 | if (node.attribute("access")) { access = str2enum(node.attribute("access").as_string()); } // enum 724 | if (node.attribute("restrictions")) { restrictions = node.attribute("restrictions").as_string(); } //optional 725 | } 726 | t_road_objects_object_repeat::t_road_objects_object_repeat(pugi::xml_node node) 727 | { 728 | if (node.attribute("s")) { s = node.attribute("s").as_double(); } //typedef 729 | if (node.attribute("length")) { length = node.attribute("length").as_double(); } //typedef 730 | if (node.attribute("distance")) { distance = node.attribute("distance").as_double(); } //typedef 731 | if (node.attribute("tStart")) { tStart = node.attribute("tStart").as_double(); } //required 732 | if (node.attribute("tEnd")) { tEnd = node.attribute("tEnd").as_double(); } //required 733 | if (node.attribute("heightStart")) { heightStart = node.attribute("heightStart").as_double(); } //required 734 | if (node.attribute("heightEnd")) { heightEnd = node.attribute("heightEnd").as_double(); } //required 735 | if (node.attribute("zOffsetStart")) { zOffsetStart = node.attribute("zOffsetStart").as_double(); } //required 736 | if (node.attribute("zOffsetEnd")) { zOffsetEnd = node.attribute("zOffsetEnd").as_double(); } //required 737 | if (node.attribute("widthStart")) { widthStart = node.attribute("widthStart").as_double(); } //typedef 738 | if (node.attribute("widthEnd")) { widthEnd = node.attribute("widthEnd").as_double(); } //typedef 739 | if (node.attribute("lengthStart")) { lengthStart = node.attribute("lengthStart").as_double(); } //typedef 740 | if (node.attribute("lengthEnd")) { lengthEnd = node.attribute("lengthEnd").as_double(); } //typedef 741 | if (node.attribute("radiusStart")) { radiusStart = node.attribute("radiusStart").as_double(); } //typedef 742 | if (node.attribute("radiusEnd")) { radiusEnd = node.attribute("radiusEnd").as_double(); } //typedef 743 | } 744 | t_road_objects_objectReference::t_road_objects_objectReference(pugi::xml_node node) 745 | { 746 | if (node.attribute("s")) { s = node.attribute("s").as_double(); } //typedef 747 | if (node.attribute("t")) { t = node.attribute("t").as_double(); } //required 748 | if (node.attribute("id")) { id = node.attribute("id").as_string(); } //required 749 | if (node.attribute("zOffset")) { zOffset = node.attribute("zOffset").as_double(); } //optional 750 | if (node.attribute("validLength")) { validLength = node.attribute("validLength").as_double(); } //typedef 751 | if (node.attribute("orientation")) { orientation = str2enum(node.attribute("orientation").as_string()); } // enum 752 | for (pugi::xml_node e_validity = node.child("validity"); e_validity; e_validity= e_validity.next_sibling("validity")) 753 | { 754 | m_validitys.push_back(std::make_shared(e_validity)); 755 | } 756 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 757 | } 758 | t_road_objects_tunnel::t_road_objects_tunnel(pugi::xml_node node) 759 | { 760 | if (node.attribute("s")) { s = node.attribute("s").as_double(); } //typedef 761 | if (node.attribute("length")) { length = node.attribute("length").as_double(); } //typedef 762 | if (node.attribute("name")) { name = node.attribute("name").as_string(); } //optional 763 | if (node.attribute("id")) { id = node.attribute("id").as_string(); } //required 764 | if (node.attribute("type")) { type = str2enum(node.attribute("type").as_string()); } // enum 765 | if (node.attribute("lighting")) { lighting = node.attribute("lighting").as_double(); } //typedef 766 | if (node.attribute("daylight")) { daylight = node.attribute("daylight").as_double(); } //typedef 767 | for (pugi::xml_node e_validity = node.child("validity"); e_validity; e_validity= e_validity.next_sibling("validity")) 768 | { 769 | m_validitys.push_back(std::make_shared(e_validity)); 770 | } 771 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 772 | } 773 | t_road_lanes::t_road_lanes(pugi::xml_node node) 774 | { 775 | for (pugi::xml_node e_laneOffset = node.child("laneOffset"); e_laneOffset; e_laneOffset= e_laneOffset.next_sibling("laneOffset")) 776 | { 777 | m_laneOffsets.push_back(std::make_shared(e_laneOffset)); 778 | } 779 | for (pugi::xml_node e_laneSection = node.child("laneSection"); e_laneSection; e_laneSection= e_laneSection.next_sibling("laneSection")) 780 | { 781 | m_laneSections.push_back(std::make_shared(e_laneSection)); 782 | } 783 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 784 | } 785 | t_road_lanes_laneOffset::t_road_lanes_laneOffset(pugi::xml_node node) 786 | { 787 | if (node.attribute("s")) { s = node.attribute("s").as_double(); } //typedef 788 | if (node.attribute("a")) { a = node.attribute("a").as_double(); } //required 789 | if (node.attribute("b")) { b = node.attribute("b").as_double(); } //required 790 | if (node.attribute("c")) { c = node.attribute("c").as_double(); } //required 791 | if (node.attribute("d")) { d = node.attribute("d").as_double(); } //required 792 | } 793 | t_road_lanes_laneSection::t_road_lanes_laneSection(pugi::xml_node node) 794 | { 795 | if (node.attribute("s")) { s = node.attribute("s").as_double(); } //typedef 796 | if (node.attribute("singleSide")) { singleSide = str2enum(node.attribute("singleSide").as_string()); } // enum 797 | if (node.child("left")) { m_left = std::make_shared(node.child("left")); } 798 | if (node.child("center")) { m_center = std::make_shared(node.child("center")); } 799 | if (node.child("right")) { m_right = std::make_shared(node.child("right")); } 800 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 801 | } 802 | t_road_lanes_laneSection_center::t_road_lanes_laneSection_center(pugi::xml_node node) 803 | { 804 | for (pugi::xml_node e_lane = node.child("lane"); e_lane; e_lane= e_lane.next_sibling("lane")) 805 | { 806 | m_lanes.push_back(std::make_shared(e_lane)); 807 | } 808 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 809 | } 810 | t_road_lanes_laneSection_lr_lane::t_road_lanes_laneSection_lr_lane(pugi::xml_node node) 811 | { 812 | if (node.attribute("type")) { type = str2enum(node.attribute("type").as_string()); } // enum 813 | if (node.attribute("level")) { level = str2enum(node.attribute("level").as_string()); } // enum 814 | if (node.child("link")) { m_link = std::make_shared(node.child("link")); } 815 | for (pugi::xml_node e_roadMark = node.child("roadMark"); e_roadMark; e_roadMark= e_roadMark.next_sibling("roadMark")) 816 | { 817 | m_roadMarks.push_back(std::make_shared(e_roadMark)); 818 | } 819 | for (pugi::xml_node e_material = node.child("material"); e_material; e_material= e_material.next_sibling("material")) 820 | { 821 | m_materials.push_back(std::make_shared(e_material)); 822 | } 823 | for (pugi::xml_node e_speed = node.child("speed"); e_speed; e_speed= e_speed.next_sibling("speed")) 824 | { 825 | m_speeds.push_back(std::make_shared(e_speed)); 826 | } 827 | for (pugi::xml_node e_access = node.child("access"); e_access; e_access= e_access.next_sibling("access")) 828 | { 829 | m_accesss.push_back(std::make_shared(e_access)); 830 | } 831 | for (pugi::xml_node e_height = node.child("height"); e_height; e_height= e_height.next_sibling("height")) 832 | { 833 | m_heights.push_back(std::make_shared(e_height)); 834 | } 835 | for (pugi::xml_node e_rule = node.child("rule"); e_rule; e_rule= e_rule.next_sibling("rule")) 836 | { 837 | m_rules.push_back(std::make_shared(e_rule)); 838 | } 839 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 840 | //std::vector m_t_road_lanes_laneSection_lr_lane; 841 | for (pugi::xml_node e_t_road_lanes_laneSection_lr_lane : node.children()) 842 | { 843 | m_t_road_lanes_laneSection_lr_lanes.push_back(std::make_shared(e_t_road_lanes_laneSection_lr_lane)); 844 | } 845 | } 846 | t_road_lanes_laneSection_center_lane::t_road_lanes_laneSection_center_lane(pugi::xml_node node) 847 | { 848 | if (id != node.attribute("id").as_int()) { throw ("id not matching "); } 849 | } 850 | t_road_lanes_laneSection_lcr_lane_link::t_road_lanes_laneSection_lcr_lane_link(pugi::xml_node node) 851 | { 852 | for (pugi::xml_node e_predecessor = node.child("predecessor"); e_predecessor; e_predecessor= e_predecessor.next_sibling("predecessor")) 853 | { 854 | m_predecessors.push_back(std::make_shared(e_predecessor)); 855 | } 856 | for (pugi::xml_node e_successor = node.child("successor"); e_successor; e_successor= e_successor.next_sibling("successor")) 857 | { 858 | m_successors.push_back(std::make_shared(e_successor)); 859 | } 860 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 861 | } 862 | t_road_lanes_laneSection_lcr_lane_link_predecessorSuccessor::t_road_lanes_laneSection_lcr_lane_link_predecessorSuccessor(pugi::xml_node node) 863 | { 864 | if (node.attribute("id")) { id = node.attribute("id").as_int(); } //required 865 | } 866 | t_road_lanes_laneSection_lcr_lane_roadMark::t_road_lanes_laneSection_lcr_lane_roadMark(pugi::xml_node node) 867 | { 868 | if (node.attribute("sOffset")) { sOffset = node.attribute("sOffset").as_double(); } //typedef 869 | if (node.attribute("type")) { type = str2enum(node.attribute("type").as_string()); } // enum 870 | if (node.attribute("weight")) { weight = str2enum(node.attribute("weight").as_string()); } // enum 871 | if (node.attribute("color")) { color = str2enum(node.attribute("color").as_string()); } // enum 872 | if (node.attribute("material")) { material = node.attribute("material").as_string(); } //optional 873 | if (node.attribute("width")) { width = node.attribute("width").as_double(); } //typedef 874 | if (node.attribute("laneChange")) { laneChange = str2enum(node.attribute("laneChange").as_string()); } // enum 875 | if (node.attribute("height")) { height = node.attribute("height").as_double(); } //optional 876 | for (pugi::xml_node e_sway = node.child("sway"); e_sway; e_sway= e_sway.next_sibling("sway")) 877 | { 878 | m_sways.push_back(std::make_shared(e_sway)); 879 | } 880 | if (node.child("type")) { m_type = std::make_shared(node.child("type")); } 881 | if (node.child("explicit")) { m_explicit = std::make_shared(node.child("explicit")); } 882 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 883 | } 884 | t_road_lanes_laneSection_lcr_lane_roadMark_explicit::t_road_lanes_laneSection_lcr_lane_roadMark_explicit(pugi::xml_node node) 885 | { 886 | for (pugi::xml_node e_line = node.child("line"); e_line; e_line= e_line.next_sibling("line")) 887 | { 888 | m_lines.push_back(std::make_shared(e_line)); 889 | } 890 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 891 | } 892 | t_road_lanes_laneSection_lcr_lane_roadMark_explicit_line::t_road_lanes_laneSection_lcr_lane_roadMark_explicit_line(pugi::xml_node node) 893 | { 894 | if (node.attribute("length")) { length = node.attribute("length").as_string(); } //required 895 | if (node.attribute("tOffset")) { tOffset = node.attribute("tOffset").as_double(); } //required 896 | if (node.attribute("sOffset")) { sOffset = node.attribute("sOffset").as_double(); } //typedef 897 | if (node.attribute("rule")) { rule = str2enum(node.attribute("rule").as_string()); } // enum 898 | if (node.attribute("width")) { width = node.attribute("width").as_string(); } //optional 899 | } 900 | t_road_lanes_laneSection_lcr_lane_roadMark_sway::t_road_lanes_laneSection_lcr_lane_roadMark_sway(pugi::xml_node node) 901 | { 902 | if (node.attribute("ds")) { ds = node.attribute("ds").as_double(); } //typedef 903 | if (node.attribute("a")) { a = node.attribute("a").as_double(); } //required 904 | if (node.attribute("b")) { b = node.attribute("b").as_double(); } //required 905 | if (node.attribute("c")) { c = node.attribute("c").as_double(); } //required 906 | if (node.attribute("d")) { d = node.attribute("d").as_double(); } //required 907 | } 908 | t_road_lanes_laneSection_lcr_lane_roadMark_type::t_road_lanes_laneSection_lcr_lane_roadMark_type(pugi::xml_node node) 909 | { 910 | if (node.attribute("name")) { name = node.attribute("name").as_string(); } //required 911 | if (node.attribute("width")) { width = node.attribute("width").as_double(); } //typedef 912 | for (pugi::xml_node e_line = node.child("line"); e_line; e_line= e_line.next_sibling("line")) 913 | { 914 | m_lines.push_back(std::make_shared(e_line)); 915 | } 916 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 917 | } 918 | t_road_lanes_laneSection_lcr_lane_roadMark_type_line::t_road_lanes_laneSection_lcr_lane_roadMark_type_line(pugi::xml_node node) 919 | { 920 | if (node.attribute("length")) { length = node.attribute("length").as_string(); } //required 921 | if (node.attribute("space")) { space = node.attribute("space").as_double(); } //typedef 922 | if (node.attribute("tOffset")) { tOffset = node.attribute("tOffset").as_double(); } //required 923 | if (node.attribute("sOffset")) { sOffset = node.attribute("sOffset").as_double(); } //typedef 924 | if (node.attribute("rule")) { rule = str2enum(node.attribute("rule").as_string()); } // enum 925 | if (node.attribute("width")) { width = node.attribute("width").as_string(); } //optional 926 | if (node.attribute("color")) { color = str2enum(node.attribute("color").as_string()); } // enum 927 | } 928 | t_road_lanes_laneSection_left::t_road_lanes_laneSection_left(pugi::xml_node node) 929 | { 930 | for (pugi::xml_node e_lane = node.child("lane"); e_lane; e_lane= e_lane.next_sibling("lane")) 931 | { 932 | m_lanes.push_back(std::make_shared(e_lane)); 933 | } 934 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 935 | } 936 | t_road_lanes_laneSection_left_lane::t_road_lanes_laneSection_left_lane(pugi::xml_node node) 937 | { 938 | if (node.attribute("id")) { id = node.attribute("id").as_ullong(); } //required 939 | } 940 | t_road_lanes_laneSection_lr_lane_access::t_road_lanes_laneSection_lr_lane_access(pugi::xml_node node) 941 | { 942 | if (node.attribute("sOffset")) { sOffset = node.attribute("sOffset").as_double(); } //typedef 943 | if (node.attribute("rule")) { rule = str2enum(node.attribute("rule").as_string()); } // enum 944 | if (node.attribute("restriction")) { restriction = str2enum(node.attribute("restriction").as_string()); } // enum 945 | } 946 | t_road_lanes_laneSection_lr_lane_border::t_road_lanes_laneSection_lr_lane_border(pugi::xml_node node) 947 | { 948 | if (node.attribute("sOffset")) { sOffset = node.attribute("sOffset").as_double(); } //typedef 949 | if (node.attribute("a")) { a = node.attribute("a").as_double(); } //required 950 | if (node.attribute("b")) { b = node.attribute("b").as_double(); } //required 951 | if (node.attribute("c")) { c = node.attribute("c").as_double(); } //required 952 | if (node.attribute("d")) { d = node.attribute("d").as_double(); } //required 953 | } 954 | t_road_lanes_laneSection_lr_lane_height::t_road_lanes_laneSection_lr_lane_height(pugi::xml_node node) 955 | { 956 | if (node.attribute("sOffset")) { sOffset = node.attribute("sOffset").as_double(); } //typedef 957 | if (node.attribute("inner")) { inner = node.attribute("inner").as_double(); } //required 958 | if (node.attribute("outer")) { outer = node.attribute("outer").as_double(); } //required 959 | } 960 | t_road_lanes_laneSection_lr_lane_material::t_road_lanes_laneSection_lr_lane_material(pugi::xml_node node) 961 | { 962 | if (node.attribute("sOffset")) { sOffset = node.attribute("sOffset").as_double(); } //typedef 963 | if (node.attribute("surface")) { surface = node.attribute("surface").as_string(); } //optional 964 | if (node.attribute("friction")) { friction = node.attribute("friction").as_double(); } //typedef 965 | if (node.attribute("roughness")) { roughness = node.attribute("roughness").as_double(); } //typedef 966 | } 967 | t_road_lanes_laneSection_lr_lane_rule::t_road_lanes_laneSection_lr_lane_rule(pugi::xml_node node) 968 | { 969 | if (node.attribute("sOffset")) { sOffset = node.attribute("sOffset").as_double(); } //typedef 970 | if (node.attribute("value")) { value = node.attribute("value").as_string(); } //required 971 | } 972 | t_road_lanes_laneSection_lr_lane_speed::t_road_lanes_laneSection_lr_lane_speed(pugi::xml_node node) 973 | { 974 | if (node.attribute("sOffset")) { sOffset = node.attribute("sOffset").as_double(); } //typedef 975 | if (node.attribute("max")) { max = node.attribute("max").as_double(); } //typedef 976 | if (node.attribute("unit")) { unit = str2enum(node.attribute("unit").as_string()); } // enum 977 | } 978 | t_road_lanes_laneSection_lr_lane_width::t_road_lanes_laneSection_lr_lane_width(pugi::xml_node node) 979 | { 980 | if (node.attribute("sOffset")) { sOffset = node.attribute("sOffset").as_double(); } //typedef 981 | if (node.attribute("a")) { a = node.attribute("a").as_double(); } //required 982 | if (node.attribute("b")) { b = node.attribute("b").as_double(); } //required 983 | if (node.attribute("c")) { c = node.attribute("c").as_double(); } //required 984 | if (node.attribute("d")) { d = node.attribute("d").as_double(); } //required 985 | } 986 | t_road_lanes_laneSection_right::t_road_lanes_laneSection_right(pugi::xml_node node) 987 | { 988 | for (pugi::xml_node e_lane = node.child("lane"); e_lane; e_lane= e_lane.next_sibling("lane")) 989 | { 990 | m_lanes.push_back(std::make_shared(e_lane)); 991 | } 992 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 993 | } 994 | t_road_lanes_laneSection_right_lane::t_road_lanes_laneSection_right_lane(pugi::xml_node node) 995 | { 996 | if (node.attribute("id")) { id = node.attribute("id").as_int(); } //required 997 | } 998 | t_road_objects_object_laneValidity::t_road_objects_object_laneValidity(pugi::xml_node node) 999 | { 1000 | if (node.attribute("fromLane")) { fromLane = node.attribute("fromLane").as_int(); } //required 1001 | if (node.attribute("toLane")) { toLane = node.attribute("toLane").as_int(); } //required 1002 | } 1003 | // xs:group -> aliased to group definition 1004 | g_additionalData::g_additionalData(pugi::xml_node node) 1005 | { 1006 | for (pugi::xml_node e_include = node.child("include"); e_include; e_include= e_include.next_sibling("include")) 1007 | { 1008 | m_includes.push_back(std::make_shared(e_include)); 1009 | } 1010 | for (pugi::xml_node e_userData = node.child("userData"); e_userData; e_userData= e_userData.next_sibling("userData")) 1011 | { 1012 | m_userDatas.push_back(std::make_shared(e_userData)); 1013 | } 1014 | if (node.child("dataQuality")) { m_dataQuality = std::make_shared(node.child("dataQuality")); } 1015 | } 1016 | OpenDRIVE::OpenDRIVE(pugi::xml_node node) 1017 | { 1018 | if (node.child("header")) { m_header = std::make_shared(node.child("header")); } 1019 | for (pugi::xml_node e_road = node.child("road"); e_road; e_road= e_road.next_sibling("road")) 1020 | { 1021 | m_roads.push_back(std::make_shared(e_road)); 1022 | } 1023 | for (pugi::xml_node e_controller = node.child("controller"); e_controller; e_controller= e_controller.next_sibling("controller")) 1024 | { 1025 | m_controllers.push_back(std::make_shared(e_controller)); 1026 | } 1027 | for (pugi::xml_node e_junction = node.child("junction"); e_junction; e_junction= e_junction.next_sibling("junction")) 1028 | { 1029 | m_junctions.push_back(std::make_shared(e_junction)); 1030 | } 1031 | for (pugi::xml_node e_junctionGroup = node.child("junctionGroup"); e_junctionGroup; e_junctionGroup= e_junctionGroup.next_sibling("junctionGroup")) 1032 | { 1033 | m_junctionGroups.push_back(std::make_shared(e_junctionGroup)); 1034 | } 1035 | for (pugi::xml_node e_station = node.child("station"); e_station; e_station= e_station.next_sibling("station")) 1036 | { 1037 | m_stations.push_back(std::make_shared(e_station)); 1038 | } 1039 | { m_g_additionalData = std::make_shared(node); } // Node has no xml def, same node passes through until it finds an element. 1040 | #ifdef __DEBUG__ 1041 | std::cout<<*this<(m_root.child("OpenDRIVE")); 1065 | std::cout << "OpenDRIVE parse successfully " << m_OpenDRIVE<< std::endl; 1066 | } 1067 | catch (std::exception &e) 1068 | { 1069 | std::cout << "ERROR :Exception .. " << e.what() << std::endl; 1070 | } 1071 | } 1072 | xodr::~xodr() 1073 | { 1074 | } 1075 | 1076 | -------------------------------------------------------------------------------- /bind/pyxosc/pyxosc.cxx: -------------------------------------------------------------------------------- 1 | // 2 | // OpenSCENARIO_py.cxx 3 | // xsd2cxx- for OpenDrive CXX classes 4 | // 5 | // Created by Javed Shaik on Sat Jul 11 12:40:05 2020 6 | // # AUTO-GENERATED FILE - DO NOT EDIT!! 7 | // -- UUIDv4 : 0473a170-1000-40b0-89cf-3489fc527163 -- 8 | // All BUGS are Credited to ME :) - javedulu@gmail.com 9 | // 10 | // 11 | // pybind11 12 | // 13 | #include 14 | #include 15 | // 16 | #include "xosc.h" 17 | namespace py = pybind11; 18 | PYBIND11_MODULE(pyxosc,m) 19 | { 20 | m.doc() = "Python Bindings for OpenSCENARIO - OPENSCENARIO"; 21 | py::class_>(m,"Action_U") 22 | .def_readwrite("GlobalAction", &Action_U::m_GlobalAction ) //GlobalAction 23 | .def_readwrite("UserDefinedAction", &Action_U::m_UserDefinedAction ) //UserDefinedAction 24 | .def_readwrite("PrivateAction", &Action_U::m_PrivateAction ) //PrivateAction 25 | ; 26 | py::class_>(m,"AssignControllerAction_U") 27 | .def_readwrite("Controller", &AssignControllerAction_U::m_Controller ) //Controller 28 | .def_readwrite("CatalogReference", &AssignControllerAction_U::m_CatalogReference ) //CatalogReference 29 | ; 30 | py::class_>(m,"AssignRouteAction_U") 31 | .def_readwrite("Route", &AssignRouteAction_U::m_Route ) //Route 32 | .def_readwrite("CatalogReference", &AssignRouteAction_U::m_CatalogReference ) //CatalogReference 33 | ; 34 | py::class_>(m,"ByValueCondition_U") 35 | .def_readwrite("ParameterCondition", &ByValueCondition_U::m_ParameterCondition ) //ParameterCondition 36 | .def_readwrite("TimeOfDayCondition", &ByValueCondition_U::m_TimeOfDayCondition ) //TimeOfDayCondition 37 | .def_readwrite("SimulationTimeCondition", &ByValueCondition_U::m_SimulationTimeCondition ) //SimulationTimeCondition 38 | .def_readwrite("StoryboardElementStateCondition", &ByValueCondition_U::m_StoryboardElementStateCondition ) //StoryboardElementStateCondition 39 | .def_readwrite("UserDefinedValueCondition", &ByValueCondition_U::m_UserDefinedValueCondition ) //UserDefinedValueCondition 40 | .def_readwrite("TrafficSignalCondition", &ByValueCondition_U::m_TrafficSignalCondition ) //TrafficSignalCondition 41 | .def_readwrite("TrafficSignalControllerCondition", &ByValueCondition_U::m_TrafficSignalControllerCondition ) //TrafficSignalControllerCondition 42 | ; 43 | py::class_>(m,"CollisionCondition_U") 44 | .def_readwrite("EntityRef", &CollisionCondition_U::m_EntityRef ) //EntityRef 45 | .def_readwrite("ByType", &CollisionCondition_U::m_ByType ) //ByObjectType 46 | ; 47 | py::class_>(m,"Condition_U") 48 | .def_readwrite("ByEntityCondition", &Condition_U::m_ByEntityCondition ) //ByEntityCondition 49 | .def_readwrite("ByValueCondition", &Condition_U::m_ByValueCondition ) //ByValueCondition 50 | ; 51 | py::class_>(m,"ControllerDistributionEntry_U") 52 | .def_readwrite("Controller", &ControllerDistributionEntry_U::m_Controller ) //Controller 53 | .def_readwrite("CatalogReference", &ControllerDistributionEntry_U::m_CatalogReference ) //CatalogReference 54 | ; 55 | py::class_>(m,"EntityAction_U") 56 | .def_readwrite("AddEntityAction", &EntityAction_U::m_AddEntityAction ) //AddEntityAction 57 | .def_readwrite("DeleteEntityAction", &EntityAction_U::m_DeleteEntityAction ) //DeleteEntityAction 58 | ; 59 | py::class_>(m,"EntityCondition_U") 60 | .def_readwrite("EndOfRoadCondition", &EntityCondition_U::m_EndOfRoadCondition ) //EndOfRoadCondition 61 | .def_readwrite("CollisionCondition", &EntityCondition_U::m_CollisionCondition ) //CollisionCondition 62 | .def_readwrite("OffroadCondition", &EntityCondition_U::m_OffroadCondition ) //OffroadCondition 63 | .def_readwrite("TimeHeadwayCondition", &EntityCondition_U::m_TimeHeadwayCondition ) //TimeHeadwayCondition 64 | .def_readwrite("TimeToCollisionCondition", &EntityCondition_U::m_TimeToCollisionCondition ) //TimeToCollisionCondition 65 | .def_readwrite("AccelerationCondition", &EntityCondition_U::m_AccelerationCondition ) //AccelerationCondition 66 | .def_readwrite("StandStillCondition", &EntityCondition_U::m_StandStillCondition ) //StandStillCondition 67 | .def_readwrite("SpeedCondition", &EntityCondition_U::m_SpeedCondition ) //SpeedCondition 68 | .def_readwrite("RelativeSpeedCondition", &EntityCondition_U::m_RelativeSpeedCondition ) //RelativeSpeedCondition 69 | .def_readwrite("TraveledDistanceCondition", &EntityCondition_U::m_TraveledDistanceCondition ) //TraveledDistanceCondition 70 | .def_readwrite("ReachPositionCondition", &EntityCondition_U::m_ReachPositionCondition ) //ReachPositionCondition 71 | .def_readwrite("DistanceCondition", &EntityCondition_U::m_DistanceCondition ) //DistanceCondition 72 | .def_readwrite("RelativeDistanceCondition", &EntityCondition_U::m_RelativeDistanceCondition ) //RelativeDistanceCondition 73 | ; 74 | py::class_>(m,"EnvironmentAction_U") 75 | .def_readwrite("Environment", &EnvironmentAction_U::m_Environment ) //Environment 76 | .def_readwrite("CatalogReference", &EnvironmentAction_U::m_CatalogReference ) //CatalogReference 77 | ; 78 | py::class_>(m,"FinalSpeed_U") 79 | .def_readwrite("AbsoluteSpeed", &FinalSpeed_U::m_AbsoluteSpeed ) //AbsoluteSpeed 80 | .def_readwrite("RelativeSpeedToMaster", &FinalSpeed_U::m_RelativeSpeedToMaster ) //RelativeSpeedToMaster 81 | ; 82 | py::class_>(m,"GlobalAction_U") 83 | .def_readwrite("EnvironmentAction", &GlobalAction_U::m_EnvironmentAction ) //EnvironmentAction 84 | .def_readwrite("EntityAction", &GlobalAction_U::m_EntityAction ) //EntityAction 85 | .def_readwrite("ParameterAction", &GlobalAction_U::m_ParameterAction ) //ParameterAction 86 | .def_readwrite("InfrastructureAction", &GlobalAction_U::m_InfrastructureAction ) //InfrastructureAction 87 | .def_readwrite("TrafficAction", &GlobalAction_U::m_TrafficAction ) //TrafficAction 88 | ; 89 | py::class_>(m,"InRoutePosition_U") 90 | .def_readwrite("FromCurrentEntity", &InRoutePosition_U::m_FromCurrentEntity ) //PositionOfCurrentEntity 91 | .def_readwrite("FromRoadCoordinates", &InRoutePosition_U::m_FromRoadCoordinates ) //PositionInRoadCoordinates 92 | .def_readwrite("FromLaneCoordinates", &InRoutePosition_U::m_FromLaneCoordinates ) //PositionInLaneCoordinates 93 | ; 94 | py::class_>(m,"LaneChangeTarget_U") 95 | .def_readwrite("RelativeTargetLane", &LaneChangeTarget_U::m_RelativeTargetLane ) //RelativeTargetLane 96 | .def_readwrite("AbsoluteTargetLane", &LaneChangeTarget_U::m_AbsoluteTargetLane ) //AbsoluteTargetLane 97 | ; 98 | py::class_>(m,"LaneOffsetTarget_U") 99 | .def_readwrite("RelativeTargetLaneOffset", &LaneOffsetTarget_U::m_RelativeTargetLaneOffset ) //RelativeTargetLaneOffset 100 | .def_readwrite("AbsoluteTargetLaneOffset", &LaneOffsetTarget_U::m_AbsoluteTargetLaneOffset ) //AbsoluteTargetLaneOffset 101 | ; 102 | py::class_>(m,"LateralAction_U") 103 | .def_readwrite("LaneChangeAction", &LateralAction_U::m_LaneChangeAction ) //LaneChangeAction 104 | .def_readwrite("LaneOffsetAction", &LateralAction_U::m_LaneOffsetAction ) //LaneOffsetAction 105 | .def_readwrite("LateralDistanceAction", &LateralAction_U::m_LateralDistanceAction ) //LateralDistanceAction 106 | ; 107 | py::class_>(m,"LongitudinalAction_U") 108 | .def_readwrite("SpeedAction", &LongitudinalAction_U::m_SpeedAction ) //SpeedAction 109 | .def_readwrite("LongitudinalDistanceAction", &LongitudinalAction_U::m_LongitudinalDistanceAction ) //LongitudinalDistanceAction 110 | ; 111 | py::class_>(m,"ModifyRule_U") 112 | .def_readwrite("AddValue", &ModifyRule_U::m_AddValue ) //ParameterAddValueRule 113 | .def_readwrite("MultiplyByValue", &ModifyRule_U::m_MultiplyByValue ) //ParameterMultiplyByValueRule 114 | ; 115 | py::class_>(m,"ObjectController_U") 116 | .def_readwrite("CatalogReference", &ObjectController_U::m_CatalogReference ) //CatalogReference 117 | .def_readwrite("Controller", &ObjectController_U::m_Controller ) //Controller 118 | ; 119 | py::class_>(m,"ParameterAction_U") 120 | .def_readwrite("SetAction", &ParameterAction_U::m_SetAction ) //ParameterSetAction 121 | .def_readwrite("ModifyAction", &ParameterAction_U::m_ModifyAction ) //ParameterModifyAction 122 | ; 123 | py::class_>(m,"Position_U") 124 | .def_readwrite("WorldPosition", &Position_U::m_WorldPosition ) //WorldPosition 125 | .def_readwrite("RelativeWorldPosition", &Position_U::m_RelativeWorldPosition ) //RelativeWorldPosition 126 | .def_readwrite("RelativeObjectPosition", &Position_U::m_RelativeObjectPosition ) //RelativeObjectPosition 127 | .def_readwrite("RoadPosition", &Position_U::m_RoadPosition ) //RoadPosition 128 | .def_readwrite("RelativeRoadPosition", &Position_U::m_RelativeRoadPosition ) //RelativeRoadPosition 129 | .def_readwrite("LanePosition", &Position_U::m_LanePosition ) //LanePosition 130 | .def_readwrite("RelativeLanePosition", &Position_U::m_RelativeLanePosition ) //RelativeLanePosition 131 | .def_readwrite("RoutePosition", &Position_U::m_RoutePosition ) //RoutePosition 132 | ; 133 | py::class_>(m,"PrivateAction_U") 134 | .def_readwrite("LongitudinalAction", &PrivateAction_U::m_LongitudinalAction ) //LongitudinalAction 135 | .def_readwrite("LateralAction", &PrivateAction_U::m_LateralAction ) //LateralAction 136 | .def_readwrite("VisibilityAction", &PrivateAction_U::m_VisibilityAction ) //VisibilityAction 137 | .def_readwrite("SynchronizeAction", &PrivateAction_U::m_SynchronizeAction ) //SynchronizeAction 138 | .def_readwrite("ActivateControllerAction", &PrivateAction_U::m_ActivateControllerAction ) //ActivateControllerAction 139 | .def_readwrite("ControllerAction", &PrivateAction_U::m_ControllerAction ) //ControllerAction 140 | .def_readwrite("TeleportAction", &PrivateAction_U::m_TeleportAction ) //TeleportAction 141 | .def_readwrite("RoutingAction", &PrivateAction_U::m_RoutingAction ) //RoutingAction 142 | ; 143 | py::class_>(m,"RouteRef_U") 144 | .def_readwrite("Route", &RouteRef_U::m_Route ) //Route 145 | .def_readwrite("CatalogReference", &RouteRef_U::m_CatalogReference ) //CatalogReference 146 | ; 147 | py::class_>(m,"RoutingAction_U") 148 | .def_readwrite("AssignRouteAction", &RoutingAction_U::m_AssignRouteAction ) //AssignRouteAction 149 | .def_readwrite("FollowTrajectoryAction", &RoutingAction_U::m_FollowTrajectoryAction ) //FollowTrajectoryAction 150 | .def_readwrite("AcquirePositionAction", &RoutingAction_U::m_AcquirePositionAction ) //AcquirePositionAction 151 | ; 152 | py::class_>(m,"SelectedEntities_U") 153 | .def_readwrite("EntityRef", &SelectedEntities_U::m_EntityRefs ) //EntityRef 154 | .def_readwrite("ByType", &SelectedEntities_U::m_ByTypes ) //ByType 155 | ; 156 | py::class_>(m,"Shape_U") 157 | .def_readwrite("Polyline", &Shape_U::m_Polyline ) //Polyline 158 | .def_readwrite("Clothoid", &Shape_U::m_Clothoid ) //Clothoid 159 | .def_readwrite("Nurbs", &Shape_U::m_Nurbs ) //Nurbs 160 | ; 161 | py::class_>(m,"SpeedActionTarget_U") 162 | .def_readwrite("RelativeTargetSpeed", &SpeedActionTarget_U::m_RelativeTargetSpeed ) //RelativeTargetSpeed 163 | .def_readwrite("AbsoluteTargetSpeed", &SpeedActionTarget_U::m_AbsoluteTargetSpeed ) //AbsoluteTargetSpeed 164 | ; 165 | py::class_>(m,"TimeReference_U") 166 | .def_readwrite("None", &TimeReference_U::m_None ) //None 167 | .def_readwrite("Timing", &TimeReference_U::m_Timing ) //Timing 168 | ; 169 | py::class_>(m,"TimeToCollisionConditionTarget_U") 170 | .def_readwrite("Position", &TimeToCollisionConditionTarget_U::m_Position ) //Position 171 | .def_readwrite("EntityRef", &TimeToCollisionConditionTarget_U::m_EntityRef ) //EntityRef 172 | ; 173 | py::class_>(m,"TrafficAction_U") 174 | .def_readwrite("TrafficSourceAction", &TrafficAction_U::m_TrafficSourceAction ) //TrafficSourceAction 175 | .def_readwrite("TrafficSinkAction", &TrafficAction_U::m_TrafficSinkAction ) //TrafficSinkAction 176 | .def_readwrite("TrafficSwarmAction", &TrafficAction_U::m_TrafficSwarmAction ) //TrafficSwarmAction 177 | ; 178 | py::class_>(m,"TrafficSignalAction_U") 179 | .def_readwrite("TrafficSignalControllerAction", &TrafficSignalAction_U::m_TrafficSignalControllerAction ) //TrafficSignalControllerAction 180 | .def_readwrite("TrafficSignalStateAction", &TrafficSignalAction_U::m_TrafficSignalStateAction ) //TrafficSignalStateAction 181 | ; 182 | // 183 | py::class_>(m,"AbsoluteSpeed","") 184 | .def_readwrite("value", &AbsoluteSpeed::value, "") 185 | ; 186 | // 187 | py::class_>(m,"AbsoluteTargetLane","") 188 | .def_readwrite("value", &AbsoluteTargetLane::value, "") 189 | ; 190 | // 191 | py::class_>(m,"AbsoluteTargetLaneOffset","") 192 | .def_readwrite("value", &AbsoluteTargetLaneOffset::value, "") 193 | ; 194 | // 195 | py::class_>(m,"AbsoluteTargetSpeed","") 196 | .def_readwrite("value", &AbsoluteTargetSpeed::value, "") 197 | ; 198 | // 199 | py::class_>(m,"AccelerationCondition","") 200 | .def_readwrite("rule", &AccelerationCondition::rule, "") 201 | .def_readwrite("value", &AccelerationCondition::value, "") 202 | ; 203 | // 204 | py::class_>(m,"AcquirePositionAction","") 205 | .def_readwrite("Position", &AcquirePositionAction::m_Position ) //Position 206 | ; 207 | // 208 | py::class_>(m,"Act","") 209 | .def_readwrite("name", &Act::name, "") 210 | .def_readwrite("ManeuverGroup", &Act::m_ManeuverGroups ) //ManeuverGroup 211 | .def_readwrite("StartTrigger", &Act::m_StartTrigger ) //Trigger 212 | .def_readwrite("StopTrigger", &Act::m_StopTrigger ) //Trigger 213 | ; 214 | // 215 | py::class_>(m,"Action","") 216 | .def_readwrite("name", &Action::name, "") 217 | .def_readwrite("Action", &Action::m_Action ) // 218 | ; 219 | // 220 | py::class_>(m,"ActivateControllerAction","") 221 | .def_readwrite("lateral", &ActivateControllerAction::lateral, "") 222 | .def_readwrite("longitudinal", &ActivateControllerAction::longitudinal, "") 223 | ; 224 | // 225 | py::class_>(m,"Actors","") 226 | .def_readwrite("selectTriggeringEntities", &Actors::selectTriggeringEntities, "") 227 | .def_readwrite("EntityRef", &Actors::m_EntityRefs ) //EntityRef 228 | ; 229 | // 230 | py::class_>(m,"AddEntityAction","") 231 | .def_readwrite("Position", &AddEntityAction::m_Position ) //Position 232 | ; 233 | // 234 | py::class_>(m,"AssignControllerAction","") 235 | .def_readwrite("AssignControllerAction", &AssignControllerAction::m_AssignControllerAction ) // 236 | ; 237 | // 238 | py::class_>(m,"AssignRouteAction","") 239 | .def_readwrite("AssignRouteAction", &AssignRouteAction::m_AssignRouteAction ) // 240 | ; 241 | // 242 | py::class_>(m,"Axle","") 243 | .def_readwrite("maxSteering", &Axle::maxSteering, "") 244 | .def_readwrite("positionX", &Axle::positionX, "") 245 | .def_readwrite("positionZ", &Axle::positionZ, "") 246 | .def_readwrite("trackWidth", &Axle::trackWidth, "") 247 | .def_readwrite("wheelDiameter", &Axle::wheelDiameter, "") 248 | ; 249 | // 250 | py::class_>(m,"Axles","") 251 | .def_readwrite("FrontAxle", &Axles::m_FrontAxle ) //Axle 252 | .def_readwrite("RearAxle", &Axles::m_RearAxle ) //Axle 253 | .def_readwrite("AdditionalAxle", &Axles::m_AdditionalAxles ) //Axle 254 | ; 255 | // 256 | py::class_>(m,"BoundingBox","") 257 | .def_readwrite("Center", &BoundingBox::m_Center ) //Center 258 | .def_readwrite("Dimensions", &BoundingBox::m_Dimensions ) //Dimensions 259 | ; 260 | // 261 | py::class_>(m,"ByEntityCondition","") 262 | .def_readwrite("TriggeringEntities", &ByEntityCondition::m_TriggeringEntities ) //TriggeringEntities 263 | .def_readwrite("EntityCondition", &ByEntityCondition::m_EntityCondition ) //EntityCondition 264 | ; 265 | // 266 | py::class_>(m,"ByObjectType","") 267 | .def_readwrite("type", &ByObjectType::type, "") 268 | ; 269 | // 270 | py::class_>(m,"ByType","") 271 | .def_readwrite("objectType", &ByType::objectType, "") 272 | ; 273 | // 274 | py::class_>(m,"ByValueCondition","") 275 | .def_readwrite("ByValueCondition", &ByValueCondition::m_ByValueCondition ) // 276 | ; 277 | // 278 | py::class_>(m,"Catalog","") 279 | .def_readwrite("name", &Catalog::name, "") 280 | .def_readwrite("Vehicle", &Catalog::m_Vehicles ) //Vehicle 281 | .def_readwrite("Controller", &Catalog::m_Controllers ) //Controller 282 | .def_readwrite("Pedestrian", &Catalog::m_Pedestrians ) //Pedestrian 283 | .def_readwrite("MiscObject", &Catalog::m_MiscObjects ) //MiscObject 284 | .def_readwrite("Environment", &Catalog::m_Environments ) //Environment 285 | .def_readwrite("Maneuver", &Catalog::m_Maneuvers ) //Maneuver 286 | .def_readwrite("Trajectory", &Catalog::m_Trajectorys ) //Trajectory 287 | .def_readwrite("Route", &Catalog::m_Routes ) //Route 288 | ; 289 | // 290 | py::class_>(m,"CatalogLocations","") 291 | .def_readwrite("VehicleCatalog", &CatalogLocations::m_VehicleCatalog ) //VehicleCatalogLocation 292 | .def_readwrite("ControllerCatalog", &CatalogLocations::m_ControllerCatalog ) //ControllerCatalogLocation 293 | .def_readwrite("PedestrianCatalog", &CatalogLocations::m_PedestrianCatalog ) //PedestrianCatalogLocation 294 | .def_readwrite("MiscObjectCatalog", &CatalogLocations::m_MiscObjectCatalog ) //MiscObjectCatalogLocation 295 | .def_readwrite("EnvironmentCatalog", &CatalogLocations::m_EnvironmentCatalog ) //EnvironmentCatalogLocation 296 | .def_readwrite("ManeuverCatalog", &CatalogLocations::m_ManeuverCatalog ) //ManeuverCatalogLocation 297 | .def_readwrite("TrajectoryCatalog", &CatalogLocations::m_TrajectoryCatalog ) //TrajectoryCatalogLocation 298 | .def_readwrite("RouteCatalog", &CatalogLocations::m_RouteCatalog ) //RouteCatalogLocation 299 | ; 300 | // 301 | py::class_>(m,"CatalogReference","") 302 | .def_readwrite("catalogName", &CatalogReference::catalogName, "") 303 | .def_readwrite("entryName", &CatalogReference::entryName, "") 304 | .def_readwrite("ParameterAssignments", &CatalogReference::m_ParameterAssignments ) //ParameterAssignments 305 | ; 306 | // 307 | py::class_>(m,"Center","") 308 | .def_readwrite("x", &Center::x, "") 309 | .def_readwrite("y", &Center::y, "") 310 | .def_readwrite("z", &Center::z, "") 311 | ; 312 | // 313 | py::class_>(m,"CentralSwarmObject","") 314 | .def_readwrite("entityRef", &CentralSwarmObject::entityRef, "") 315 | ; 316 | // 317 | py::class_>(m,"Clothoid","") 318 | .def_readwrite("curvature", &Clothoid::curvature, "") 319 | .def_readwrite("curvatureDot", &Clothoid::curvatureDot, "") 320 | .def_readwrite("length", &Clothoid::length, "") 321 | .def_readwrite("startTime", &Clothoid::startTime, "") 322 | .def_readwrite("stopTime", &Clothoid::stopTime, "") 323 | .def_readwrite("Position", &Clothoid::m_Position ) //Position 324 | ; 325 | // 326 | py::class_>(m,"CollisionCondition","") 327 | .def_readwrite("CollisionCondition", &CollisionCondition::m_CollisionCondition ) // 328 | ; 329 | // 330 | py::class_>(m,"Condition","") 331 | .def_readwrite("conditionEdge", &Condition::conditionEdge, "") 332 | .def_readwrite("delay", &Condition::delay, "") 333 | .def_readwrite("name", &Condition::name, "") 334 | .def_readwrite("Condition", &Condition::m_Condition ) // 335 | ; 336 | // 337 | py::class_>(m,"ConditionGroup","") 338 | .def_readwrite("Condition", &ConditionGroup::m_Conditions ) //Condition 339 | ; 340 | // 341 | py::class_>(m,"Controller","") 342 | .def_readwrite("name", &Controller::name, "") 343 | .def_readwrite("ParameterDeclarations", &Controller::m_ParameterDeclarations ) //ParameterDeclarations 344 | .def_readwrite("Properties", &Controller::m_Properties ) //Properties 345 | ; 346 | // 347 | py::class_>(m,"ControllerAction","") 348 | .def_readwrite("AssignControllerAction", &ControllerAction::m_AssignControllerAction ) //AssignControllerAction 349 | .def_readwrite("OverrideControllerValueAction", &ControllerAction::m_OverrideControllerValueAction ) //OverrideControllerValueAction 350 | ; 351 | // 352 | py::class_>(m,"ControllerCatalogLocation","") 353 | .def_readwrite("Directory", &ControllerCatalogLocation::m_Directory ) //Directory 354 | ; 355 | // 356 | py::class_>(m,"ControllerDistribution","") 357 | .def_readwrite("ControllerDistributionEntry", &ControllerDistribution::m_ControllerDistributionEntrys ) //ControllerDistributionEntry 358 | ; 359 | // 360 | py::class_>(m,"ControllerDistributionEntry","") 361 | .def_readwrite("weight", &ControllerDistributionEntry::weight, "") 362 | .def_readwrite("ControllerDistributionEntry", &ControllerDistributionEntry::m_ControllerDistributionEntry ) // 363 | ; 364 | // 365 | py::class_>(m,"ControlPoint","") 366 | .def_readwrite("time", &ControlPoint::time, "") 367 | .def_readwrite("weight", &ControlPoint::weight, "") 368 | .def_readwrite("Position", &ControlPoint::m_Position ) //Position 369 | ; 370 | // 371 | py::class_>(m,"CustomCommandAction","") 372 | .def_readwrite("type", &CustomCommandAction::type, "") 373 | ; 374 | // 375 | py::class_>(m,"DeleteEntityAction","") 376 | ; 377 | // 378 | py::class_>(m,"Dimensions","") 379 | .def_readwrite("height", &Dimensions::height, "") 380 | .def_readwrite("length", &Dimensions::length, "") 381 | .def_readwrite("width", &Dimensions::width, "") 382 | ; 383 | // 384 | py::class_>(m,"Directory","") 385 | .def_readwrite("path", &Directory::path, "") 386 | ; 387 | // 388 | py::class_>(m,"DistanceCondition","") 389 | .def_readwrite("alongRoute", &DistanceCondition::alongRoute, "") 390 | .def_readwrite("freespace", &DistanceCondition::freespace, "") 391 | .def_readwrite("rule", &DistanceCondition::rule, "") 392 | .def_readwrite("value", &DistanceCondition::value, "") 393 | .def_readwrite("Position", &DistanceCondition::m_Position ) //Position 394 | ; 395 | // 396 | py::class_>(m,"DynamicConstraints","") 397 | .def_readwrite("maxAcceleration", &DynamicConstraints::maxAcceleration, "") 398 | .def_readwrite("maxDeceleration", &DynamicConstraints::maxDeceleration, "") 399 | .def_readwrite("maxSpeed", &DynamicConstraints::maxSpeed, "") 400 | ; 401 | // 402 | py::class_>(m,"EndOfRoadCondition","") 403 | .def_readwrite("duration", &EndOfRoadCondition::duration, "") 404 | ; 405 | // 406 | py::class_>(m,"Entities","") 407 | .def_readwrite("ScenarioObject", &Entities::m_ScenarioObjects ) //ScenarioObject 408 | .def_readwrite("EntitySelection", &Entities::m_EntitySelections ) //EntitySelection 409 | ; 410 | // 411 | py::class_>(m,"EntityAction","") 412 | .def_readwrite("entityRef", &EntityAction::entityRef, "") 413 | .def_readwrite("EntityAction", &EntityAction::m_EntityAction ) // 414 | ; 415 | // 416 | py::class_>(m,"EntityCondition","") 417 | .def_readwrite("EntityCondition", &EntityCondition::m_EntityCondition ) // 418 | ; 419 | // 420 | py::class_>(m,"EntityRef","") 421 | .def_readwrite("entityRef", &EntityRef::entityRef, "") 422 | ; 423 | // 424 | py::class_>(m,"EntitySelection","") 425 | .def_readwrite("name", &EntitySelection::name, "") 426 | .def_readwrite("Members", &EntitySelection::m_Members ) //SelectedEntities 427 | ; 428 | // 429 | py::class_>(m,"Environment","") 430 | .def_readwrite("name", &Environment::name, "") 431 | .def_readwrite("ParameterDeclarations", &Environment::m_ParameterDeclarations ) //ParameterDeclarations 432 | .def_readwrite("TimeOfDay", &Environment::m_TimeOfDay ) //TimeOfDay 433 | .def_readwrite("Weather", &Environment::m_Weather ) //Weather 434 | .def_readwrite("RoadCondition", &Environment::m_RoadCondition ) //RoadCondition 435 | ; 436 | // 437 | py::class_>(m,"EnvironmentAction","") 438 | .def_readwrite("EnvironmentAction", &EnvironmentAction::m_EnvironmentAction ) // 439 | ; 440 | // 441 | py::class_>(m,"EnvironmentCatalogLocation","") 442 | .def_readwrite("Directory", &EnvironmentCatalogLocation::m_Directory ) //Directory 443 | ; 444 | // 445 | py::class_>(m,"Event","") 446 | .def_readwrite("maximumExecutionCount", &Event::maximumExecutionCount, "") 447 | .def_readwrite("name", &Event::name, "") 448 | .def_readwrite("priority", &Event::priority, "") 449 | .def_readwrite("Action", &Event::m_Actions ) //Action 450 | .def_readwrite("StartTrigger", &Event::m_StartTrigger ) //Trigger 451 | ; 452 | // 453 | py::class_>(m,"File","") 454 | .def_readwrite("filepath", &File::filepath, "") 455 | ; 456 | // 457 | py::class_>(m,"FileHeader","") 458 | .def_readwrite("author", &FileHeader::author, "") 459 | .def_readwrite("date", &FileHeader::date, "") 460 | .def_readwrite("description", &FileHeader::description, "") 461 | .def_readwrite("revMajor", &FileHeader::revMajor, "") 462 | .def_readwrite("revMinor", &FileHeader::revMinor, "") 463 | ; 464 | // 465 | py::class_>(m,"FinalSpeed","") 466 | .def_readwrite("FinalSpeed", &FinalSpeed::m_FinalSpeed ) // 467 | ; 468 | // 469 | py::class_>(m,"Fog","") 470 | .def_readwrite("visualRange", &Fog::visualRange, "") 471 | .def_readwrite("BoundingBox", &Fog::m_BoundingBox ) //BoundingBox 472 | ; 473 | // 474 | py::class_>(m,"FollowTrajectoryAction","") 475 | .def_readwrite("Trajectory", &FollowTrajectoryAction::m_Trajectory ) //Trajectory 476 | .def_readwrite("CatalogReference", &FollowTrajectoryAction::m_CatalogReference ) //CatalogReference 477 | .def_readwrite("TimeReference", &FollowTrajectoryAction::m_TimeReference ) //TimeReference 478 | .def_readwrite("TrajectoryFollowingMode", &FollowTrajectoryAction::m_TrajectoryFollowingMode ) //TrajectoryFollowingMode 479 | ; 480 | // 481 | py::class_>(m,"GlobalAction","") 482 | .def_readwrite("GlobalAction", &GlobalAction::m_GlobalAction ) // 483 | ; 484 | // 485 | py::class_>(m,"InfrastructureAction","") 486 | .def_readwrite("TrafficSignalAction", &InfrastructureAction::m_TrafficSignalAction ) //TrafficSignalAction 487 | ; 488 | // 489 | py::class_>(m,"Init","") 490 | .def_readwrite("Actions", &Init::m_Actions ) //InitActions 491 | ; 492 | // 493 | py::class_>(m,"InitActions","") 494 | .def_readwrite("GlobalAction", &InitActions::m_GlobalActions ) //GlobalAction 495 | .def_readwrite("UserDefinedAction", &InitActions::m_UserDefinedActions ) //UserDefinedAction 496 | .def_readwrite("Private", &InitActions::m_Privates ) //Private 497 | ; 498 | // 499 | py::class_>(m,"InRoutePosition","") 500 | .def_readwrite("InRoutePosition", &InRoutePosition::m_InRoutePosition ) // 501 | ; 502 | // 503 | py::class_>(m,"Knot","") 504 | .def_readwrite("value", &Knot::value, "") 505 | ; 506 | // 507 | py::class_>(m,"LaneChangeAction","") 508 | .def_readwrite("targetLaneOffset", &LaneChangeAction::targetLaneOffset, "") 509 | .def_readwrite("LaneChangeActionDynamics", &LaneChangeAction::m_LaneChangeActionDynamics ) //TransitionDynamics 510 | .def_readwrite("LaneChangeTarget", &LaneChangeAction::m_LaneChangeTarget ) //LaneChangeTarget 511 | ; 512 | // 513 | py::class_>(m,"LaneChangeTarget","") 514 | .def_readwrite("LaneChangeTarget", &LaneChangeTarget::m_LaneChangeTarget ) // 515 | ; 516 | // 517 | py::class_>(m,"LaneOffsetAction","") 518 | .def_readwrite("continuous", &LaneOffsetAction::continuous, "") 519 | .def_readwrite("LaneOffsetActionDynamics", &LaneOffsetAction::m_LaneOffsetActionDynamics ) //LaneOffsetActionDynamics 520 | .def_readwrite("LaneOffsetTarget", &LaneOffsetAction::m_LaneOffsetTarget ) //LaneOffsetTarget 521 | ; 522 | // 523 | py::class_>(m,"LaneOffsetActionDynamics","") 524 | .def_readwrite("dynamicsShape", &LaneOffsetActionDynamics::dynamicsShape, "") 525 | .def_readwrite("maxLateralAcc", &LaneOffsetActionDynamics::maxLateralAcc, "") 526 | ; 527 | // 528 | py::class_>(m,"LaneOffsetTarget","") 529 | .def_readwrite("LaneOffsetTarget", &LaneOffsetTarget::m_LaneOffsetTarget ) // 530 | ; 531 | // 532 | py::class_>(m,"LanePosition","") 533 | .def_readwrite("laneId", &LanePosition::laneId, "") 534 | .def_readwrite("offset", &LanePosition::offset, "") 535 | .def_readwrite("roadId", &LanePosition::roadId, "") 536 | .def_readwrite("s", &LanePosition::s, "") 537 | .def_readwrite("Orientation", &LanePosition::m_Orientation ) //Orientation 538 | ; 539 | // 540 | py::class_>(m,"LateralAction","") 541 | .def_readwrite("LateralAction", &LateralAction::m_LateralAction ) // 542 | ; 543 | // 544 | py::class_>(m,"LateralDistanceAction","") 545 | .def_readwrite("entityRef", &LateralDistanceAction::entityRef, "") 546 | .def_readwrite("continuous", &LateralDistanceAction::continuous, "") 547 | .def_readwrite("distance", &LateralDistanceAction::distance, "") 548 | .def_readwrite("freespace", &LateralDistanceAction::freespace, "") 549 | .def_readwrite("DynamicConstraints", &LateralDistanceAction::m_DynamicConstraints ) //DynamicConstraints 550 | ; 551 | // 552 | py::class_>(m,"LongitudinalAction","") 553 | .def_readwrite("LongitudinalAction", &LongitudinalAction::m_LongitudinalAction ) // 554 | ; 555 | // 556 | py::class_>(m,"LongitudinalDistanceAction","") 557 | .def_readwrite("entityRef", &LongitudinalDistanceAction::entityRef, "") 558 | .def_readwrite("continuous", &LongitudinalDistanceAction::continuous, "") 559 | .def_readwrite("distance", &LongitudinalDistanceAction::distance, "") 560 | .def_readwrite("freespace", &LongitudinalDistanceAction::freespace, "") 561 | .def_readwrite("timeGap", &LongitudinalDistanceAction::timeGap, "") 562 | .def_readwrite("DynamicConstraints", &LongitudinalDistanceAction::m_DynamicConstraints ) //DynamicConstraints 563 | ; 564 | // 565 | py::class_>(m,"Maneuver","") 566 | .def_readwrite("name", &Maneuver::name, "") 567 | .def_readwrite("ParameterDeclarations", &Maneuver::m_ParameterDeclarations ) //ParameterDeclarations 568 | .def_readwrite("Event", &Maneuver::m_Events ) //Event 569 | ; 570 | // 571 | py::class_>(m,"ManeuverCatalogLocation","") 572 | .def_readwrite("Directory", &ManeuverCatalogLocation::m_Directory ) //Directory 573 | ; 574 | // 575 | py::class_>(m,"ManeuverGroup","") 576 | .def_readwrite("maximumExecutionCount", &ManeuverGroup::maximumExecutionCount, "") 577 | .def_readwrite("name", &ManeuverGroup::name, "") 578 | .def_readwrite("Actors", &ManeuverGroup::m_Actors ) //Actors 579 | .def_readwrite("CatalogReference", &ManeuverGroup::m_CatalogReferences ) //CatalogReference 580 | .def_readwrite("Maneuver", &ManeuverGroup::m_Maneuvers ) //Maneuver 581 | ; 582 | // 583 | py::class_>(m,"MiscObject","") 584 | .def_readwrite("mass", &MiscObject::mass, "") 585 | .def_readwrite("miscObjectCategory", &MiscObject::miscObjectCategory, "") 586 | .def_readwrite("name", &MiscObject::name, "") 587 | .def_readwrite("ParameterDeclarations", &MiscObject::m_ParameterDeclarations ) //ParameterDeclarations 588 | .def_readwrite("BoundingBox", &MiscObject::m_BoundingBox ) //BoundingBox 589 | .def_readwrite("Properties", &MiscObject::m_Properties ) //Properties 590 | ; 591 | // 592 | py::class_>(m,"MiscObjectCatalogLocation","") 593 | .def_readwrite("Directory", &MiscObjectCatalogLocation::m_Directory ) //Directory 594 | ; 595 | // 596 | py::class_>(m,"ModifyRule","") 597 | .def_readwrite("ModifyRule", &ModifyRule::m_ModifyRule ) // 598 | ; 599 | // 600 | py::class_>(m,"None","") 601 | ; 602 | // 603 | py::class_>(m,"Nurbs","") 604 | .def_readwrite("order", &Nurbs::order, "") 605 | .def_readwrite("ControlPoint", &Nurbs::m_ControlPoints ) //ControlPoint 606 | .def_readwrite("Knot", &Nurbs::m_Knots ) //Knot 607 | ; 608 | // 609 | py::class_>(m,"ObjectController","") 610 | .def_readwrite("ObjectController", &ObjectController::m_ObjectController ) // 611 | ; 612 | // 613 | py::class_>(m,"OffroadCondition","") 614 | .def_readwrite("duration", &OffroadCondition::duration, "") 615 | ; 616 | // 617 | py::class_>(m,"OpenScenario","") 618 | .def_readwrite("FileHeader", &OpenScenario::m_FileHeader ) //FileHeader 619 | .def_readwrite("OpenScenarioCategory", &OpenScenario::m_OpenScenarioCategory ) // group read 620 | ; 621 | // 622 | py::class_>(m,"Orientation","") 623 | .def_readwrite("h", &Orientation::h, "") 624 | .def_readwrite("p", &Orientation::p, "") 625 | .def_readwrite("r", &Orientation::r, "") 626 | .def_readwrite("type", &Orientation::type, "") 627 | ; 628 | // 629 | py::class_>(m,"OverrideBrakeAction","") 630 | .def_readwrite("active", &OverrideBrakeAction::active, "") 631 | .def_readwrite("value", &OverrideBrakeAction::value, "") 632 | ; 633 | // 634 | py::class_>(m,"OverrideClutchAction","") 635 | .def_readwrite("active", &OverrideClutchAction::active, "") 636 | .def_readwrite("value", &OverrideClutchAction::value, "") 637 | ; 638 | // 639 | py::class_>(m,"OverrideControllerValueAction","") 640 | .def_readwrite("Throttle", &OverrideControllerValueAction::m_Throttle ) //OverrideThrottleAction 641 | .def_readwrite("Brake", &OverrideControllerValueAction::m_Brake ) //OverrideBrakeAction 642 | .def_readwrite("Clutch", &OverrideControllerValueAction::m_Clutch ) //OverrideClutchAction 643 | .def_readwrite("ParkingBrake", &OverrideControllerValueAction::m_ParkingBrake ) //OverrideParkingBrakeAction 644 | .def_readwrite("SteeringWheel", &OverrideControllerValueAction::m_SteeringWheel ) //OverrideSteeringWheelAction 645 | .def_readwrite("Gear", &OverrideControllerValueAction::m_Gear ) //OverrideGearAction 646 | ; 647 | // 648 | py::class_>(m,"OverrideGearAction","") 649 | .def_readwrite("active", &OverrideGearAction::active, "") 650 | .def_readwrite("number", &OverrideGearAction::number, "") 651 | ; 652 | // 653 | py::class_>(m,"OverrideParkingBrakeAction","") 654 | .def_readwrite("active", &OverrideParkingBrakeAction::active, "") 655 | .def_readwrite("value", &OverrideParkingBrakeAction::value, "") 656 | ; 657 | // 658 | py::class_>(m,"OverrideSteeringWheelAction","") 659 | .def_readwrite("active", &OverrideSteeringWheelAction::active, "") 660 | .def_readwrite("value", &OverrideSteeringWheelAction::value, "") 661 | ; 662 | // 663 | py::class_>(m,"OverrideThrottleAction","") 664 | .def_readwrite("active", &OverrideThrottleAction::active, "") 665 | .def_readwrite("value", &OverrideThrottleAction::value, "") 666 | ; 667 | // 668 | py::class_>(m,"ParameterAction","") 669 | .def_readwrite("parameterRef", &ParameterAction::parameterRef, "") 670 | .def_readwrite("ParameterAction", &ParameterAction::m_ParameterAction ) // 671 | ; 672 | // 673 | py::class_>(m,"ParameterAddValueRule","") 674 | .def_readwrite("value", &ParameterAddValueRule::value, "") 675 | ; 676 | // 677 | py::class_>(m,"ParameterAssignment","") 678 | .def_readwrite("parameterRef", &ParameterAssignment::parameterRef, "") 679 | .def_readwrite("value", &ParameterAssignment::value, "") 680 | ; 681 | // 682 | py::class_>(m,"ParameterAssignments","") 683 | .def_readwrite("ParameterAssignment", &ParameterAssignments::m_ParameterAssignments ) //ParameterAssignment 684 | ; 685 | // 686 | py::class_>(m,"ParameterCondition","") 687 | .def_readwrite("parameterRef", &ParameterCondition::parameterRef, "") 688 | .def_readwrite("rule", &ParameterCondition::rule, "") 689 | .def_readwrite("value", &ParameterCondition::value, "") 690 | ; 691 | // 692 | py::class_>(m,"ParameterDeclaration","") 693 | .def_readwrite("name", &ParameterDeclaration::name, "") 694 | .def_readwrite("parameterType", &ParameterDeclaration::parameterType, "") 695 | .def_readwrite("value", &ParameterDeclaration::value, "") 696 | ; 697 | // 698 | py::class_>(m,"ParameterDeclarations","") 699 | .def_readwrite("ParameterDeclaration", &ParameterDeclarations::m_ParameterDeclarations ) //ParameterDeclaration 700 | ; 701 | // 702 | py::class_>(m,"ParameterModifyAction","") 703 | .def_readwrite("Rule", &ParameterModifyAction::m_Rule ) //ModifyRule 704 | ; 705 | // 706 | py::class_>(m,"ParameterMultiplyByValueRule","") 707 | .def_readwrite("value", &ParameterMultiplyByValueRule::value, "") 708 | ; 709 | // 710 | py::class_>(m,"ParameterSetAction","") 711 | .def_readwrite("value", &ParameterSetAction::value, "") 712 | ; 713 | // 714 | py::class_>(m,"Pedestrian","") 715 | .def_readwrite("mass", &Pedestrian::mass, "") 716 | .def_readwrite("model", &Pedestrian::model, "") 717 | .def_readwrite("name", &Pedestrian::name, "") 718 | .def_readwrite("pedestrianCategory", &Pedestrian::pedestrianCategory, "") 719 | .def_readwrite("ParameterDeclarations", &Pedestrian::m_ParameterDeclarations ) //ParameterDeclarations 720 | .def_readwrite("BoundingBox", &Pedestrian::m_BoundingBox ) //BoundingBox 721 | .def_readwrite("Properties", &Pedestrian::m_Properties ) //Properties 722 | ; 723 | // 724 | py::class_>(m,"PedestrianCatalogLocation","") 725 | .def_readwrite("Directory", &PedestrianCatalogLocation::m_Directory ) //Directory 726 | ; 727 | // 728 | py::class_>(m,"Performance","") 729 | .def_readwrite("maxAcceleration", &Performance::maxAcceleration, "") 730 | .def_readwrite("maxDeceleration", &Performance::maxDeceleration, "") 731 | .def_readwrite("maxSpeed", &Performance::maxSpeed, "") 732 | ; 733 | // 734 | py::class_>(m,"Phase","") 735 | .def_readwrite("duration", &Phase::duration, "") 736 | .def_readwrite("name", &Phase::name, "") 737 | .def_readwrite("TrafficSignalState", &Phase::m_TrafficSignalStates ) //TrafficSignalState 738 | ; 739 | // 740 | py::class_>(m,"Polyline","") 741 | .def_readwrite("Vertex", &Polyline::m_Vertexs ) //Vertex 742 | ; 743 | // 744 | py::class_>(m,"Position","") 745 | .def_readwrite("Position", &Position::m_Position ) // 746 | ; 747 | // 748 | py::class_>(m,"PositionInLaneCoordinates","") 749 | .def_readwrite("laneId", &PositionInLaneCoordinates::laneId, "") 750 | .def_readwrite("laneOffset", &PositionInLaneCoordinates::laneOffset, "") 751 | .def_readwrite("pathS", &PositionInLaneCoordinates::pathS, "") 752 | ; 753 | // 754 | py::class_>(m,"PositionInRoadCoordinates","") 755 | .def_readwrite("pathS", &PositionInRoadCoordinates::pathS, "") 756 | .def_readwrite("t", &PositionInRoadCoordinates::t, "") 757 | ; 758 | // 759 | py::class_>(m,"PositionOfCurrentEntity","") 760 | .def_readwrite("entityRef", &PositionOfCurrentEntity::entityRef, "") 761 | ; 762 | // 763 | py::class_>(m,"Precipitation","") 764 | .def_readwrite("intensity", &Precipitation::intensity, "") 765 | .def_readwrite("precipitationType", &Precipitation::precipitationType, "") 766 | ; 767 | // 768 | py::class_>(m,"Private","") 769 | .def_readwrite("entityRef", &Private::entityRef, "") 770 | .def_readwrite("PrivateAction", &Private::m_PrivateActions ) //PrivateAction 771 | ; 772 | // 773 | py::class_>(m,"PrivateAction","") 774 | .def_readwrite("PrivateAction", &PrivateAction::m_PrivateAction ) // 775 | ; 776 | // 777 | py::class_>(m,"Properties","") 778 | .def_readwrite("Property", &Properties::m_Propertys ) //Property 779 | .def_readwrite("File", &Properties::m_Files ) //File 780 | ; 781 | // 782 | py::class_>(m,"Property","") 783 | .def_readwrite("name", &Property::name, "") 784 | .def_readwrite("value", &Property::value, "") 785 | ; 786 | // 787 | py::class_>(m,"ReachPositionCondition","") 788 | .def_readwrite("tolerance", &ReachPositionCondition::tolerance, "") 789 | .def_readwrite("Position", &ReachPositionCondition::m_Position ) //Position 790 | ; 791 | // 792 | py::class_>(m,"RelativeDistanceCondition","") 793 | .def_readwrite("entityRef", &RelativeDistanceCondition::entityRef, "") 794 | .def_readwrite("freespace", &RelativeDistanceCondition::freespace, "") 795 | .def_readwrite("relativeDistanceType", &RelativeDistanceCondition::relativeDistanceType, "") 796 | .def_readwrite("rule", &RelativeDistanceCondition::rule, "") 797 | .def_readwrite("value", &RelativeDistanceCondition::value, "") 798 | ; 799 | // 800 | py::class_>(m,"RelativeLanePosition","") 801 | .def_readwrite("entityRef", &RelativeLanePosition::entityRef, "") 802 | .def_readwrite("dLane", &RelativeLanePosition::dLane, "") 803 | .def_readwrite("ds", &RelativeLanePosition::ds, "") 804 | .def_readwrite("offset", &RelativeLanePosition::offset, "") 805 | .def_readwrite("Orientation", &RelativeLanePosition::m_Orientation ) //Orientation 806 | ; 807 | // 808 | py::class_>(m,"RelativeObjectPosition","") 809 | .def_readwrite("entityRef", &RelativeObjectPosition::entityRef, "") 810 | .def_readwrite("dx", &RelativeObjectPosition::dx, "") 811 | .def_readwrite("dy", &RelativeObjectPosition::dy, "") 812 | .def_readwrite("dz", &RelativeObjectPosition::dz, "") 813 | .def_readwrite("Orientation", &RelativeObjectPosition::m_Orientation ) //Orientation 814 | ; 815 | // 816 | py::class_>(m,"RelativeRoadPosition","") 817 | .def_readwrite("entityRef", &RelativeRoadPosition::entityRef, "") 818 | .def_readwrite("ds", &RelativeRoadPosition::ds, "") 819 | .def_readwrite("dt", &RelativeRoadPosition::dt, "") 820 | .def_readwrite("Orientation", &RelativeRoadPosition::m_Orientation ) //Orientation 821 | ; 822 | // 823 | py::class_>(m,"RelativeSpeedCondition","") 824 | .def_readwrite("entityRef", &RelativeSpeedCondition::entityRef, "") 825 | .def_readwrite("rule", &RelativeSpeedCondition::rule, "") 826 | .def_readwrite("value", &RelativeSpeedCondition::value, "") 827 | ; 828 | // 829 | py::class_>(m,"RelativeSpeedToMaster","") 830 | .def_readwrite("speedTargetValueType", &RelativeSpeedToMaster::speedTargetValueType, "") 831 | .def_readwrite("value", &RelativeSpeedToMaster::value, "") 832 | ; 833 | // 834 | py::class_>(m,"RelativeTargetLane","") 835 | .def_readwrite("entityRef", &RelativeTargetLane::entityRef, "") 836 | .def_readwrite("value", &RelativeTargetLane::value, "") 837 | ; 838 | // 839 | py::class_>(m,"RelativeTargetLaneOffset","") 840 | .def_readwrite("entityRef", &RelativeTargetLaneOffset::entityRef, "") 841 | .def_readwrite("value", &RelativeTargetLaneOffset::value, "") 842 | ; 843 | // 844 | py::class_>(m,"RelativeTargetSpeed","") 845 | .def_readwrite("entityRef", &RelativeTargetSpeed::entityRef, "") 846 | .def_readwrite("continuous", &RelativeTargetSpeed::continuous, "") 847 | .def_readwrite("speedTargetValueType", &RelativeTargetSpeed::speedTargetValueType, "") 848 | .def_readwrite("value", &RelativeTargetSpeed::value, "") 849 | ; 850 | // 851 | py::class_>(m,"RelativeWorldPosition","") 852 | .def_readwrite("entityRef", &RelativeWorldPosition::entityRef, "") 853 | .def_readwrite("dx", &RelativeWorldPosition::dx, "") 854 | .def_readwrite("dy", &RelativeWorldPosition::dy, "") 855 | .def_readwrite("dz", &RelativeWorldPosition::dz, "") 856 | .def_readwrite("Orientation", &RelativeWorldPosition::m_Orientation ) //Orientation 857 | ; 858 | // 859 | py::class_>(m,"RoadCondition","") 860 | .def_readwrite("frictionScaleFactor", &RoadCondition::frictionScaleFactor, "") 861 | .def_readwrite("Properties", &RoadCondition::m_Properties ) //Properties 862 | ; 863 | // 864 | py::class_>(m,"RoadNetwork","") 865 | .def_readwrite("LogicFile", &RoadNetwork::m_LogicFile ) //File 866 | .def_readwrite("SceneGraphFile", &RoadNetwork::m_SceneGraphFile ) //File 867 | .def_readwrite("TrafficSignals", &RoadNetwork::m_TrafficSignals ) //TrafficSignals 868 | ; 869 | // 870 | py::class_>(m,"RoadPosition","") 871 | .def_readwrite("roadId", &RoadPosition::roadId, "") 872 | .def_readwrite("s", &RoadPosition::s, "") 873 | .def_readwrite("t", &RoadPosition::t, "") 874 | .def_readwrite("Orientation", &RoadPosition::m_Orientation ) //Orientation 875 | ; 876 | // 877 | py::class_>(m,"Route","") 878 | .def_readwrite("closed", &Route::closed, "") 879 | .def_readwrite("name", &Route::name, "") 880 | .def_readwrite("ParameterDeclarations", &Route::m_ParameterDeclarations ) //ParameterDeclarations 881 | .def_readwrite("Waypoint", &Route::m_Waypoints ) //Waypoint 882 | ; 883 | // 884 | py::class_>(m,"RouteCatalogLocation","") 885 | .def_readwrite("Directory", &RouteCatalogLocation::m_Directory ) //Directory 886 | ; 887 | // 888 | py::class_>(m,"RoutePosition","") 889 | .def_readwrite("RouteRef", &RoutePosition::m_RouteRef ) //RouteRef 890 | .def_readwrite("Orientation", &RoutePosition::m_Orientation ) //Orientation 891 | .def_readwrite("InRoutePosition", &RoutePosition::m_InRoutePosition ) //InRoutePosition 892 | ; 893 | // 894 | py::class_>(m,"RouteRef","") 895 | .def_readwrite("RouteRef", &RouteRef::m_RouteRef ) // 896 | ; 897 | // 898 | py::class_>(m,"RoutingAction","") 899 | .def_readwrite("RoutingAction", &RoutingAction::m_RoutingAction ) // 900 | ; 901 | // 902 | py::class_>(m,"ScenarioObject","") 903 | .def_readwrite("name", &ScenarioObject::name, "") 904 | .def_readwrite("ObjectController", &ScenarioObject::m_ObjectController ) //ObjectController 905 | .def_readwrite("EntityObject", &ScenarioObject::m_EntityObject ) // group read 906 | ; 907 | // 908 | py::class_>(m,"SelectedEntities","") 909 | .def_readwrite("SelectedEntities", &SelectedEntities::m_SelectedEntities ) // 910 | ; 911 | // 912 | py::class_>(m,"Shape","") 913 | .def_readwrite("Shape", &Shape::m_Shape ) // 914 | ; 915 | // 916 | py::class_>(m,"SimulationTimeCondition","") 917 | .def_readwrite("rule", &SimulationTimeCondition::rule, "") 918 | .def_readwrite("value", &SimulationTimeCondition::value, "") 919 | ; 920 | // 921 | py::class_>(m,"SpeedAction","") 922 | .def_readwrite("SpeedActionDynamics", &SpeedAction::m_SpeedActionDynamics ) //TransitionDynamics 923 | .def_readwrite("SpeedActionTarget", &SpeedAction::m_SpeedActionTarget ) //SpeedActionTarget 924 | ; 925 | // 926 | py::class_>(m,"SpeedActionTarget","") 927 | .def_readwrite("SpeedActionTarget", &SpeedActionTarget::m_SpeedActionTarget ) // 928 | ; 929 | // 930 | py::class_>(m,"SpeedCondition","") 931 | .def_readwrite("rule", &SpeedCondition::rule, "") 932 | .def_readwrite("value", &SpeedCondition::value, "") 933 | ; 934 | // 935 | py::class_>(m,"StandStillCondition","") 936 | .def_readwrite("duration", &StandStillCondition::duration, "") 937 | ; 938 | // 939 | py::class_>(m,"Story","") 940 | .def_readwrite("name", &Story::name, "") 941 | .def_readwrite("ParameterDeclarations", &Story::m_ParameterDeclarations ) //ParameterDeclarations 942 | .def_readwrite("Act", &Story::m_Acts ) //Act 943 | ; 944 | // 945 | py::class_>(m,"Storyboard","") 946 | .def_readwrite("Init", &Storyboard::m_Init ) //Init 947 | .def_readwrite("Story", &Storyboard::m_Storys ) //Story 948 | .def_readwrite("StopTrigger", &Storyboard::m_StopTrigger ) //Trigger 949 | ; 950 | // 951 | py::class_>(m,"StoryboardElementStateCondition","") 952 | .def_readwrite("storyboardElementRef", &StoryboardElementStateCondition::storyboardElementRef, "") 953 | .def_readwrite("state", &StoryboardElementStateCondition::state, "") 954 | .def_readwrite("storyboardElementType", &StoryboardElementStateCondition::storyboardElementType, "") 955 | ; 956 | // 957 | py::class_>(m,"Sun","") 958 | .def_readwrite("azimuth", &Sun::azimuth, "") 959 | .def_readwrite("elevation", &Sun::elevation, "") 960 | .def_readwrite("intensity", &Sun::intensity, "") 961 | ; 962 | // 963 | py::class_>(m,"SynchronizeAction","") 964 | .def_readwrite("masterEntityRef", &SynchronizeAction::masterEntityRef, "") 965 | .def_readwrite("TargetPositionMaster", &SynchronizeAction::m_TargetPositionMaster ) //Position 966 | .def_readwrite("TargetPosition", &SynchronizeAction::m_TargetPosition ) //Position 967 | .def_readwrite("FinalSpeed", &SynchronizeAction::m_FinalSpeed ) //FinalSpeed 968 | ; 969 | // 970 | py::class_>(m,"TeleportAction","") 971 | .def_readwrite("Position", &TeleportAction::m_Position ) //Position 972 | ; 973 | // 974 | py::class_>(m,"TimeHeadwayCondition","") 975 | .def_readwrite("entityRef", &TimeHeadwayCondition::entityRef, "") 976 | .def_readwrite("alongRoute", &TimeHeadwayCondition::alongRoute, "") 977 | .def_readwrite("freespace", &TimeHeadwayCondition::freespace, "") 978 | .def_readwrite("rule", &TimeHeadwayCondition::rule, "") 979 | .def_readwrite("value", &TimeHeadwayCondition::value, "") 980 | ; 981 | // 982 | py::class_>(m,"TimeOfDay","") 983 | .def_readwrite("animation", &TimeOfDay::animation, "") 984 | .def_readwrite("dateTime", &TimeOfDay::dateTime, "") 985 | ; 986 | // 987 | py::class_>(m,"TimeOfDayCondition","") 988 | .def_readwrite("dateTime", &TimeOfDayCondition::dateTime, "") 989 | .def_readwrite("rule", &TimeOfDayCondition::rule, "") 990 | ; 991 | // 992 | py::class_>(m,"TimeReference","") 993 | .def_readwrite("TimeReference", &TimeReference::m_TimeReference ) // 994 | ; 995 | // 996 | py::class_>(m,"TimeToCollisionCondition","") 997 | .def_readwrite("alongRoute", &TimeToCollisionCondition::alongRoute, "") 998 | .def_readwrite("freespace", &TimeToCollisionCondition::freespace, "") 999 | .def_readwrite("rule", &TimeToCollisionCondition::rule, "") 1000 | .def_readwrite("value", &TimeToCollisionCondition::value, "") 1001 | .def_readwrite("TimeToCollisionConditionTarget", &TimeToCollisionCondition::m_TimeToCollisionConditionTarget ) //TimeToCollisionConditionTarget 1002 | ; 1003 | // 1004 | py::class_>(m,"TimeToCollisionConditionTarget","") 1005 | .def_readwrite("TimeToCollisionConditionTarget", &TimeToCollisionConditionTarget::m_TimeToCollisionConditionTarget ) // 1006 | ; 1007 | // 1008 | py::class_>(m,"Timing","") 1009 | .def_readwrite("domainAbsoluteRelative", &Timing::domainAbsoluteRelative, "") 1010 | .def_readwrite("offset", &Timing::offset, "") 1011 | .def_readwrite("scale", &Timing::scale, "") 1012 | ; 1013 | // 1014 | py::class_>(m,"TrafficAction","") 1015 | .def_readwrite("TrafficAction", &TrafficAction::m_TrafficAction ) // 1016 | ; 1017 | // 1018 | py::class_>(m,"TrafficDefinition","") 1019 | .def_readwrite("name", &TrafficDefinition::name, "") 1020 | .def_readwrite("VehicleCategoryDistribution", &TrafficDefinition::m_VehicleCategoryDistribution ) //VehicleCategoryDistribution 1021 | .def_readwrite("ControllerDistribution", &TrafficDefinition::m_ControllerDistribution ) //ControllerDistribution 1022 | ; 1023 | // 1024 | py::class_>(m,"TrafficSignalAction","") 1025 | .def_readwrite("TrafficSignalAction", &TrafficSignalAction::m_TrafficSignalAction ) // 1026 | ; 1027 | // 1028 | py::class_>(m,"TrafficSignalCondition","") 1029 | .def_readwrite("name", &TrafficSignalCondition::name, "") 1030 | .def_readwrite("state", &TrafficSignalCondition::state, "") 1031 | ; 1032 | // 1033 | py::class_>(m,"TrafficSignalController","") 1034 | .def_readwrite("delay", &TrafficSignalController::delay, "") 1035 | .def_readwrite("name", &TrafficSignalController::name, "") 1036 | .def_readwrite("reference", &TrafficSignalController::reference, "") 1037 | .def_readwrite("Phase", &TrafficSignalController::m_Phases ) //Phase 1038 | ; 1039 | // 1040 | py::class_>(m,"TrafficSignals","") 1041 | .def_readwrite("TrafficSignalController", &TrafficSignals::m_TrafficSignalControllers ) //TrafficSignalController 1042 | ; 1043 | // 1044 | py::class_>(m,"TrafficSignalControllerAction","") 1045 | .def_readwrite("trafficSignalControllerRef", &TrafficSignalControllerAction::trafficSignalControllerRef, "") 1046 | .def_readwrite("phase", &TrafficSignalControllerAction::phase, "") 1047 | ; 1048 | // 1049 | py::class_>(m,"TrafficSignalControllerCondition","") 1050 | .def_readwrite("trafficSignalControllerRef", &TrafficSignalControllerCondition::trafficSignalControllerRef, "") 1051 | .def_readwrite("phase", &TrafficSignalControllerCondition::phase, "") 1052 | ; 1053 | // 1054 | py::class_>(m,"TrafficSignalState","") 1055 | .def_readwrite("state", &TrafficSignalState::state, "") 1056 | .def_readwrite("trafficSignalId", &TrafficSignalState::trafficSignalId, "") 1057 | ; 1058 | // 1059 | py::class_>(m,"TrafficSignalStateAction","") 1060 | .def_readwrite("name", &TrafficSignalStateAction::name, "") 1061 | .def_readwrite("state", &TrafficSignalStateAction::state, "") 1062 | ; 1063 | // 1064 | py::class_>(m,"TrafficSinkAction","") 1065 | .def_readwrite("radius", &TrafficSinkAction::radius, "") 1066 | .def_readwrite("rate", &TrafficSinkAction::rate, "") 1067 | .def_readwrite("Position", &TrafficSinkAction::m_Position ) //Position 1068 | .def_readwrite("TrafficDefinition", &TrafficSinkAction::m_TrafficDefinition ) //TrafficDefinition 1069 | ; 1070 | // 1071 | py::class_>(m,"TrafficSourceAction","") 1072 | .def_readwrite("radius", &TrafficSourceAction::radius, "") 1073 | .def_readwrite("rate", &TrafficSourceAction::rate, "") 1074 | .def_readwrite("velocity", &TrafficSourceAction::velocity, "") 1075 | .def_readwrite("Position", &TrafficSourceAction::m_Position ) //Position 1076 | .def_readwrite("TrafficDefinition", &TrafficSourceAction::m_TrafficDefinition ) //TrafficDefinition 1077 | ; 1078 | // 1079 | py::class_>(m,"TrafficSwarmAction","") 1080 | .def_readwrite("innerRadius", &TrafficSwarmAction::innerRadius, "") 1081 | .def_readwrite("numberOfVehicles", &TrafficSwarmAction::numberOfVehicles, "") 1082 | .def_readwrite("offset", &TrafficSwarmAction::offset, "") 1083 | .def_readwrite("semiMajorAxis", &TrafficSwarmAction::semiMajorAxis, "") 1084 | .def_readwrite("semiMinorAxis", &TrafficSwarmAction::semiMinorAxis, "") 1085 | .def_readwrite("velocity", &TrafficSwarmAction::velocity, "") 1086 | .def_readwrite("CentralObject", &TrafficSwarmAction::m_CentralObject ) //CentralSwarmObject 1087 | .def_readwrite("TrafficDefinition", &TrafficSwarmAction::m_TrafficDefinition ) //TrafficDefinition 1088 | ; 1089 | // 1090 | py::class_>(m,"Trajectory","") 1091 | .def_readwrite("closed", &Trajectory::closed, "") 1092 | .def_readwrite("name", &Trajectory::name, "") 1093 | .def_readwrite("ParameterDeclarations", &Trajectory::m_ParameterDeclarations ) //ParameterDeclarations 1094 | .def_readwrite("Shape", &Trajectory::m_Shape ) //Shape 1095 | ; 1096 | // 1097 | py::class_>(m,"TrajectoryCatalogLocation","") 1098 | .def_readwrite("Directory", &TrajectoryCatalogLocation::m_Directory ) //Directory 1099 | ; 1100 | // 1101 | py::class_>(m,"TrajectoryFollowingMode","") 1102 | .def_readwrite("followingMode", &TrajectoryFollowingMode::followingMode, "") 1103 | ; 1104 | // 1105 | py::class_>(m,"TransitionDynamics","") 1106 | .def_readwrite("dynamicsDimension", &TransitionDynamics::dynamicsDimension, "") 1107 | .def_readwrite("dynamicsShape", &TransitionDynamics::dynamicsShape, "") 1108 | .def_readwrite("value", &TransitionDynamics::value, "") 1109 | ; 1110 | // 1111 | py::class_>(m,"TraveledDistanceCondition","") 1112 | .def_readwrite("value", &TraveledDistanceCondition::value, "") 1113 | ; 1114 | // 1115 | py::class_>(m,"Trigger","") 1116 | .def_readwrite("ConditionGroup", &Trigger::m_ConditionGroups ) //ConditionGroup 1117 | ; 1118 | // 1119 | py::class_>(m,"TriggeringEntities","") 1120 | .def_readwrite("triggeringEntitiesRule", &TriggeringEntities::triggeringEntitiesRule, "") 1121 | .def_readwrite("EntityRef", &TriggeringEntities::m_EntityRefs ) //EntityRef 1122 | ; 1123 | // 1124 | py::class_>(m,"UserDefinedAction","") 1125 | .def_readwrite("CustomCommandAction", &UserDefinedAction::m_CustomCommandAction ) //CustomCommandAction 1126 | ; 1127 | // 1128 | py::class_>(m,"UserDefinedValueCondition","") 1129 | .def_readwrite("name", &UserDefinedValueCondition::name, "") 1130 | .def_readwrite("rule", &UserDefinedValueCondition::rule, "") 1131 | .def_readwrite("value", &UserDefinedValueCondition::value, "") 1132 | ; 1133 | // 1134 | py::class_>(m,"Vehicle","") 1135 | .def_readwrite("name", &Vehicle::name, "") 1136 | .def_readwrite("vehicleCategory", &Vehicle::vehicleCategory, "") 1137 | .def_readwrite("ParameterDeclarations", &Vehicle::m_ParameterDeclarations ) //ParameterDeclarations 1138 | .def_readwrite("BoundingBox", &Vehicle::m_BoundingBox ) //BoundingBox 1139 | .def_readwrite("Performance", &Vehicle::m_Performance ) //Performance 1140 | .def_readwrite("Axles", &Vehicle::m_Axles ) //Axles 1141 | .def_readwrite("Properties", &Vehicle::m_Properties ) //Properties 1142 | ; 1143 | // 1144 | py::class_>(m,"VehicleCatalogLocation","") 1145 | .def_readwrite("Directory", &VehicleCatalogLocation::m_Directory ) //Directory 1146 | ; 1147 | // 1148 | py::class_>(m,"VehicleCategoryDistribution","") 1149 | .def_readwrite("VehicleCategoryDistributionEntry", &VehicleCategoryDistribution::m_VehicleCategoryDistributionEntrys ) //VehicleCategoryDistributionEntry 1150 | ; 1151 | // 1152 | py::class_>(m,"VehicleCategoryDistributionEntry","") 1153 | .def_readwrite("category", &VehicleCategoryDistributionEntry::category, "") 1154 | .def_readwrite("weight", &VehicleCategoryDistributionEntry::weight, "") 1155 | ; 1156 | // 1157 | py::class_>(m,"Vertex","") 1158 | .def_readwrite("time", &Vertex::time, "") 1159 | .def_readwrite("Position", &Vertex::m_Position ) //Position 1160 | ; 1161 | // 1162 | py::class_>(m,"VisibilityAction","") 1163 | .def_readwrite("graphics", &VisibilityAction::graphics, "") 1164 | .def_readwrite("sensors", &VisibilityAction::sensors, "") 1165 | .def_readwrite("traffic", &VisibilityAction::traffic, "") 1166 | ; 1167 | // 1168 | py::class_>(m,"Waypoint","") 1169 | .def_readwrite("routeStrategy", &Waypoint::routeStrategy, "") 1170 | .def_readwrite("Position", &Waypoint::m_Position ) //Position 1171 | ; 1172 | // 1173 | py::class_>(m,"Weather","") 1174 | .def_readwrite("cloudState", &Weather::cloudState, "") 1175 | .def_readwrite("Sun", &Weather::m_Sun ) //Sun 1176 | .def_readwrite("Fog", &Weather::m_Fog ) //Fog 1177 | .def_readwrite("Precipitation", &Weather::m_Precipitation ) //Precipitation 1178 | ; 1179 | // 1180 | py::class_>(m,"WorldPosition","") 1181 | .def_readwrite("h", &WorldPosition::h, "") 1182 | .def_readwrite("p", &WorldPosition::p, "") 1183 | .def_readwrite("r", &WorldPosition::r, "") 1184 | .def_readwrite("x", &WorldPosition::x, "") 1185 | .def_readwrite("y", &WorldPosition::y, "") 1186 | .def_readwrite("z", &WorldPosition::z, "") 1187 | ; 1188 | // xs:group -> aliased to group definition 1189 | py::class_>(m,"CatalogDefinition","Group CatalogDefinition") 1190 | .def_readwrite("Catalog", &CatalogDefinition::m_Catalog ) //Catalog 1191 | ; 1192 | // xs:group -> aliased to group definition 1193 | py::class_>(m,"EntityObject","Group EntityObject") 1194 | .def_readwrite("CatalogReference", &EntityObject::m_CatalogReference ) //CatalogReference 1195 | .def_readwrite("Vehicle", &EntityObject::m_Vehicle ) //Vehicle 1196 | .def_readwrite("Pedestrian", &EntityObject::m_Pedestrian ) //Pedestrian 1197 | .def_readwrite("MiscObject", &EntityObject::m_MiscObject ) //MiscObject 1198 | ; 1199 | // xs:group -> aliased to group definition 1200 | py::class_>(m,"OpenScenarioCategory","Group OpenScenarioCategory") 1201 | .def_readwrite("ScenarioDefinition", &OpenScenarioCategory::m_ScenarioDefinition ) // group read 1202 | .def_readwrite("CatalogDefinition", &OpenScenarioCategory::m_CatalogDefinition ) // group read 1203 | ; 1204 | // xs:group -> aliased to group definition 1205 | py::class_>(m,"ScenarioDefinition","Group ScenarioDefinition") 1206 | .def_readwrite("ParameterDeclarations", &ScenarioDefinition::m_ParameterDeclarations ) //ParameterDeclarations 1207 | .def_readwrite("CatalogLocations", &ScenarioDefinition::m_CatalogLocations ) //CatalogLocations 1208 | .def_readwrite("RoadNetwork", &ScenarioDefinition::m_RoadNetwork ) //RoadNetwork 1209 | .def_readwrite("Entities", &ScenarioDefinition::m_Entities ) //Entities 1210 | .def_readwrite("Storyboard", &ScenarioDefinition::m_Storyboard ) //Storyboard 1211 | ; 1212 | // 1213 | py::enum_(m,"e_CloudState", py::arithmetic(),"") 1214 | .value(enum2str(e_CloudState::CLOUDY).c_str(),e_CloudState::CLOUDY,"") //cloudy 1215 | .value(enum2str(e_CloudState::FREE).c_str(),e_CloudState::FREE,"") //free 1216 | .value(enum2str(e_CloudState::OVERCAST).c_str(),e_CloudState::OVERCAST,"") //overcast 1217 | .value(enum2str(e_CloudState::RAINY).c_str(),e_CloudState::RAINY,"") //rainy 1218 | .value(enum2str(e_CloudState::SKYOFF).c_str(),e_CloudState::SKYOFF,""); //skyOff 1219 | ; 1220 | py::enum_(m,"e_ConditionEdge", py::arithmetic(),"") 1221 | .value(enum2str(e_ConditionEdge::FALLING).c_str(),e_ConditionEdge::FALLING,"") //falling 1222 | .value(enum2str(e_ConditionEdge::NONE).c_str(),e_ConditionEdge::NONE,"") //none 1223 | .value(enum2str(e_ConditionEdge::RISING).c_str(),e_ConditionEdge::RISING,"") //rising 1224 | .value(enum2str(e_ConditionEdge::RISINGORFALLING).c_str(),e_ConditionEdge::RISINGORFALLING,""); //risingOrFalling 1225 | ; 1226 | py::enum_(m,"e_DynamicsDimension", py::arithmetic(),"") 1227 | .value(enum2str(e_DynamicsDimension::DISTANCE).c_str(),e_DynamicsDimension::DISTANCE,"") //distance 1228 | .value(enum2str(e_DynamicsDimension::RATE).c_str(),e_DynamicsDimension::RATE,"") //rate 1229 | .value(enum2str(e_DynamicsDimension::TIME).c_str(),e_DynamicsDimension::TIME,""); //time 1230 | ; 1231 | py::enum_(m,"e_DynamicsShape", py::arithmetic(),"") 1232 | .value(enum2str(e_DynamicsShape::CUBIC).c_str(),e_DynamicsShape::CUBIC,"") //cubic 1233 | .value(enum2str(e_DynamicsShape::LINEAR).c_str(),e_DynamicsShape::LINEAR,"") //linear 1234 | .value(enum2str(e_DynamicsShape::SINUSOIDAL).c_str(),e_DynamicsShape::SINUSOIDAL,"") //sinusoidal 1235 | .value(enum2str(e_DynamicsShape::STEP).c_str(),e_DynamicsShape::STEP,""); //step 1236 | ; 1237 | py::enum_(m,"e_FollowingMode", py::arithmetic(),"") 1238 | .value(enum2str(e_FollowingMode::FOLLOW).c_str(),e_FollowingMode::FOLLOW,"") //follow 1239 | .value(enum2str(e_FollowingMode::POSITION).c_str(),e_FollowingMode::POSITION,""); //position 1240 | ; 1241 | py::enum_(m,"e_MiscObjectCategory", py::arithmetic(),"") 1242 | .value(enum2str(e_MiscObjectCategory::BARRIER).c_str(),e_MiscObjectCategory::BARRIER,"") //barrier 1243 | .value(enum2str(e_MiscObjectCategory::BUILDING).c_str(),e_MiscObjectCategory::BUILDING,"") //building 1244 | .value(enum2str(e_MiscObjectCategory::CROSSWALK).c_str(),e_MiscObjectCategory::CROSSWALK,"") //crosswalk 1245 | .value(enum2str(e_MiscObjectCategory::GANTRY).c_str(),e_MiscObjectCategory::GANTRY,"") //gantry 1246 | .value(enum2str(e_MiscObjectCategory::NONE).c_str(),e_MiscObjectCategory::NONE,"") //none 1247 | .value(enum2str(e_MiscObjectCategory::OBSTACLE).c_str(),e_MiscObjectCategory::OBSTACLE,"") //obstacle 1248 | .value(enum2str(e_MiscObjectCategory::PARKINGSPACE).c_str(),e_MiscObjectCategory::PARKINGSPACE,"") //parkingSpace 1249 | .value(enum2str(e_MiscObjectCategory::PATCH).c_str(),e_MiscObjectCategory::PATCH,"") //patch 1250 | .value(enum2str(e_MiscObjectCategory::POLE).c_str(),e_MiscObjectCategory::POLE,"") //pole 1251 | .value(enum2str(e_MiscObjectCategory::RAILING).c_str(),e_MiscObjectCategory::RAILING,"") //railing 1252 | .value(enum2str(e_MiscObjectCategory::ROADMARK).c_str(),e_MiscObjectCategory::ROADMARK,"") //roadMark 1253 | .value(enum2str(e_MiscObjectCategory::SOUNDBARRIER).c_str(),e_MiscObjectCategory::SOUNDBARRIER,"") //soundBarrier 1254 | .value(enum2str(e_MiscObjectCategory::STREETLAMP).c_str(),e_MiscObjectCategory::STREETLAMP,"") //streetLamp 1255 | .value(enum2str(e_MiscObjectCategory::TRAFFICISLAND).c_str(),e_MiscObjectCategory::TRAFFICISLAND,"") //trafficIsland 1256 | .value(enum2str(e_MiscObjectCategory::TREE).c_str(),e_MiscObjectCategory::TREE,"") //tree 1257 | .value(enum2str(e_MiscObjectCategory::VEGETATION).c_str(),e_MiscObjectCategory::VEGETATION,"") //vegetation 1258 | .value(enum2str(e_MiscObjectCategory::WIND).c_str(),e_MiscObjectCategory::WIND,""); //wind 1259 | ; 1260 | py::enum_(m,"e_ObjectType", py::arithmetic(),"") 1261 | .value(enum2str(e_ObjectType::MISCELLANEOUS).c_str(),e_ObjectType::MISCELLANEOUS,"") //miscellaneous 1262 | .value(enum2str(e_ObjectType::PEDESTRIAN).c_str(),e_ObjectType::PEDESTRIAN,"") //pedestrian 1263 | .value(enum2str(e_ObjectType::VEHICLE).c_str(),e_ObjectType::VEHICLE,""); //vehicle 1264 | ; 1265 | py::enum_(m,"e_ParameterType", py::arithmetic(),"") 1266 | .value(enum2str(e_ParameterType::BOOLEAN).c_str(),e_ParameterType::BOOLEAN,"") //boolean 1267 | .value(enum2str(e_ParameterType::DATETIME).c_str(),e_ParameterType::DATETIME,"") //dateTime 1268 | .value(enum2str(e_ParameterType::DOUBLE).c_str(),e_ParameterType::DOUBLE,"") //double 1269 | .value(enum2str(e_ParameterType::INTEGER).c_str(),e_ParameterType::INTEGER,"") //integer 1270 | .value(enum2str(e_ParameterType::STRING).c_str(),e_ParameterType::STRING,"") //string 1271 | .value(enum2str(e_ParameterType::UNSIGNEDINT).c_str(),e_ParameterType::UNSIGNEDINT,"") //unsignedInt 1272 | .value(enum2str(e_ParameterType::UNSIGNEDSHORT).c_str(),e_ParameterType::UNSIGNEDSHORT,""); //unsignedShort 1273 | ; 1274 | py::enum_(m,"e_PedestrianCategory", py::arithmetic(),"") 1275 | .value(enum2str(e_PedestrianCategory::ANIMAL).c_str(),e_PedestrianCategory::ANIMAL,"") //animal 1276 | .value(enum2str(e_PedestrianCategory::PEDESTRIAN).c_str(),e_PedestrianCategory::PEDESTRIAN,"") //pedestrian 1277 | .value(enum2str(e_PedestrianCategory::WHEELCHAIR).c_str(),e_PedestrianCategory::WHEELCHAIR,""); //wheelchair 1278 | ; 1279 | py::enum_(m,"e_PrecipitationType", py::arithmetic(),"") 1280 | .value(enum2str(e_PrecipitationType::DRY).c_str(),e_PrecipitationType::DRY,"") //dry 1281 | .value(enum2str(e_PrecipitationType::RAIN).c_str(),e_PrecipitationType::RAIN,"") //rain 1282 | .value(enum2str(e_PrecipitationType::SNOW).c_str(),e_PrecipitationType::SNOW,""); //snow 1283 | ; 1284 | py::enum_(m,"e_Priority", py::arithmetic(),"") 1285 | .value(enum2str(e_Priority::OVERWRITE).c_str(),e_Priority::OVERWRITE,"") //overwrite 1286 | .value(enum2str(e_Priority::PARALLEL).c_str(),e_Priority::PARALLEL,"") //parallel 1287 | .value(enum2str(e_Priority::SKIP).c_str(),e_Priority::SKIP,""); //skip 1288 | ; 1289 | py::enum_(m,"e_ReferenceContext", py::arithmetic(),"") 1290 | .value(enum2str(e_ReferenceContext::ABSOLUTE).c_str(),e_ReferenceContext::ABSOLUTE,"") //absolute 1291 | .value(enum2str(e_ReferenceContext::RELATIVE).c_str(),e_ReferenceContext::RELATIVE,""); //relative 1292 | ; 1293 | py::enum_(m,"e_RelativeDistanceType", py::arithmetic(),"") 1294 | .value(enum2str(e_RelativeDistanceType::CARTESIANDISTANCE).c_str(),e_RelativeDistanceType::CARTESIANDISTANCE,"") //cartesianDistance 1295 | .value(enum2str(e_RelativeDistanceType::LATERAL).c_str(),e_RelativeDistanceType::LATERAL,"") //lateral 1296 | .value(enum2str(e_RelativeDistanceType::LONGITUDINAL).c_str(),e_RelativeDistanceType::LONGITUDINAL,""); //longitudinal 1297 | ; 1298 | py::enum_(m,"e_RouteStrategy", py::arithmetic(),"") 1299 | .value(enum2str(e_RouteStrategy::FASTEST).c_str(),e_RouteStrategy::FASTEST,"") //fastest 1300 | .value(enum2str(e_RouteStrategy::LEASTINTERSECTIONS).c_str(),e_RouteStrategy::LEASTINTERSECTIONS,"") //leastIntersections 1301 | .value(enum2str(e_RouteStrategy::RANDOM).c_str(),e_RouteStrategy::RANDOM,"") //random 1302 | .value(enum2str(e_RouteStrategy::SHORTEST).c_str(),e_RouteStrategy::SHORTEST,""); //shortest 1303 | ; 1304 | py::enum_(m,"e_Rule", py::arithmetic(),"") 1305 | .value(enum2str(e_Rule::EQUALTO).c_str(),e_Rule::EQUALTO,"") //equalTo 1306 | .value(enum2str(e_Rule::GREATERTHAN).c_str(),e_Rule::GREATERTHAN,"") //greaterThan 1307 | .value(enum2str(e_Rule::LESSTHAN).c_str(),e_Rule::LESSTHAN,""); //lessThan 1308 | ; 1309 | py::enum_(m,"e_SpeedTargetValueType", py::arithmetic(),"") 1310 | .value(enum2str(e_SpeedTargetValueType::DELTA).c_str(),e_SpeedTargetValueType::DELTA,"") //delta 1311 | .value(enum2str(e_SpeedTargetValueType::FACTOR).c_str(),e_SpeedTargetValueType::FACTOR,""); //factor 1312 | ; 1313 | py::enum_(m,"e_StoryboardElementState", py::arithmetic(),"") 1314 | .value(enum2str(e_StoryboardElementState::COMPLETESTATE).c_str(),e_StoryboardElementState::COMPLETESTATE,"") //completeState 1315 | .value(enum2str(e_StoryboardElementState::ENDTRANSITION).c_str(),e_StoryboardElementState::ENDTRANSITION,"") //endTransition 1316 | .value(enum2str(e_StoryboardElementState::RUNNINGSTATE).c_str(),e_StoryboardElementState::RUNNINGSTATE,"") //runningState 1317 | .value(enum2str(e_StoryboardElementState::SKIPTRANSITION).c_str(),e_StoryboardElementState::SKIPTRANSITION,"") //skipTransition 1318 | .value(enum2str(e_StoryboardElementState::STANDBYSTATE).c_str(),e_StoryboardElementState::STANDBYSTATE,"") //standbyState 1319 | .value(enum2str(e_StoryboardElementState::STARTTRANSITION).c_str(),e_StoryboardElementState::STARTTRANSITION,"") //startTransition 1320 | .value(enum2str(e_StoryboardElementState::STOPTRANSITION).c_str(),e_StoryboardElementState::STOPTRANSITION,""); //stopTransition 1321 | ; 1322 | py::enum_(m,"e_StoryboardElementType", py::arithmetic(),"") 1323 | .value(enum2str(e_StoryboardElementType::ACT).c_str(),e_StoryboardElementType::ACT,"") //act 1324 | .value(enum2str(e_StoryboardElementType::ACTION).c_str(),e_StoryboardElementType::ACTION,"") //action 1325 | .value(enum2str(e_StoryboardElementType::EVENT).c_str(),e_StoryboardElementType::EVENT,"") //event 1326 | .value(enum2str(e_StoryboardElementType::MANEUVER).c_str(),e_StoryboardElementType::MANEUVER,"") //maneuver 1327 | .value(enum2str(e_StoryboardElementType::MANEUVERGROUP).c_str(),e_StoryboardElementType::MANEUVERGROUP,"") //maneuverGroup 1328 | .value(enum2str(e_StoryboardElementType::STORY).c_str(),e_StoryboardElementType::STORY,""); //story 1329 | ; 1330 | py::enum_(m,"e_TriggeringEntitiesRule", py::arithmetic(),"") 1331 | .value(enum2str(e_TriggeringEntitiesRule::ALL).c_str(),e_TriggeringEntitiesRule::ALL,"") //all 1332 | .value(enum2str(e_TriggeringEntitiesRule::ANY).c_str(),e_TriggeringEntitiesRule::ANY,""); //any 1333 | ; 1334 | py::enum_(m,"e_VehicleCategory", py::arithmetic(),"") 1335 | .value(enum2str(e_VehicleCategory::BICYCLE).c_str(),e_VehicleCategory::BICYCLE,"") //bicycle 1336 | .value(enum2str(e_VehicleCategory::BUS).c_str(),e_VehicleCategory::BUS,"") //bus 1337 | .value(enum2str(e_VehicleCategory::CAR).c_str(),e_VehicleCategory::CAR,"") //car 1338 | .value(enum2str(e_VehicleCategory::MOTORBIKE).c_str(),e_VehicleCategory::MOTORBIKE,"") //motorbike 1339 | .value(enum2str(e_VehicleCategory::SEMITRAILER).c_str(),e_VehicleCategory::SEMITRAILER,"") //semitrailer 1340 | .value(enum2str(e_VehicleCategory::TRAILER).c_str(),e_VehicleCategory::TRAILER,"") //trailer 1341 | .value(enum2str(e_VehicleCategory::TRAIN).c_str(),e_VehicleCategory::TRAIN,"") //train 1342 | .value(enum2str(e_VehicleCategory::TRAM).c_str(),e_VehicleCategory::TRAM,"") //tram 1343 | .value(enum2str(e_VehicleCategory::TRUCK).c_str(),e_VehicleCategory::TRUCK,"") //truck 1344 | .value(enum2str(e_VehicleCategory::VAN).c_str(),e_VehicleCategory::VAN,""); //van 1345 | ; 1346 | py::class_>(m,"Boolean") // union definition 1347 | .def_readwrite("m_parameter",&Boolean::m_parameter) 1348 | .def_readwrite("m_boolean",&Boolean::m_boolean) 1349 | ; 1350 | py::class_>(m,"DateTime") // union definition 1351 | .def_readwrite("m_parameter",&DateTime::m_parameter) 1352 | .def_readwrite("m_dateTime",&DateTime::m_dateTime) 1353 | ; 1354 | py::class_>(m,"Double") // union definition 1355 | .def_readwrite("m_parameter",&Double::m_parameter) 1356 | .def_readwrite("m_double",&Double::m_double) 1357 | ; 1358 | py::class_>(m,"Int") // union definition 1359 | .def_readwrite("m_parameter",&Int::m_parameter) 1360 | .def_readwrite("m_int",&Int::m_int) 1361 | ; 1362 | py::class_>(m,"String") // union definition 1363 | .def_readwrite("m_parameter",&String::m_parameter) 1364 | .def_readwrite("m_string",&String::m_string) 1365 | ; 1366 | py::class_>(m,"UnsignedInt") // union definition 1367 | .def_readwrite("m_parameter",&UnsignedInt::m_parameter) 1368 | .def_readwrite("m_unsignedInt",&UnsignedInt::m_unsignedInt) 1369 | ; 1370 | py::class_>(m,"UnsignedShort") // union definition 1371 | .def_readwrite("m_parameter",&UnsignedShort::m_parameter) 1372 | .def_readwrite("m_unsignedShort",&UnsignedShort::m_unsignedShort) 1373 | ; 1374 | py::class_>(m,"CloudState") // union definition 1375 | .def_readwrite("m_parameter",&CloudState::m_parameter) 1376 | .def_readwrite("cloudState",&CloudState::cloudState) 1377 | ; 1378 | py::class_>(m,"ConditionEdge") // union definition 1379 | .def_readwrite("m_parameter",&ConditionEdge::m_parameter) 1380 | .def_readwrite("conditionEdge",&ConditionEdge::conditionEdge) 1381 | ; 1382 | py::class_>(m,"DynamicsDimension") // union definition 1383 | .def_readwrite("m_parameter",&DynamicsDimension::m_parameter) 1384 | .def_readwrite("dynamicsDimension",&DynamicsDimension::dynamicsDimension) 1385 | ; 1386 | py::class_>(m,"DynamicsShape") // union definition 1387 | .def_readwrite("m_parameter",&DynamicsShape::m_parameter) 1388 | .def_readwrite("dynamicsShape",&DynamicsShape::dynamicsShape) 1389 | ; 1390 | py::class_>(m,"FollowingMode") // union definition 1391 | .def_readwrite("m_parameter",&FollowingMode::m_parameter) 1392 | .def_readwrite("followingMode",&FollowingMode::followingMode) 1393 | ; 1394 | py::class_>(m,"MiscObjectCategory") // union definition 1395 | .def_readwrite("m_parameter",&MiscObjectCategory::m_parameter) 1396 | .def_readwrite("miscObjectCategory",&MiscObjectCategory::miscObjectCategory) 1397 | ; 1398 | py::class_>(m,"ObjectType") // union definition 1399 | .def_readwrite("m_parameter",&ObjectType::m_parameter) 1400 | .def_readwrite("objectType",&ObjectType::objectType) 1401 | ; 1402 | py::class_>(m,"ParameterType") // union definition 1403 | .def_readwrite("m_parameter",&ParameterType::m_parameter) 1404 | .def_readwrite("parameterType",&ParameterType::parameterType) 1405 | ; 1406 | py::class_>(m,"PedestrianCategory") // union definition 1407 | .def_readwrite("m_parameter",&PedestrianCategory::m_parameter) 1408 | .def_readwrite("pedestrianCategory",&PedestrianCategory::pedestrianCategory) 1409 | ; 1410 | py::class_>(m,"PrecipitationType") // union definition 1411 | .def_readwrite("m_parameter",&PrecipitationType::m_parameter) 1412 | .def_readwrite("precipitationType",&PrecipitationType::precipitationType) 1413 | ; 1414 | py::class_>(m,"Priority") // union definition 1415 | .def_readwrite("m_parameter",&Priority::m_parameter) 1416 | .def_readwrite("priority",&Priority::priority) 1417 | ; 1418 | py::class_>(m,"ReferenceContext") // union definition 1419 | .def_readwrite("m_parameter",&ReferenceContext::m_parameter) 1420 | .def_readwrite("referenceContext",&ReferenceContext::referenceContext) 1421 | ; 1422 | py::class_>(m,"RelativeDistanceType") // union definition 1423 | .def_readwrite("m_parameter",&RelativeDistanceType::m_parameter) 1424 | .def_readwrite("relativeDistanceType",&RelativeDistanceType::relativeDistanceType) 1425 | ; 1426 | py::class_>(m,"RouteStrategy") // union definition 1427 | .def_readwrite("m_parameter",&RouteStrategy::m_parameter) 1428 | .def_readwrite("routeStrategy",&RouteStrategy::routeStrategy) 1429 | ; 1430 | py::class_>(m,"Rule") // union definition 1431 | .def_readwrite("m_parameter",&Rule::m_parameter) 1432 | .def_readwrite("rule",&Rule::rule) 1433 | ; 1434 | py::class_>(m,"SpeedTargetValueType") // union definition 1435 | .def_readwrite("m_parameter",&SpeedTargetValueType::m_parameter) 1436 | .def_readwrite("speedTargetValueType",&SpeedTargetValueType::speedTargetValueType) 1437 | ; 1438 | py::class_>(m,"StoryboardElementState") // union definition 1439 | .def_readwrite("m_parameter",&StoryboardElementState::m_parameter) 1440 | .def_readwrite("storyboardElementState",&StoryboardElementState::storyboardElementState) 1441 | ; 1442 | py::class_>(m,"StoryboardElementType") // union definition 1443 | .def_readwrite("m_parameter",&StoryboardElementType::m_parameter) 1444 | .def_readwrite("storyboardElementType",&StoryboardElementType::storyboardElementType) 1445 | ; 1446 | py::class_>(m,"TriggeringEntitiesRule") // union definition 1447 | .def_readwrite("m_parameter",&TriggeringEntitiesRule::m_parameter) 1448 | .def_readwrite("triggeringEntitiesRule",&TriggeringEntitiesRule::triggeringEntitiesRule) 1449 | ; 1450 | py::class_>(m,"VehicleCategory") // union definition 1451 | .def_readwrite("m_parameter",&VehicleCategory::m_parameter) 1452 | .def_readwrite("vehicleCategory",&VehicleCategory::vehicleCategory) 1453 | ; 1454 | // 1455 | py::class_>(m, "xosc", "Main Clazz for interfacing with OpenSCENARIO") 1456 | .def(py::init<>()) 1457 | .def("load", &xosc::load, py::arg("filename")) 1458 | .def("parse", &xosc::parse) 1459 | .def_readwrite("OpenSCENARIO", &xosc::m_OpenSCENARIO); 1460 | } 1461 | 1462 | --------------------------------------------------------------------------------