run-scenic-scenario
できること
このスキルは、CARLAシミュレーターでScenicの交通シナリオを実行します。標準のcarlaChallengeセットを含みます。さまざまな交通の状況に対して、自動運転のソフトウェアをテストしたい人向けです。
使う場面
- ✓Scenicファイルがあり、それをCARLAシミュレーターで実行したいとき。
- ✓Scenicのシナリオが失敗し、地図とファイルのどちらが原因かを知る必要があるとき。
- ✓標準のcarlaChallenge交通テストの1つを実行したいとき。
スキルのリンク
https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/scenic/run-scenic-scenario/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私のScenic交通ファイルをCARLAで実行し、失敗の原因が地図かファイル自体かを教えてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントはまず、シミュレーターを使わずにシーンを生成して、ファイルや地図の問題を見つけます。それがうまくいけば、CARLAでシーンを実行し、その後シミュレーターの設定を元に戻します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Run a Scenic scenario
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.
A Scenic scenario is a .scenic file describing a distribution over scenes.
Running it has two distinct phases, and almost every confusing failure comes from
not knowing which one broke:
- sample — Scenic reads the map's OpenDrive, then rejection-samples until a
scene satisfies every
require. No simulator involved. - simulate — the sampled scene is spawned in CARLA and behaviours tick.
A scenario that cannot sample will never reach CARLA, so a server-side explanation for it is always wrong. scripts/sample_scenic.py separates the two in about a second per file.
Three things decide whether a run works:
- the model —
srunner.scenic.models.modelneedsSCENARIO_RUNNER_ROOTonPYTHONPATH;scenic.simulators.carla.modelships in the wheel. - the map — scenarios filter road features (
is4Way and not isSignalized). A filter that matches nothing is an empty domain, not a bug. - the client version — Scenic's blueprint table is keyed on it, so a client/server mismatch silently offers ids the server does not have.
Instructions
Progress:
- [ ] Step 1: Check prerequisites (bash scripts/check_env.sh), clear FAILs
- [ ] Step 2: Inventory what is runnable, and on which map
- [ ] Step 3: Sample headlessly to separate map problems from syntax problems
- [ ] Step 4: Run it bounded, with --simulate --2d
- [ ] Step 5: Confirm a simulation actually terminated; leave the world async
Step 1-2: What can I run
source scripts/env.sh
bash scripts/check_env.sh
python3 scripts/list_scenic.py # every scenario, its model, its map
python3 scripts/list_scenic.py --check-maps # + each road network's features
python3 scripts/list_scenic.py --map Town05 # only scenarios for one map
list_scenic.py parses the headers as text, so it needs neither Scenic nor a
server and cannot be broken by a failing model import.
Step 3: Sample before you simulate
python3 scripts/sample_scenic.py "$SCENARIO_RUNNER_ROOT"/srunner/scenic/carlaChallenge*.scenic
Verdicts map to causes with no overlap:
| Verdict | Meaning | Where to look |
|---|---|---|
PASS |
scene constructible; only runtime issues remain | go to Step 4 |
COMPILE-FAIL |
syntax, model import, missing .xodr, or an empty blueprint category |
check_env.sh, PYTHONPATH |
SAMPLE-FAIL |
requires unsatisfiable on this map |
--check-maps |
Step 4: Run
Always bound the run. --count and --time default to infinity, so a bare
scenic --simulate never returns.
source scripts/env.sh
# the canonical smoke test
bash scripts/run_scenic.sh carlaChallenge1
# reproducible: one simulation, fixed seed, 300 steps
COUNT=1 TIME=300 SEED=7 bash scripts/run_scenic.sh carlaChallenge7
# retarget a scenario at another map (both params, or the .xodr and the server disagree)
PARAMS="carla_map Town05" PARAMS2="map $SCENARIO_RUNNER_ROOT/srunner/scenic/assets/Town05.xodr" \
bash scripts/run_scenic.sh carlaChallenge10
Or call the CLI directly — the wrapper only adds resolution, bounding, logging, artifact confirmation and the async reset:
scenic "$SCENARIO_RUNNER_ROOT/srunner/scenic/carlaChallenge1.scenic" --simulate --2d --count 1 --time 300
| Var | Effect |
|---|---|
COUNT |
simulations to run, default 1; empty means unbounded |
TIME |
step bound per simulation, default 300; empty means unbounded |
SEED |
fixes the sampled scene, so a run is reproducible |
MODE2D=0 |
drop --2d; 3D mode needs meshes the CARLA model does not define |
PARAMS/PARAMS2/PARAMS3 |
--param pairs, e.g. PARAMS="carla_map Town05" |
VERBOSITY |
scenic -v, default 2 — 2 prints per-sample rejections |
LOG_DIR |
where the run log lands, default ./scenic-runs |
EXTRA |
raw extra CLI arguments |
--2d is the mode these scenarios were written for. Drop it only deliberately:
in 3D mode Scenic wants real object meshes and the CARLA world model does not
supply them.
Step 5: Aftermath
Scenic switches the world to synchronous mode for a run and restores async on a clean exit. An interrupted run leaves it synchronous with nobody ticking, and every other c
よくある質問
シミュレーターを実行する前にシーンを確認するのはなぜですか?
シーンを生成できないシナリオはシミュレーターに到達しないため、先に確認すると時間を節約できます。
Scenicのバージョンはシミュレーターと一致させる必要がありますか?
はい。クライアントのバージョンはCARLAサーバーと一致している必要があります。そうでないと、車や小道具のオプションが読み込まれないことがあります。
実行の後でシミュレーターを変えますか?
はい。実行が終わると、ワールドの設定を元に戻します。
詳細
作者による元の説明
Runs Scenic probabilistic scenarios against a running CARLA server with the `scenic FILE --simulate --2d` CLI — the carlaChallenge1-10 traffic scenarios shipped by ScenarioRunner (`model srunner.scenic.models.model`) and by Scenic itself (`model scenic.simulators.carla.model`) — bounding the run, sampling scenes headlessly first to tell a map problem from a syntax problem, and restoring the world afterwards. Use when the user asks to "run a Scenic scenario", "run carlaChallenge", "test a .scenic file", "scenic --simulate", or reports a Scenic scenario that rejects every sample or cannot find b
repo: carla-simulator/carla
人気
- GitHubのスター
- 15k
- ランキング
- #11114
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
create-leaderboard-route
15kエージェントが、シミュレーターのカメラでウェイポイントとシナリオのトリガーを配置し、CARLA Leaderboardのルートファイルを作成・確認できるよう支援します。
package-leaderboard-agent
15kエージェントが、ドライビングエージェントをCARLA Leaderboardへの提出用のDockerイメージにまとめられるよう支援します。フォルダ構成の確認と読み込みテストを行います。
read-leaderboard-results
15kエージェントが、CARLA Leaderboardの結果ファイルを読み、各ルートの得点と違反を説明し、別のルールのバージョンで実行結果を再採点できるよう支援します。
run-leaderboard-evaluation
15kエージェントが、ドライビングエージェントを使って一連のルートでCARLA Leaderboardの評価ツールを実行できるよう支援します。実行前に設定を確認し、再開可能なチェックポイントを保存します。
似ているスキル
test-driven-development
311k機能や修正を作る前に、まず失敗するテストを書き、それが失敗するのを確認してから、合格させる最小のコードを書くようエージェントに教えます。
verification-before-completion
311kタスク、修正、ビルドが完了した、または合格したと主張する前に、実際のチェックを実行し、その出力を読むようエージェントに教えます。
migrate-to-shoehorn
310kテストファイル内の危険な型キャストを、shoehornライブラリに置き換え、テストが部分的なデータを使いつつ型チェックを通るようにします。