본문으로 건너뛰기
Skillpedia
분석 및 스프레드시트15k · #11108

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가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/scenario-runner/analyze-scenario-results/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“제 CARLA 주행 테스트가 통과했는지, 실패했다면 어떤 검사가 왜 실패했는지 알려 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 저장된 결과 파일을 열고, 각 검사를 통과 또는 실패 상태와 함께 나열합니다. 두 실행을 나란히 비교할 수도 있습니다. 시뮬레이터를 실행하지 않고도 저장된 녹화에서 추가 수치를 측정할 수 있습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Analyse scenario results

Paths. scripts/… and references/… 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.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬