{"id":32527645,"url":"https://github.com/commonroad/commonroad-rule-simplification","last_synced_at":"2025-10-28T10:48:42.941Z","repository":{"id":319130244,"uuid":"1077686883","full_name":"CommonRoad/commonroad-rule-simplification","owner":"CommonRoad","description":null,"archived":false,"fork":false,"pushed_at":"2025-10-16T16:17:02.000Z","size":877,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-17T18:59:54.304Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CommonRoad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-16T15:39:25.000Z","updated_at":"2025-10-16T16:17:05.000Z","dependencies_parsed_at":"2025-10-18T06:22:58.719Z","dependency_job_id":"113e1cc4-79bd-48b7-b6cb-1ae782737b09","html_url":"https://github.com/CommonRoad/commonroad-rule-simplification","commit_stats":null,"previous_names":["commonroad/commonroad-rule-simplification"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/CommonRoad/commonroad-rule-simplification","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CommonRoad%2Fcommonroad-rule-simplification","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CommonRoad%2Fcommonroad-rule-simplification/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CommonRoad%2Fcommonroad-rule-simplification/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CommonRoad%2Fcommonroad-rule-simplification/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CommonRoad","download_url":"https://codeload.github.com/CommonRoad/commonroad-rule-simplification/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CommonRoad%2Fcommonroad-rule-simplification/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281425542,"owners_count":26499031,"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","status":"online","status_checked_at":"2025-10-28T02:00:06.022Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-10-28T10:48:21.879Z","updated_at":"2025-10-28T10:48:42.935Z","avatar_url":"https://github.com/CommonRoad.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"## CommonRoad Rule Simplification: Extract Scenario-Specific Knowledge to Simplify Traffic Rules\n\nCommonRoad Rule Simplification is a toolbox for simplifying complex traffic rules for concrete traffic situations in the CommonRoad framework.\nThe simplification is based on scenario-specific knowledge, which is extracted from the CommonRoad scenario.\nBy augmenting the traffic rule specifications with this knowledge, we obtain a simplified rule set that is tailored to the concrete traffic situation at hand.\nThus, the simplified rules are more efficient to use in subsequent motion planning tasks.\n\n### System Requirements\n\nThe software is written in Python 3.10 and C++-20, and was tested on Ubuntu 22.04.\n\n### Building from Source\n\n\u003e **Note:** If you want to use this package with the PyPI versions of its dependencies, you need to compile it using GCC 10 (which is the compiler we use to create the PyPI wheels).\n\u003e Otherwise, nanobind will not be able to detect the Python bindings of the dependencies correctly (see [here](https://nanobind.readthedocs.io/en/latest/faq.html#how-can-i-avoid-conflicts-with-other-projects-using-nanobind)).\n\u003e To do so, indicate the path to GCC 10 in the `CXX` environment variable before building the code (e.g. `export CXX=/usr/bin/g++-10`).\n\u003e Note that you need to start with a fresh build directory if you change the compiler, as CMake caches the compiler used for the build.\n\u003e Alternatively, if you cannot use GCC 10 for some reason, you can install the following packages from source using the compiler of your choice:\n\u003e [commonroad-clcs](https://github.com/CommonRoad/commonroad-clcs).\n\u003e Make sure to use the correct versions of these packages as specified in the `pyproject.toml` file.\n\n#### Third-Party Dependencies\n\nWhile most of these dependencies are added automatically during the build process, you can install them manually via\nyour package manager to speed up the build process.\n\n**Manual installation recommended to speed up the build:**\n\n- [Boost](https://www.boost.org/)\n\n**Manual installation optional:**\n\n- [Eigen3](https://eigen.tuxfamily.org/)\n- [spdlog](https://github.com/gabime/spdlog)\n\n**Optional dependencies:**\n\n- [GTest](https://google.github.io/googletest/) (optional: for building unit tests)\n\nThe additional Python dependencies are listed in `pyproject.toml`.\n\n#### Building the Code\n\n1. We strongly recommend installing this package in a virtual Python environment using one of the following tools:\n  - [uv](https://docs.astral.sh/uv/)\n  - [Anaconda](https://www.anaconda.com/)\n  - [Miniconda](https://docs.conda.io/en/latest/miniconda.html)\n\n2. Install C++ dependencies:\n\n```bash\nsudo apt-get update\nsudo apt-get install libboost-all-dev libeigen3-dev libspdlog-dev libgtest-dev libgmock-dev\n```\n\n3. Build the C++ extension and install the Python package:\n\n```bash\npip install -v .\n```\n\nor, if you are using `uv`:\n\n```bash\nuv sync -v\n```\n\nThis will build the Python bindings (knowledge_extraction_core) required for C++-boosted computations.\n\n\u003e **Note**: The `-v` flag (verbose) prints information about the build progress\n\n**Optional:**\n\n- To build the code in Debug mode, add the flag\n  - `--config-settings=cmake.build-type=\"Debug\"` if you are using `pip`\n  - `--config-settings-package cr_rule_simplification:cmake.build-type=\"Debug\"` if you are using `uv`\n\nSee [here](https://scikit-build-core.readthedocs.io/en/latest/configuration.html#configuring-cmake-arguments-and-defines)\nfor further information on configuring CMake arguments via our build system (`scikit-build-core`).\n\n\u003e **Note**: `scikit-build-core` uses `ninja` for building the C++ extension by default.\n\u003e Thus, the build is automatically parallelized using all available CPU cores.\n\u003e If you want to explicitly configure the number of build jobs, you can do so by passing the\n\u003e flag `--config-settings=cmake.define.CMAKE_BUILD_PARALLEL_LEVEL=$BUILD_JOBS` to the `pip` command, where `$BUILD_JOBS`\n\u003e is the number of parallel jobs to use.\n\u003e For `uv`, use `--config-settings-package cr_rule_simplification:cmake.define.CMAKE_BUILD_PARALLEL_LEVEL=$BUILD_JOBS`.\n\u003e See [here](https://scikit-build-core.readthedocs.io/en/latest/faqs.html#multithreaded-builds) for further details.\n\n\u003e **Note**: Building the package in Debug mode (see above) significantly increases the computation time of the C++\n\u003e backend. Please make sure you are building in Release mode (default setting) if you require fast computations.\n\nYou can also have a look at the [Dockerfile](./ci/docker/ci/Dockerfile) for the CI pipeline to see how to set up a\nconsistent development environment on Debian/Ubuntu.\n\n### Running the Code\n\nRun the example script `main.py` to compute specification-compliant reachable sets:\n\n```bash\npython main.py\n```\n\nor, if you are using `uv`:\n\n```bash\nuv run main.py\n```\n\n### Possible Installation Problems\n\n- Protobuf error like this `CHECK failed: GeneratedDatabase()-\u003eAdd(encoded_file_descriptor, size)`:\n  this is caused by the `commonroad_cpp` Python package and the version of the environment model used by our C++ code\n  trying to register the same type with the same protobuf instance twice. To work around this issue, you can add the\n  `--config-settings=cmake.define.COMMONROAD_SYSTEM_PROTOBUF=OFF` option to the `pip install` command.\n\n### Documentation\n\nTo generate the documentation, first make sure that you have installed the documentation dependencies listed in `pyproject.toml`.\nThen, you can generate the documentation by running:\n```bash\nmkdocs build\n```\n\nTo view the documentation, you can start a local server by running:\n```bash\nmkdocs serve\n```\n\n### Development\n\nCheck out the [README_FOR_DEVS](./readme/README_FOR_DEVS.md) for information on setting up your development environment.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommonroad%2Fcommonroad-rule-simplification","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcommonroad%2Fcommonroad-rule-simplification","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommonroad%2Fcommonroad-rule-simplification/lists"}