{"id":13716429,"url":"https://github.com/pageldev/libOpenDRIVE","last_synced_at":"2025-05-07T05:33:06.560Z","repository":{"id":39253858,"uuid":"310851592","full_name":"pageldev/libOpenDRIVE","owner":"pageldev","description":"Small, lightweight C++ library for handling OpenDRIVE files","archived":false,"fork":false,"pushed_at":"2025-01-20T18:08:20.000Z","size":1109,"stargazers_count":437,"open_issues_count":15,"forks_count":145,"subscribers_count":22,"default_branch":"main","last_synced_at":"2025-05-03T10:01:54.450Z","etag":null,"topics":["cpp","library","opendrive","xodr"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pageldev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-07T13:31:15.000Z","updated_at":"2025-04-30T05:45:48.000Z","dependencies_parsed_at":"2023-11-24T21:24:17.085Z","dependency_job_id":"d88a7d1f-91ef-4e00-b317-bd49218ab054","html_url":"https://github.com/pageldev/libOpenDRIVE","commit_stats":null,"previous_names":["pageldev/libopendrive"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pageldev%2FlibOpenDRIVE","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pageldev%2FlibOpenDRIVE/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pageldev%2FlibOpenDRIVE/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pageldev%2FlibOpenDRIVE/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pageldev","download_url":"https://codeload.github.com/pageldev/libOpenDRIVE/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252793661,"owners_count":21805057,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","library","opendrive","xodr"],"created_at":"2024-08-03T00:01:10.386Z","updated_at":"2025-05-07T05:33:06.546Z","avatar_url":"https://github.com/pageldev.png","language":"C++","readme":"# libOpenDRIVE\n\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.7771708.svg)](https://doi.org/10.5281/zenodo.7771708)\n\n\nlibOpenDRIVE is a **lightweight, dependency-free, fast C++ library** providing OpenDRIVE file parsing and 3D model generation. \n\nIt's small and can be easily integrated in other projects. A core function is the parsing of OpenDRIVE files and the generation of 3D models. The library targets OpenDRIVE version 1.4.\n\n## Example\nHere's an example of how code using libOpenDRIVE looks. For a more complete example refer to [tests/test.cpp](tests/test.cpp).\n\n```c++\n// load map\nodr::OpenDriveMap odr_map(\"tests/test.xodr\");\n\n// iterate roads\nfor (odr::Road road : odr_map.get_roads())\n    std::cout \u003c\u003c \"road: \" \u003c\u003c road.id \u003c\u003c \" length: \" \u003c\u003c road.length \u003c\u003c std::endl;\n\n// get xyz point for road coordinates\nodr::Road odr_road = odr_map.get_road(\"17\");\nodr::Vec3D pt_xyz = odr_road.get_xyz(2.1 /*s*/, 1.0 /*t*/, 0.0 /*h*/);\n\n// access road network attributes\nstd::string lane_type = odr_road.get_lanesection(0.0).get_lane(-1).type;\n\n// use routing graph\nodr::RoutingGraph routing_graph = odr_map.get_routing_graph();\nodr::LaneKey from(\"17\" /*road id*/, 0.0 /*lane section s0*/, 1 /*lane id*/);\nodr::LaneKey to(\"41\", 0.0, -1);\nstd::vector\u003codr::LaneKey\u003e path = routing_graph.shortest_path(from, to);\n\n// get road network mesh\nodr::RoadNetworkMesh road_network_mesh = odr_map.get_road_network_mesh(0.1 /*eps*/);\nstd::cout \u003c\u003c road_network_mesh.get_mesh().get_obj() \u003c\u003c std::endl;\n```\n\n## Build\nTo build a static library by default, simply run:\n```bash\nmkdir build\ncd build\ncmake ..\nmake\n```\n\nIf requiring a shared library, use:\n```bash\ncmake -DBUILD_SHARED_LIBS=ON ..\n```\n\n## Viewer\nCheck out the viewer at [odrviewer.io](https://odrviewer.io) which uses this library. Use the [odrviewer project](https://github.com/pageldev/odrviewer) to post issues and feature requests for odrviewer.io.\n\n\u003csub\u003eInfo: The Viewer and WebAssembly bindings are no longer part of this project. This is to focus more on the library functionality and avoid having to keep the bindings up-to-date. Use [v0.3.0](https://github.com/pageldev/libOpenDRIVE/releases/tag/0.3.0) to get the last version that still includes Viewer and WebAssembly bindings. \u003c/sub\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpageldev%2FlibOpenDRIVE","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpageldev%2FlibOpenDRIVE","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpageldev%2FlibOpenDRIVE/lists"}