# libOpenDRIVE **Repository Path**: wujiyoudao/libOpenDRIVE ## Basic Information - **Project Name**: libOpenDRIVE - **Description**: Small, lightweight C++ library for handling OpenDRIVE files - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-02-02 - **Last Updated**: 2022-02-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # libOpenDRIVE libOpenDRIVE is a lightweight, fast C++ library providing OpenDRIVE file parsing and 3D model generation. It's dependency-free, small and includes a [web-based viewer](http://sebastian-pagel.net). It can be easily integrated in other projects and can be compiled to a WebAssembly library. A core function is the parsing of OpenDRIVE files and the generation of 3D models. The library targets OpenDRIVE version 1.4. ![viewer-demo](https://user-images.githubusercontent.com/42587026/129762731-3c89900b-979e-436a-9a55-4c8745baa945.png) ## Build To build the library simply run: ```bash mkdir build && cd build cmake .. make ``` This also builds an executable to test the library: ```bash ./build/test-xodr Viewer/data.xodr ``` ## WebAssembly Install [emsdk](https://github.com/emscripten-core/emsdk) and run the following commands to build the WebAssembly library: ```bash mkdir build && pushd build emcmake cmake .. emmake make emcc -std=c++14 -O3 -Wall -I ../ \ libOpenDrive.a ../Embind.cpp \ --bind \ -s ENVIRONMENT=web \ -s MODULARIZE=1 \ -s 'EXPORT_NAME="libOpenDrive"' \ -s EXPORTED_RUNTIME_METHODS='["cwrap"]' \ -s FORCE_FILESYSTEM=1 \ -s ALLOW_MEMORY_GROWTH=1 \ -o ../Viewer/libOpenDrive.js popd ``` ## Viewer To use the included viewer first build the WebAssembly library and then run a webserver in the _Viewer/_ directory (e.g. `python3 -m http.server`). Or you can test the [viewer online](https://sebastian-pagel.net).