run-openscenario
하는 일
이 스킬은 많은 주행 도구가 사용하는 표준 OpenSCENARIO 형식의 시나리오 파일을 CARLA 시뮬레이터에서 실행합니다. 공유된 시나리오 파일로 자율주행 소프트웨어를 테스트하는 엔지니어를 위한 스킬입니다.
사용하는 경우
- ✓다른 도구에서 만든 OpenSCENARIO 파일을 CARLA에서 실행하고 싶을 때.
- ✓실행하기 전에 시나리오 파일의 오류를 확인하고 싶을 때.
- ✓CARLA가 표준의 어느 부분을 지원하는지 알아야 할 때.
스킬 링크
https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/scenario-runner/run-openscenario/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 OpenSCENARIO 파일을 CARLA에서 실행하기 전에 오류를 확인하고, 지원되지 않는 기능이 있으면 알려 줄 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 표준의 규칙에 따라 파일을 확인한 다음, 맞는 옵션으로 실행을 시작합니다. 이런 파일은 대부분 자체 지도와 차량을 포함하므로, 별도의 지도 이름이 필요하지 않습니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Run an OpenSCENARIO file
Paths.
scripts/…andreferences/…below are relative to the directory holding this SKILL.md. Your working directory is the user's project, not that directory, so prefix them with its absolute path or the command is not found.
ScenarioRunner speaks two unrelated standards that happen to share a name:
| OpenSCENARIO 1.x | OpenSCENARIO 2.0 | |
|---|---|---|
| Extension | .xosc |
.osc |
| Format | XML (<Storyboard>, <Act>, <Maneuver>) |
a domain-specific language |
| Flag | --openscenario |
--openscenario2 |
| Implementation | srunner/tools/openscenario_parser.py |
srunner/osc2/ (ANTLR grammar) |
| Maturity | broad, partial | experimental |
They are not versions of each other and no file works with both flags.
Unlike Python scenarios, an OSC file carries its own map, entities and ego —
so there is no --scenario name, no town lookup, and --reloadWorld is implied by
whatever <RoadNetwork> says.
Instructions
Progress:
- [ ] Step 1: Check prerequisites (bash scripts/check_env.sh)
- [ ] Step 2: Find or validate the file (list / validate)
- [ ] Step 3: Run it with the right flag
- [ ] Step 4: Drive or observe the ego if the file expects an external controller
Step 2: Find and validate
source scripts/env.sh
bash scripts/run_openscenario.sh list # bundled .xosc and .osc, per branch
bash scripts/run_openscenario.sh validate path/to.xosc # schema + map + entity check, no server
validate is worth running first: it resolves the <RoadNetwork><LogicFile> map
against the server's map list, checks catalog references, and reports the
ParameterDeclarations you can override — all of which otherwise fail several
seconds into a run, after the world has already been reloaded.
Step 3: Run
source scripts/env.sh
# OpenSCENARIO 1.x
bash scripts/run_openscenario.sh run "$SCENARIO_RUNNER_ROOT/srunner/examples/FollowLeadingVehicle.xosc"
# with global parameter overrides — note the 'key: value' comma-separated form
PARAMS='leadingSpeed: 8.0, egoSpeed: 12.0' \
bash scripts/run_openscenario.sh run .../FollowLeadingVehicle.xosc
# OpenSCENARIO 2.0
bash scripts/run_openscenario.sh run2 "$SCENARIO_RUNNER_ROOT/srunner/examples/cut_in_and_slow_right.osc"
Direct equivalents:
python3 "$SCENARIO_RUNNER_ROOT/scenario_runner.py" --openscenario file.xosc --openscenarioparams 'k: v'
python3 "$SCENARIO_RUNNER_ROOT/scenario_runner.py" --openscenario2 file.osc
--openscenarioparams overrides only entries in the global
ParameterDeclarations; per-story parameters are not reachable. The format is
'name: value, name2: value2' — it is split on , then on : and both sides are
stripped, so a value containing either character breaks the parse.
The OSC timeout is hard-coded to 100000 seconds for both flags. A stuck OSC run
does not time out on its own; interrupt it.
Step 4: Who drives the ego
An .xosc that assigns a controller (<ObjectController> with the CARLA
NpcVehicleDriving / simple_vehicle_control controllers) drives itself. One
that declares the ego with an external controller does not — same silent
"nothing happens" as with Python scenarios:
python3 "$SCENARIO_RUNNER_ROOT/manual_control.py" -a --rolename=hero
--rolename picks the actor (default hero); -a hands it to the autopilot.
Drop -a to drive it by keyboard.
OscControllerExample.xosc is the file to read for how controllers are wired.
Examples
Example 1: "run this xosc I got from another tool"
validate first. The two usual rejections are a map name the server does not have
(<LogicFile filepath="Town04"> needs Town04 loaded/available) and OSC features
ScenarioRunner does not implement — validate names both. Then run.
Example 2: "sweep a parameter"
for v in 4 8 12; do
PARAMS="leadingSpeed: $v" bash scripts/run_openscenario.sh run .../FollowLeadingVehicle.xosc
done
Example 3: "try OpenSCENARIO 2.0"
list shows the .osc corpus (cut_in_and_slow_right.osc, overtake1.osc,
follow_trajectory.osc, …). On ue5-master and ue58-dev they live in
srunner/osc_examples/, not srunner/examples/. Expect gaps: the osc2 pipeline
parses a subset of the language and raises from srunner/osc2/ on the rest.
Troubleshooting
Problem: File does not exist
Cause: ScenarioRunner checks the path before anything else, and relative paths
resolve agains
자주 묻는 질문
두 파일 형식은 어떻게 다른가요?
.xosc 파일은 1.x 표준을 사용하고, .osc 파일은 아직 실험 단계인 2.0 언어를 사용합니다.
파일에 별도의 지도 설정이 필요한가요?
보통은 필요하지 않습니다. 이 파일들은 자체 도로망을 포함하므로, 지도는 파일에서 가져옵니다.
파일이 차량용 외부 컨트롤러를 기대하면 어떻게 하나요?
네. 외부 컨트롤러가 필요하면 스킬이 주 차량을 운전하거나 관찰할 수 있습니다.
상세 정보
작성자의 원본 설명
Runs standard-format scenarios through ScenarioRunner — ASAM OpenSCENARIO 1.x (.xosc, via --openscenario, with catalogs and ParameterDeclaration overrides) and OpenSCENARIO 2.0 (.osc, via --openscenario2, the ANTLR/osc2 pipeline). Validates a file against the schema before running, lists the bundled examples, and reports which OSC features ScenarioRunner actually implements. Use when the user asks to "run an xosc", "run an OpenSCENARIO file", "use the OpenSCENARIO standard", "run a .osc / OSC2 scenario", or hands over a scenario file from another tool.
repo: carla-simulator/carla
인기도
- GitHub 스타
- 15k
- 순위
- #11110
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
create-leaderboard-route
15k카메라 화면에서 웨이포인트와 시나리오 트리거를 배치하고, 확인하고, 순서를 정해 CARLA 리더보드 경로 파일을 만들도록 에이전트를 돕습니다.
package-leaderboard-agent
15k주행 에이전트를 CARLA Leaderboard 제출용 Docker 이미지로 패키징하고, 폴더 구조를 확인하며 이미지가 에이전트를 로드하는지 테스트하도록 돕습니다.
read-leaderboard-results
15kCARLA Leaderboard 결과 파일을 읽고 경로별 점수와 위반 사항을 설명하며, 다른 규칙 버전에서 실행을 다시 채점하도록 에이전트를 돕습니다.
run-leaderboard-evaluation
15k주행 에이전트로 경로 세트에 대한 CARLA Leaderboard 평가를 실행하도록 돕습니다. 먼저 설정을 확인하고, 재개할 수 있는 체크포인트를 저장합니다.
비슷한 스킬
test-driven-development
311k에이전트가 기능이나 수정을 만들기 전에 실패하는 테스트를 먼저 쓰고, 그것을 통과시키는 가장 작은 코드를 작성하도록 가르칩니다.
verification-before-completion
311k에이전트가 작업, 수정, 빌드가 완료되었거나 통과했다고 말하기 전에 실제 점검을 실행하고 결과를 읽도록 가르칩니다.
migrate-to-shoehorn
310k테스트 파일의 위험한 타입 캐스팅을 shoehorn 라이브러리로 바꿔, 테스트가 일부 데이터만 써도 타입 검사를 통과하도록 돕습니다.