create-scenic-scenario
Was er macht
Dieser Skill macht aus einer Beschreibung in Alltagssprache eine Scenic-Datei für den CARLA-Simulator. Er richtet sich an Menschen, die wiederholbare Verkehrstests schreiben wollen, ohne jedes Auto und jeden Menschen von Hand zu platzieren.
Wann du ihn nutzt
- ✓Wenn du eine Verkehrssituation mit Worten beschreiben willst und dafür eine Testdatei erhalten willst.
- ✓Wenn du ein Szenario brauchst, in dem ein Auto seitlich einschert oder eine Person die Straße überquert.
- ✓Wenn du die Datei vor dem Lauf auf dem Simulator prüfen willst, damit sie funktioniert.
Link zum Skill
https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/scenic/create-scenic-scenario/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Kannst du ein Scenic-Szenario schreiben, in dem ein Auto von der rechten Spur vor meinem Auto einschert, und prüfen, ob es funktioniert?”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Der Agent macht aus deiner Beschreibung einen kurzen Plan und erstellt dann die Datei mit Mustern, die mit dieser Version bekanntermaßen funktionieren. Danach kompiliert er die Datei und zieht Szenen als Stichproben, um zu bestätigen, dass sie läuft, ohne den Simulator zu starten.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von GitHub.
Create a Scenic scenario from a description
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.
Scenic describes a distribution over scenes, not one scene. So a good scenario is not a script of positions — it is a set of constraints loose enough to sample and tight enough to be the situation asked for.
Translating a request has three parts, and only the first is a judgement call:
- request → spec (yours): pick the map, the placement, the actors and their relations.
- spec → file (scripts/scaffold_scenic.py): emits boilerplate and placement idioms lifted from scenarios that run on this build.
- validate (same script): compile, then sample. No server needed.
Do not hand-write the boilerplate. Three things bite every time and the generator already handles them:
assert len(x) > 0is illegal on a random value. Anything derived from aUniform(...)raisesRandomControlFlowError. Only assert on lists built deterministically fromnetwork.- Pedestrians and props need
with regionContainedIn Nonewhen placed on the road. Containment is re-checked every sample, so without it generation never converges — it looks like an unsatisfiablerequire. param mapandparam carla_mapmust name the same town.mapbuilds the road network;carla_maptells CARLA what to load. Disagree and the scene is sampled on one map and simulated on another.
Instructions
Progress:
- [ ] Step 1: Check prerequisites (bash scripts/check_env.sh)
- [ ] Step 2: Pick a map that can express the situation
- [ ] Step 3: Pick blueprints that exist in THIS build
- [ ] Step 4: Write the spec, generate, and let it validate
- [ ] Step 5: Loop on the verdict until it samples; then simulate
Step 2: The map has to support the situation
A scenario selects road features. If the map has none of them, no wording will
save it — the generated filter matches nothing and compilation fails with
tried to make discrete distribution over empty domain.
python3 ../run-scenic-scenario/scripts/list_scenic.py --check-maps
Read the 4way=N(uns M) / 3way=N(uns M) columns. Junction-negotiation
scenarios need uns > 0; dense downtown maps are usually fully signalized.
Step 3: Blueprints that exist here
python3 scripts/blueprint_table.py # inventory + gaps
python3 scripts/blueprint_table.py --category bicycle # ids Scenic offers
python3 scripts/blueprint_table.py --list vehicles # what the build has
python3 scripts/blueprint_table.py --check vehicle.lincoln.mkz vehicle.lincoln.mkz_2017
Two lists, and they disagree. blueprint_table.py reads the build's own
Content/Carla/Config/*Parameters.json — the definitive inventory — and diffs it
against Scenic's table for the installed client version.
- A category Scenic reports empty makes
new Bicyclefail at sample time even when the build has bicycles. Name the id instead:with blueprint "vehicle.bh.crossbike". - An id in the build but absent from Scenic's table is still spawnable — reference it explicitly.
- An id in neither fails at spawn time, long after sampling passed. This is
how the upstream scenarios still carrying
vehicle.lincoln.mkz_2017behave.
Step 4: Spec, generate, validate
python3 scripts/scaffold_scenic.py --example > spec.json # start from this shape
# edit spec.json
python3 scripts/scaffold_scenic.py --spec spec.json --out my.scenic
Generating with --out validates automatically. To re-validate after a hand edit:
python3 scripts/scaffold_scenic.py --validate my.scenic
Spec keys:
| Key | Meaning |
|---|---|
map |
town name; needs a matching .xodr in the assets (required) |
model |
srunner (default) or scenic — see [[run-scenic-scenario]] |
placement |
lane for road situations, intersection for junction ones |
arms, signalized |
intersection filter; signalized: false for negotiation |
ego |
{blueprint, speed, maneuver}; maneuver is straight/left/right |
actors[] |
{name, type, blueprint, relation, distance, speed, maneuver, offset, threshold} |
requires[] |
extra require lines, verbatim |
terminate |
termination condition; defa |
Häufige Fragen
Braucht die Prüfung den Simulator?
Nein. Die Datei wird zuerst kompiliert und in Stichproben geprüft. Dafür ist kein Server nötig.
Warum beschreibt Scenic einen Bereich von Szenen statt einer einzigen?
Scenic beschreibt eine Menge wahrscheinlicher Situationen. So ergibt jeder Lauf eine leicht andere Szene, die deiner Beschreibung trotzdem entspricht.
Kann ich eine Person auf die Straße setzen?
Ja. Fußgänger und Requisiten können auf der Straße platziert werden, und der Skill übernimmt ihre Einrichtung.
Details
Originalbeschreibung des Autors
Writes a new Scenic scenario (.scenic) from a natural-language description — "a car cuts in from the right lane", "a pedestrian crosses in front of the ego", "negotiate an unsignalized four-way" — by turning the request into a spec, generating the file from idioms proven on this build, and validating it by compiling and sampling before any simulator is involved. Use when the user asks to "write a Scenic scenario", "create a .scenic file", "turn this description into Scenic", "generate a scenario from text", or wants a Scenic scenario authored or repaired.
repo: carla-simulator/carla
Beliebtheit
- GitHub-Sterne
- 15k
- Platz im Ranking
- #11113
- Lizenz
- MIT
- Aktualisiert
- 2.11.2026
Kommentare
- …
Weitere Skills aus diesem Repository
create-leaderboard-route
15kHilft deinem Agenten, Routendateien für das CARLA Leaderboard zu erstellen, indem er Wegpunkte und Szenarien aus der Simulatorkamera setzt und prüft.
package-leaderboard-agent
15kHilft deinem Agenten, einen Fahragenten für die CARLA-Leaderboard-Einreichung in ein Docker-Image zu packen und zu prüfen, ob es ihn lädt.
read-leaderboard-results
15kHilft deinem Agenten, eine Ergebnisdatei des CARLA Leaderboards zu lesen, Punkte und Verstöße je Route zu erklären und Läufe neu zu bewerten.
run-leaderboard-evaluation
15kHilft deinem Agenten, die CARLA-Leaderboard-Bewertung auf vielen Routen auszuführen, mit vorheriger Prüfung und Checkpoints zum Fortsetzen.
Ähnliche Skills
test-driven-development
311kBringt deinem Agenten bei, vor jedem Feature oder Fix zuerst einen fehlschlagenden Test zu schreiben, ihn fehlschlagen zu sehen und dann den kleinsten passenden Code zu schreiben.
verification-before-completion
311kBringt deinem Agenten bei, echte Prüfungen auszuführen und ihre Ausgabe zu lesen, bevor er behauptet, eine Aufgabe, ein Fix oder ein Build sei fertig oder bestehe.
migrate-to-shoehorn
310kErsetzt riskante Typumwandlungen in deinen Testdateien durch die Bibliothek shoehorn, damit Tests mit unvollständigen Daten arbeiten und trotzdem die Typprüfung bestehen.