{"id":13720149,"url":"https://github.com/carla-simulator/scenario_runner","last_synced_at":"2025-06-13T05:06:54.682Z","repository":{"id":33460799,"uuid":"158166716","full_name":"carla-simulator/scenario_runner","owner":"carla-simulator","description":"Traffic scenario definition and execution engine","archived":false,"fork":false,"pushed_at":"2025-06-07T18:47:59.000Z","size":176400,"stargazers_count":586,"open_issues_count":169,"forks_count":384,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-06-08T22:26:53.388Z","etag":null,"topics":["carla","openscenario","traffic-scenario"],"latest_commit_sha":null,"homepage":"https://scenario-runner.readthedocs.io/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/carla-simulator.png","metadata":{"files":{"readme":"Docs/README_OpenSCENARIO_2.0.md","changelog":null,"contributing":"Docs/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"Docs/CODE_OF_CONDUCT.md","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}},"created_at":"2018-11-19T05:29:13.000Z","updated_at":"2025-06-07T10:29:57.000Z","dependencies_parsed_at":"2024-05-21T16:45:31.593Z","dependency_job_id":"b912fd87-a005-4b24-81a8-3127af5d5f7d","html_url":"https://github.com/carla-simulator/scenario_runner","commit_stats":{"total_commits":500,"total_committers":51,"mean_commits":9.803921568627452,"dds":0.5,"last_synced_commit":"f1a94516db57612f22d5c42e597e350e781b9224"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/carla-simulator/scenario_runner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carla-simulator%2Fscenario_runner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carla-simulator%2Fscenario_runner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carla-simulator%2Fscenario_runner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carla-simulator%2Fscenario_runner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/carla-simulator","download_url":"https://codeload.github.com/carla-simulator/scenario_runner/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carla-simulator%2Fscenario_runner/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259584826,"owners_count":22880202,"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":["carla","openscenario","traffic-scenario"],"created_at":"2024-08-03T01:01:00.340Z","updated_at":"2025-06-13T05:06:54.656Z","avatar_url":"https://github.com/carla-simulator.png","language":"Python","funding_links":[],"categories":["Simulation","Applications","Official Repositories 🏢","🛡️ Safety \u0026 Testing"],"sub_categories":["Version Control"],"readme":"# osc2-runner\n\nWe use OpenScenario 2.0 as the scenario description language specification to design and implement the corresponding compilation system, which can automatically convert the test scenario described with OpenScenario 2.0 into a test scenario based on scenario runner, so as to use carla for autonomous driving testing.\n\n## Installation\n\n**1. Install JDK**\n\n```\nsudo apt install openjdk-17-jdk\n```    \nConfirm installation:\n```\n$ java -version\n```\nOutput:\n```\nopenjdk version \"17.0.5\" 2022-10-18\nOpenJDK Runtime Environment (build 17.0.5+8-Ubuntu-2ubuntu120.04)\nOpenJDK 64-Bit Server VM (build 17.0.5+8-Ubuntu-2ubuntu120.04, mixed mode, sharing)\n```\n\n**3、Install Antlr 4.10.1**\n\n```\nsudo apt install curl\ncurl -O https://www.antlr.org/download/antlr-4.10.1-complete.jar\n```\n\nPut the .jar file into local/lib\n```\n$ sudo cp antlr-4.10.1-complete.jar /usr/local/lib/\n```\n\nThe following three steps are used to configure environment variables and create aliases so that antlr4 can be easily used from the command line.\n```\n$ sudo gedit ~/.bashrc\n```\nAdd the following at the end:\n```\nexport CLASSPATH=\".:/usr/local/lib/antlr-4.10.1-complete.jar:$CLASSPATH\"\nalias antlr4='java -jar /usr/local/lib/antlr-4.10.1-complete.jar'\nalias grun='java org.antlr.v4.gui.TestRig'\n```\nAnd then:\n```\nsource ~/.bashrc\n```\n\nEnter antlr4 for verifying in the terminal:\n```\n$ antlr4\nANTLR Parser Generator  Version 4.10.1\n -o ___              specify output directory where all output is generated\n -lib ___            specify location of grammars, tokens files\n -atn                generate rule augmented transition network diagrams\n -encoding ___       specify grammar file encoding; e.g., euc-jp\n -message-format ___ specify output style for messages in antlr, gnu, vs2005\n -long-messages      show exception details when available for errors and warnings\n -listener           generate parse tree listener (default)\n -no-listener        don't generate parse tree listener\n -visitor            generate parse tree visitor\n -no-visitor         don't generate parse tree visitor (default)\n -package ___        specify a package/namespace for the generated code\n -depend             generate file dependencies\n -D\u003coption\u003e=value    set/override a grammar-level option\n -Werror             treat warnings as errors\n -XdbgST             launch StringTemplate visualizer on generated code\n -XdbgSTWait         wait for STViz to close before continuing\n -Xforce-atn         use the ATN simulator for all predictions\n -Xlog               dump lots of logging info to antlr-timestamp.log\n -Xexact-output-dir  all output goes into -o dir regardless of paths/package\n```\n\n**4、Install antlr4 runtime**\n```\npip install antlr4-python3-runtime==4.10\n```\n\n**5、Install python dependency**\n```\npip install -r requirements.txt\n```\n\n**6.Install graphviz**\n\n```\nsudo apt-get install graphviz\n```\n\n\n**7、Configurate carla**\n    \n(1) Download [carla release](https://carla-releases.s3.eu-west-3.amazonaws.com/Linux/CARLA_0.9.13.tar.gz)\n\n\n(2) Extract the carla installation package to a directory.\n\nOn Ubuntu systems, the Carla environment variable is configured as follows:\n```bash\nexport CARLA_ROOT=/home/dut-aiid/CARLA_0.9.13\nexport PYTHONPATH=$PYTHONPATH:${CARLA_ROOT}/PythonAPI/carla/dist/carla-0.9.13-py3.7-linux-x86_64.egg:${CARLA_ROOT}/PythonAPI/carla/agents:${CARLA_ROOT}/PythonAPI/carla/agents/navigation:${CARLA_ROOT}/PythonAPI/carla:${CARLA_ROOT}/PythonAPI/examples:${CARLA_ROOT}/PythonAPI\n```\n\n## Quickstart\n\n**1、Run carla**\n\n```bash\ncd /home/xxx/CARLA_0.9.13\n./CarlaUE4.sh\n```\n\n**2、Start manual_control**\n\n```\npython manual_control.py -a --rolename=ego_vehicle\n```\n\n**3、Run a OpenSCENARIO 2.0 scenario**\n```\npython scenario_runner.py --sync  --openscenario2 srunner/examples/cut_in_and_slow_right.osc --reloadWorld \n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarla-simulator%2Fscenario_runner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarla-simulator%2Fscenario_runner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarla-simulator%2Fscenario_runner/lists"}