run-scenic-scenario
What it does
This skill runs Scenic traffic scenarios in the CARLA simulator, including the standard carlaChallenge set. It is for people testing self-driving software against varied traffic situations.
When to use it
- βWhen you have a Scenic file and want to run it in the CARLA simulator.
- βWhen a Scenic scenario fails and you need to know whether the map or the file is the problem.
- βWhen you want to run one of the standard carlaChallenge traffic tests.
Skill link
https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/scenic/run-scenic-scenario/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βCan you run my Scenic traffic file in CARLA and tell me whether it fails because of the map or the file itself?β
5 new skills a week. 1 minute to read.
How it works
The agent first generates a scene on its own to find any file or map problem, without needing the simulator. If that works, it runs the scene in CARLA and then restores the simulator's settings.
Technical content (original SKILL.md)
Original text by the author, straight from 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
FAQ
Why check the scene before running the simulator?
A scenario that cannot generate a scene will never reach the simulator, so checking first saves time.
Does the Scenic version need to match the simulator?
Yes. The client version has to match the CARLA server, or the car and prop options may not load.
Does it change the simulator after the run?
Yes. It restores the world's settings when the run finishes.
Details
Original description by the author
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
Popularity
- GitHub stars
- 15k
- Ranking position
- #11114
- License
- MIT
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
create-leaderboard-route
15kHelps your agent build CARLA Leaderboard route files by placing waypoints and scenario triggers from the simulator camera, then checking and ordering them.
package-leaderboard-agent
15kHelps your agent package a driving agent into a Docker image for CARLA Leaderboard submission, checking the folder layout and testing that the image loads it.
read-leaderboard-results
15kHelps your agent read a CARLA Leaderboard results file, explain each route's score and infractions, and rescore a run under the other rule version.
run-leaderboard-evaluation
15kHelps your agent run the CARLA Leaderboard evaluator on a set of routes with your driving agent, checking the setup first and saving checkpoints you can resume.
Similar skills
test-driven-development
311kTeaches your agent to write a failing test first, watch it fail, then write the smallest code that passes, before building any feature or fix.
verification-before-completion
311kTeaches your agent to run real checks and read their output before claiming that a task, fix, or build is complete or passing.
migrate-to-shoehorn
310kReplaces risky type casts in your test files with the shoehorn library, so tests can use partial data and still pass type checks.