{"id":14961359,"url":"https://github.com/commonroad/commonroad-scenario-designer","last_synced_at":"2025-04-06T16:11:27.600Z","repository":{"id":154287724,"uuid":"595686551","full_name":"CommonRoad/commonroad-scenario-designer","owner":"CommonRoad","description":"Toolbox for Map Conversion and Scenario Creation for Autonomous Vehicles.","archived":false,"fork":false,"pushed_at":"2024-10-18T06:34:54.000Z","size":115440,"stargazers_count":27,"open_issues_count":3,"forks_count":9,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2024-10-30T00:05:43.807Z","etag":null,"topics":["autonomous-driving","autonomous-vehicles","commonroad","gui","lanelet","lanelet2","map-verification","motion-planning","motion-planning-scenario","opendrive","openstreetmap","osm","scenario-creation","sumo"],"latest_commit_sha":null,"homepage":"https://commonroad.in.tum.de/tools/scenario-designer","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CommonRoad.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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":"2023-01-31T15:53:00.000Z","updated_at":"2024-10-18T06:34:58.000Z","dependencies_parsed_at":"2024-11-08T16:29:45.387Z","dependency_job_id":"f9ed28cf-c221-4109-b8fb-6e3f006ec987","html_url":"https://github.com/CommonRoad/commonroad-scenario-designer","commit_stats":{"total_commits":1788,"total_committers":55,"mean_commits":32.50909090909091,"dds":0.6275167785234899,"last_synced_commit":"b83e24c9ee7147343e7eb180f9164f19e933292f"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CommonRoad%2Fcommonroad-scenario-designer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CommonRoad%2Fcommonroad-scenario-designer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CommonRoad%2Fcommonroad-scenario-designer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CommonRoad%2Fcommonroad-scenario-designer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CommonRoad","download_url":"https://codeload.github.com/CommonRoad/commonroad-scenario-designer/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247509221,"owners_count":20950232,"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":["autonomous-driving","autonomous-vehicles","commonroad","gui","lanelet","lanelet2","map-verification","motion-planning","motion-planning-scenario","opendrive","openstreetmap","osm","scenario-creation","sumo"],"created_at":"2024-09-24T13:24:53.151Z","updated_at":"2025-04-06T16:11:27.551Z","avatar_url":"https://github.com/CommonRoad.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CommonRoad Scenario Designer\n[![PyPI pyversions](https://img.shields.io/pypi/pyversions/commonroad-scenario-designer.svg)](https://pypi.python.org/pypi/commonroad-scenario-designer/)\n[![PyPI version fury.io](https://badge.fury.io/py/commonroad-scenario-designer.svg)](https://pypi.python.org/pypi/commonroad-scenario-designer/)\n[![PyPI download week](https://img.shields.io/pypi/dw/commonroad-scenario-designer.svg?label=PyPI%20downloads)](https://pypi.python.org/pypi/commonroad-scenario-designer/)\n[![PyPI download month](https://img.shields.io/pypi/dm/commonroad-scenario-designer.svg?label=PyPI%20downloads)](https://pypi.python.org/pypi/commonroad-scenario-designer/)\n![Linux](https://img.shields.io/badge/Linux-FCC624?style=for-the-badge\u0026logo=linux\u0026logoColor=black)\n[![PyPI license](https://img.shields.io/pypi/l/commonroad-scenario-designer.svg)](https://pypi.python.org/pypi/commonroad-scenario-designer/)\n\nThis toolbox provides map converters for [OpenStreetMap](https://www.openstreetmap.de/karte.html) (OSM),\n[Lanelet](https://www.mrt.kit.edu/software/libLanelet/libLanelet.html) / [Lanelet2](https://github.com/fzi-forschungszentrum-informatik/Lanelet2),\n[OpenDRIVE](https://www.asam.net/standards/detail/opendrive/), and [SUMO](https://sumo.dlr.de/docs/index.html) to the [CommonRoad](https://commonroad.in.tum.de/)\n(CR) format and for some formats vice versa.\nAdditionally, a graphical user interface (GUI) is included, which allows one to efficiently create and manipulate\nCommonRoad maps and scenarios.\n\n|              Tool              |                         Path                         |                                Functionality                                 |\n|:------------------------------:|:----------------------------------------------------:|:----------------------------------------------------------------------------:|\n|        OpenDRIVE \u003c=\u003e CR        |        `crdesigner/map_conversion/opendrive`         |           Conversion from OpenDRIVE to CommonRoad and vice versa.            |\n|    Lanelet/Lanelet2 \u003c=\u003e CR     |         `crdesigner/map_conversion/lanelet2`         | Conversion from Lanelet2 to CommonRoad \u003cbr /\u003e and from CommonRoad to Lanelet |\n|           OSM =\u003e CR            |          `crdesigner/map_conversion/osm2cr`          |                      Conversion from OSM to CommonRoad.                      |\n|          SUMO \u003c=\u003e CR           |         `crdesigner/map_conversion/sumo_map`         |              Conversion from SUMO to CommonRoad and vice versa.              |\n| OpenDRIVE =\u003e Lanelet/Lanelet2  | `crdesigner/map_conversion/map_conversion_interface` |                    Conversion from OpenDRIVE to Lanelet2                     |\n| Map Verification and Repairing |         `crdesigner/verification_repairing`          |                Verification and Repairing of CommonRoad maps.                |\n|    CR Scenario Designer GUI    |                 `crdesigner/ui/gui`                  |    Multi-functional GUI for map conversion and scenario creation/editing.    |\n\n## Prerequisites and Installation\nWe have tested the toolbox with Python 3.9, 3.10, and 3.11.\nThe toolbox works under Linux.\nBelow we present two ways of installing the CommonRoad Scenario Designer:\n- Only using the CommonRoad Scenario Designer, e.g.,the GUI or integrating the scenario designer APIs into your code\n- Developing code for the CommonRoad Scenario Designer\n\n### Using the CommonRoad Scenario Designer\nThe recommended way of installation if you only want to use the scenario designer (i.e., you do not want to work with the code directly) is to use the PyPI package:\n```bash\npip install commonroad-scenario-designer\n```\n\n### Development\nFirst, clone the repository.\nThe usage of [Poetry](https://python-poetry.org/) is recommended.\nPoetry can be installed using:\n```bash\ncurl -sSL https://install.python-poetry.org | python3 -\n```\nCreate a new Python environment:\n```bash\npoetry shell\npoetry install --with tests,docs,tutorials\n```\nWe recommend to use PyCharm (Professional) as IDE.\n\n### Common Errors during installation\n\n#### Ubuntu\n- **Could not load the Qt platform plugin “xcb” in “” even though it was found:** Error seems to be a missing package - either libxkbcommon-x11 or libxcb-xinerama0 (both can be installed by ```sudo apt install [package_name]```). See for reference [here](https://discuss.pixls.us/t/solved-could-not-load-the-qt-platform-plugin-xcb-in-even-though-it-was-found/17677/9)\n\n\n## Usage\nWe provide different types of usage for the _CommonRoad Scenario Designer_. Subsequently, we present for each component\nthe different usage methods.\n\n### GUI\n\n![GUI_Screenshot](docs/assets/gui_screenshot.png)\n\nThe recommended aspect ratio is 16:9 with a scaling of 100%.\nWithin the GUI, you can also execute the different converters.\nThe GUI can either be activated via a Python API, command line, or executing a Python script.\n\n#### Python Script\n\nFirst you need to activate your python environment with the installed dependencies.\nAfterward, you can start the _CommonRoad Scenario Designer_ and the GUI will open:\n\n```bash\n$ python crdesigner/ui/gui/start_gui.py\n```\n\n#### Command Line\nThe GUI can be started from command line via the following two options:\n```bash\n$ crdesigner\n$ crdesigner gui\n```\nNote that you have to activate first the Python environment in which the CommonRoad Scenario Designer is installed.\nYou can also execute a map conversion via the commandline interface, e.g.,\n`crdesigner --input-file /input/path/l2file.osm  --output-file /output/path/crfile.xml lanelet2cr`.\nThe output of `crdesigner --help` looks as follows:\n```bash\nUsage: crdesigner [OPTIONS] COMMAND [ARGS]...\n\n  Toolbox for Map Conversion and Scenario Creation for Autonomous Vehicles\n\nOptions:\n  --input-file PATH               Path to OpenDRIVE map\n  --output-file PATH              Path where CommonRoad map should be stored\n  --force-overwrite / --no-force-overwrite\n                                  Overwrite existing CommonRoad file\n                                  [default: force-overwrite]\n  --author TEXT                   Your name\n  --affiliation TEXT              Your affiliation, e.g., university, research\n                                  institute, company\n  --tags TEXT                     Tags for the created map\n  --install-completion [bash|zsh|fish|powershell|pwsh]\n                                  Install completion for the specified shell.\n  --show-completion [bash|zsh|fish|powershell|pwsh]\n                                  Show completion for the specified shell, to\n                                  copy it or customize the installation.\n  --help                          Show this message and exit.\n\nCommands:\n  crlanelet2\n  crsumo\n  gui\n  lanelet2cr\n  odrcr\n  osmcr\n  sumocr\n  odrlanelet2`\n```\n\n### Map Converters\nYou can execute the different converters either via command line, calling them within your Python program via an API,\nor the GUI.\n\n#### API\nThe main APIs to execute the pure conversions are located under `crdesigner/map_conversion/map_conversion_interface.py`.\nFor many conversions we provide further APIs, e.g., for downloading a map from OSM.\n\n#### GUI\nThe GUI provides a toolbox with which contains functionality to load maps given in formats other the CommonRoad format\nand to convert CommonRoad maps to other formats or the other formats to the CommonRoad format.\n\n#### Saving Video\n\nProvides the functionality to save the animation of the scenario as a mp4 file.\n\nFor error: \"MovieWriter ffmpeg unavailable; using Pillow instead.\" try to install ffmpeg. This should solve the problem.\n```bash\nsudo apt-install ffmpeg\n```\n\n#### Important information\n\nWhen converting OSM maps, missing information such as the course of individual lanes is estimated during the process.\nThese estimations are imperfect (the OSM maps as well) and often it is advisable to edit the\nscenarios by hand via the GUI.\n\n#### Tutorials\nWe also provide tutorials demonstrating how the different map converter APIs can be used.\nThe tutorials include a jupyter notebook and exemplary Python scripts for each conversion.\n\n## Documentation\nTo generate the documentation from source, first install the necessary dependencies with pip:\n\n```bash\nmkdocs serve\n```\n\nThe documentation can be accessed by opening `public/index.html`.\nThe titles of module pages have to be set manually!\nThe full documentation of the API and introducing examples can also be found [here](https://cps.pages.gitlab.lrz.de/commonroad/commonroad-scenario-designer/).\n\n## Changelog\nA detailed overview about the changes in each version is provided in the [Changelog](https://github.com/CommonRoad/commonroad-scenario-designer/blob/master/CHANGELOG.md).\n\n## Bug and feature reporting\nThis release (v0.9.3) is still a BETA version.\nIn case you detect a bug or you want to suggest a new feature, please report it in our [forum](https://github.com/CommonRoad/commonroad-scenario-designer/discussions).\nIf you want to contribute to the toolbox, you can also post it in the [forum](https://github.com/CommonRoad/commonroad-scenario-designer/discussions).\n\n## Authors\nResponsible: Sebastian Maierhofer, Sebastian Mair\nContribution (in alphabetic order by last name): Daniel Asch, Hamza Begic, Mohamed Bouhali, Florian Braunmiller,\nTim Dang, Setenay Eryasar, Behtarin Ferdousi, Maximilian Fruehauf, Marcus Gabler, Fabian Hoeltke,\nJulian Hohenadel, Tom Irion, Aaron Kaefer, Anton Kluge,\nDavid Le, Gustaf Lindgren, Sarra Ben Mohamed, Benjamin Orthen, Luisa Ortner, Louis Pröbstle, Benedikt Reinhard,\nMaximilian Rieger, Nikolaos Sotirakis, Til Stotz, Stefan Urban, Max Winklhofer\n\n## Credits\nWe gratefully acknowledge partial financial support by\n- DFG (German Research Foundation) Priority Program SPP 1835 Cooperative Interacting Automobiles\n- BMW Group within the Car@TUM project\n- Central Innovation Programme of the German Federal Government under grant no. ZF4086007BZ8\n\n## Citation\n**If you use our code for research, please consider to cite our papers:**\n```\n@inproceedings{Maierhofer2023,\n\tauthor = {Maierhofer, Sebastian and  Ballnath, Yannick and  Althoff, Matthias},\n\ttitle = {Map Verification and Repairing Using Formalized Map Specifications},\n\tbooktitle = {2023 IEEE International Conference on Intelligent Transportation Systems (ITSC)},\n\tyear = {2023},\n\tpages = {},\n\tabstract = {Autonomous vehicles benefit from correct maps to participate in traffic safely, but often maps are not verified before their usage.\n                    We address this problem by providing an approach to verify and repair maps automatically based on a formalization of map specifications in higher-order logic.\n                    Unlike previous work, we provide a collection of map specifications.\n                    We can verify and repair all possible map parts, from geometric to semantic elements, e.g., adjacency relationships, lane types, road boundaries, traffic signs, and intersections.\n                    Due to the modular design of our approach, one can integrate additional logics.\n                    We compare ontologies, answer set programming, and satisfiability modulo theories with our higher-order logic verification algorithm.\n                    Our evaluation shows that our approach can efficiently verify and repair maps from several data sources and of different map sizes.\n                    We provide our tool as part of the CommonRoad Scenario Designer toolbox available at commonroad.in.tum.de.},\n}\n```\n```\n@inproceedings{Maierhofer2021,\n\tauthor = {Sebastian Maierhofer, Moritz Klischat, and Matthias Althoff},\n\ttitle = {CommonRoad Scenario Designer: An Open-Source Toolbox for Map Conversion and Scenario Creation for Autonomous Vehicles},\n\tbooktitle = {Proc. of the IEEE Int. Conf. on Intelligent Transportation Systems },\n\tyear = {2021},\n\tpages = {3176-3182},\n\tabstract = {Maps are essential for testing autonomous driving functions. Several map and scenario formats are\n                    available. However, they are usually not compatible with each other, limiting their usability.\n                    In this paper, we address this problem using our open-source toolbox that provides map converters\n                    from different formats to the well-known CommonRoad format. Our toolbox provides converters for\n                    OpenStreetMap, Lanelet/Lanelet2, OpenDRIVE, and SUMO. Additionally, a graphical user interface is\n                    included, which allows one to efficiently create and manipulate CommonRoad maps and scenarios.\n                    We demonstrate the functionality of the toolbox by creating CommonRoad maps and scenarios based on\n                    other map formats and manually-created map data.},\n}\n```\n**If you use the OpenDRIVE to CommonRoad conversion for your paper, please consider to additionally cite the corresponding paper:**\n```\n@inproceedings{Althoff2018b,\n\tauthor = {Matthias Althoff and Stefan Urban and Markus Koschi},\n\ttitle = {Automatic Conversion of Road Networks from OpenDRIVE to Lanelets},\n\tbooktitle = {Proc. of the IEEE International Conference on Service Operations and Logistics, and Informatics},\n\tyear = {2018},\n\tpages = {157--162},\n\tabstract = {Detailed road maps are an important building block for autonomous driving. They accelerate creating a\n\t            semantic environment model within the vehicle and serve as a backup solution when sensors are occluded\n\t            or otherwise impaired. Due to the required detail of maps for autonomous driving and virtual test\n\t            drives, creating such maps is quite labor-intensive. While some detailed maps for fairly large regions\n\t            already exist, they are often in different formats and thus cannot be exchanged between companies and\n\t            research institutions. To address this problem, we present the first publicly available converter from\n\t            the OpenDRIVE format to lanelets—both representations are among the most popular map formats.\n\t            We demonstrate the capabilities of the converter by using publicly available maps.},\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommonroad%2Fcommonroad-scenario-designer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcommonroad%2Fcommonroad-scenario-designer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommonroad%2Fcommonroad-scenario-designer/lists"}