Aller au contenu
Skillpedia
Tests15k · #11113

create-scenic-scenario

Ce qu’il fait

Cette compétence transforme une description en langage courant d'une situation de circulation en fichier Scenic pour le simulateur CARLA. Elle s'adresse aux personnes qui rédigent des tests de circulation reproductibles sans placer chaque voiture et chaque piéton à la main.

Quand l’utiliser

  • ✓Quand vous voulez décrire une situation de circulation avec des mots et obtenir un fichier de test correspondant.
  • ✓Quand vous avez besoin d'un scénario où une voiture se rabat depuis la voie de droite ou une personne traverse la route.
  • ✓Quand vous voulez que le fichier soit vérifié avant de le lancer sur le simulateur.

Lien du skill

https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/scenic/create-scenic-scenario/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/scenic/create-scenic-scenario/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Peux-tu écrire un scénario Scenic où une voiture se rabat depuis la voie de droite devant la mienne, et vérifier qu'il fonctionne ?”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

L'agent transforme votre description en un bref plan, puis crée le fichier à partir de modèles connus pour fonctionner avec cette version. Il compile ensuite le fichier et échantillonne des scènes pour confirmer qu'il s'exécute, sans démarrer le simulateur.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis GitHub.

Create a Scenic scenario from a description

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.

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:

  1. request → spec (yours): pick the map, the placement, the actors and their relations.
  2. spec → file (scripts/scaffold_scenic.py): emits boilerplate and placement idioms lifted from scenarios that run on this build.
  3. 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) > 0 is illegal on a random value. Anything derived from a Uniform(...) raises RandomControlFlowError. Only assert on lists built deterministically from network.
  • Pedestrians and props need with regionContainedIn None when placed on the road. Containment is re-checked every sample, so without it generation never converges — it looks like an unsatisfiable require.
  • param map and param carla_map must name the same town. map builds the road network; carla_map tells 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 Bicycle fail 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_2017 behave.

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
Questions fréquentes

La vérification nécessite-t-elle le simulateur ?

Non. Le fichier est compilé et échantillonné d'abord, ce qui ne nécessite aucun serveur.

Pourquoi Scenic décrit-il une plage de scènes plutôt qu'une seule ?

Scenic décrit un ensemble de situations probables, si bien que chaque exécution produit une scène légèrement différente qui correspond toujours à votre description.

Puis-je placer un piéton sur la route ?

Oui. Les piétons et les accessoires peuvent être placés sur la route, et la compétence gère leur configuration.

Détails

Description originale de l’auteur

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

Popularité

Étoiles GitHub
15k
Position au classement
#11113
Licence
MIT
Mis à jour
02/11/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires