create-scenic-scenario
O que ela faz
Esta skill transforma uma descrição em linguagem simples de uma situação de trânsito em um arquivo Scenic para o simulador CARLA. É para quem escreve testes de trânsito repetíveis sem posicionar cada carro e pessoa manualmente.
Quando usar
- ✓Quando você quer descrever uma situação de trânsito com palavras e obter um arquivo de teste para ela.
- ✓Quando você precisa de um cenário em que um carro entra pela lateral ou uma pessoa atravessa a via.
- ✓Quando você quer que o arquivo seja verificado para garantir que funciona antes de rodá-lo no simulador.
Link da skill
https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/scenic/create-scenic-scenario/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Você pode escrever um cenário Scenic em que um carro entra pela faixa da direita na frente do meu carro, e verificar se ele funciona?”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
O agente transforma sua descrição em um plano curto e depois cria o arquivo usando padrões que funcionam com esta versão. Em seguida compila o arquivo e amostra cenas para confirmar que ele roda, sem iniciar o simulador.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do 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 |
Perguntas frequentes
A verificação precisa do simulador?
Não. O arquivo é compilado e amostrado primeiro, o que não exige servidor.
Por que o Scenic descreve uma faixa de cenas em vez de uma só?
O Scenic descreve um conjunto de situações prováveis, então cada execução gera uma cena um pouco diferente que ainda corresponde à sua descrição.
Posso colocar um pedestre na via?
Sim. Pedestres e objetos de cenário podem ser colocados na via, e a skill cuida da configuração deles.
Detalhes
Descrição original do autor
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
Popularidade
- Estrelas no GitHub
- 15 mil
- Posição no ranking
- #11113
- Licença
- MIT
- Atualizada em
- 02/11/2026
Comentários
- …
Mais skills deste repositório
create-leaderboard-route
15 milAjuda seu agente a criar arquivos de rota do CARLA Leaderboard posicionando waypoints e gatilhos de cenário a partir da câmera do simulador, depois verificando e ordenando-os.
package-leaderboard-agent
15 milAjuda seu agente a empacotar um agente de direção em uma imagem Docker para envio ao CARLA Leaderboard, verificando a estrutura de pastas e testando se a imagem o carrega.
read-leaderboard-results
15 milAjuda seu agente a ler um arquivo de resultados do CARLA Leaderboard, explicar a pontuação e as infrações de cada rota e recalcular uma execução pela outra versão das regras.
run-leaderboard-evaluation
15 milAjuda seu agente a rodar o avaliador do CARLA Leaderboard em um conjunto de rotas com seu agente de direção, verificando a configuração antes e salvando checkpoints para retomar.
Skills parecidas
test-driven-development
311 milEnsina seu agente a escrever primeiro um teste que falha, ver a falha e depois escrever o menor código que passa, antes de criar qualquer funcionalidade ou correção.
verification-before-completion
311 milEnsina seu agente a rodar verificações reais e ler a saída antes de afirmar que uma tarefa, correção ou build está concluído ou passando.
migrate-to-shoehorn
310 milSubstitui conversões de tipo arriscadas nos seus arquivos de teste pela biblioteca shoehorn, para que os testes usem dados parciais e ainda passem na checagem de tipos.