analyze-scenario-results
하는 일
이 스킬은 주행 테스트 실행에서 나온 결과 파일을 읽고, 이를 쉬운 요약으로 바꿉니다. 테스트가 통과했는지, 무엇이 잘못되었는지 알아야 하는 사람을 위한 스킬입니다.
사용하는 경우
- ✓주행 테스트가 통과했는지 실패했는지 알고 싶을 때.
- ✓실패의 원인이 된 특정 검사를 이해해야 할 때.
- ✓두 번의 테스트 실행을 비교해 무엇이 바뀌었는지 보고 싶을 때.
스킬 링크
https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/scenario-runner/analyze-scenario-results/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“제 CARLA 주행 테스트가 통과했는지, 실패했다면 어떤 검사가 왜 실패했는지 알려 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 저장된 결과 파일을 열고, 각 검사를 통과 또는 실패 상태와 함께 나열합니다. 두 실행을 나란히 비교할 수도 있습니다. 시뮬레이터를 실행하지 않고도 저장된 녹화에서 추가 수치를 측정할 수 있습니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Analyse scenario results
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.
Three separate things get called "results", and they answer different questions:
| Artefact | Produced by | Answers |
|---|---|---|
| criteria table | --output / --file / --json / --junit |
did it pass, and which criterion failed |
| criteria JSON next to a recording | --record |
the full criterion state, for tooling |
| CARLA recorder log | --record |
everything that happened, replayable |
The metrics module works off the third one, so anything you did not --record can
only be re-measured by re-running.
Instructions
Progress:
- [ ] Step 1: Check prerequisites (bash scripts/check_env.sh)
- [ ] Step 2: Summarise the result files you have
- [ ] Step 3: For deeper analysis, run a metric over a recording
- [ ] Step 4: Compare runs if you have more than one
Step 2: Summarise
source scripts/env.sh
python3 scripts/analyze_results.py summary ./results # a directory of results
python3 scripts/analyze_results.py summary ./results/*.json # specific files
python3 scripts/analyze_results.py compare ./before ./after # two runs, criterion by criterion
summary reads .json, .xml (junit) and .txt outputs, normalises them, and
prints one line per scenario with the failing criteria named. compare diffs two
sets by scenario name and criterion, which is the useful view when you changed a
controller and want to know what got worse.
To produce these in the first place, run with the output flags:
cd ../run-scenario
OUTPUT=1 JSON=1 OUTPUT_DIR=./results bash scripts/run_scenario.sh group:ControlLoss
Note the file naming: ScenarioRunner writes
<outputDir>/<config name><YYYY-MM-DD-HH-MM-SS>.json with no separator before
the timestamp, so names look like ControlLoss_12025-08-14-10-22-31.json.
analyze_results.py splits that back apart.
Step 3: Metrics over a recording
Record first — this writes both a .log recording and a <name>.json of criteria:
cd ../run-scenario
RECORD=recordings bash scripts/run_scenario.sh FollowLeadingVehicle_1
# -> $SCENARIO_RUNNER_ROOT/recordings/FollowLeadingVehicle_1.log
# $SCENARIO_RUNNER_ROOT/recordings/FollowLeadingVehicle_1.json
Then run a metric:
source scripts/env.sh
python3 scripts/analyze_results.py metrics --list # bundled example metrics
python3 scripts/analyze_results.py metrics \
--metric "$SCENARIO_RUNNER_ROOT/srunner/metrics/examples/distance_between_vehicles.py" \
--log recordings/FollowLeadingVehicle_1.log \
--criteria recordings/FollowLeadingVehicle_1.json
which is a wrapper for
python3 "$SCENARIO_RUNNER_ROOT/metrics_manager.py" \
--metric <metric.py> --log <recording.log> [--criteria <criteria.json>]
The metrics module needs a running server even though it computes offline: it replays the recording to recover the map and to resolve actor ids to positions. That is the one non-obvious prerequisite.
Bundled examples, in increasing complexity:
| Metric | What it shows |
|---|---|
basic_metric.py |
the minimum: subclass BasicMetric, implement _create_metric |
criteria_filter.py |
pull specific fields out of the criteria JSON into a table |
distance_between_vehicles.py |
per-frame distance between two actors, plotted |
distance_to_lane_center.py |
lateral error against the lane centre, plotted |
Writing your own is a subclass of BasicMetric with one method; the recording is
exposed as a MetricsLog object with get_actor_transforms, get_ego_vehicle_id,
get_all_frames and friends. Details in
references/metrics.md.
Step 4: What the criteria mean
A failing criterion names the behaviour that broke, not the cause:
| Criterion failed | Read as |
|---|---|
CollisionTest |
the ego hit something — check the recording for what |
DrivenDistanceTest |
the ego did not get far enough: blocked, or the scenario ended early |
ActorBlockedTest |
the ego stopped and stayed stopped |
KeepLaneTest / WrongLaneTest / OnSidewalkTest |
lateral control or a bad overtake |
RunningRedLightTest / RunningStopTest |
traffic-control handling |
RouteCompletionTest < 100 |
route not finished (route mode |
자주 묻는 질문
시뮬레이터가 실행 중이어야 하나요?
아니요. 저장된 결과와 녹화를 읽으므로 시뮬레이터가 필요하지 않습니다.
어떤 파일을 읽을 수 있나요?
결과 표, JSON 및 JUnit 결과 파일, 녹화와 함께 저장된 기준(criteria) 파일을 읽을 수 있습니다.
기록되지 않은 값도 측정할 수 있나요?
아니요. 추가 측정은 실행 중에 저장된 녹화에서만 작동합니다.
상세 정보
작성자의 원본 설명
Reads and summarises ScenarioRunner output — the criteria pass/fail tables from --output/--file, the machine-readable --json and --junit result files, and the criteria JSON written alongside a --record recording — and runs the metrics module (metrics_manager.py) to compute custom measurements over a recorded run offline, without the simulator. Use when the user asks "did the scenario pass", "why did it fail", "summarise these results", "compare these runs", or wants distance/speed/lane metrics from a recording.
repo: carla-simulator/carla
인기도
- GitHub 스타
- 15k
- 순위
- #11108
- 라이선스
- 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 평가를 실행하도록 돕습니다. 먼저 설정을 확인하고, 재개할 수 있는 체크포인트를 저장합니다.
비슷한 스킬
gitcrawl
394k에이전트가 저장된 GitHub 이슈와 풀 리퀘스트 보관본을 검색하고, 중복 항목을 묶고, GitHub에서 현재 상태를 확인하도록 돕습니다.
slacrawl
394k에이전트가 로컬 Slack 보관본에서 메시지를 검색하고 개수를 세며, 보관본이 얼마나 최신인지 확인하고 필요할 때 새로 고치도록 돕습니다.
goplaces
394k에이전트가 Google Places로 장소를 검색하고, 세부 정보와 리뷰를 가져오고, 장소 이름을 확인하며, 스크립트용 JSON을 출력하도록 돕습니다.