create-scenic-scenario
यह क्या करती है
यह स्किल ट्रैफ़िक स्थिति के सादे भाषा विवरण को CARLA सिमुलेटर के लिए Scenic फ़ाइल में बदलती है। यह उन लोगों के लिए है जो हर कार और व्यक्ति हाथ से रखे बिना दोहराए जा सकने वाले ट्रैफ़िक टेस्ट लिखते हैं।
कब इस्तेमाल करें
- ✓जब आप ट्रैफ़िक स्थिति शब्दों में बताना चाहते हैं और उसकी टेस्ट फ़ाइल चाहते हैं।
- ✓जब आपको ऐसा परिदृश्य चाहिए जिसमें कोई कार किनारे से आकर सामने आ जाए, या कोई व्यक्ति सड़क पार करे।
- ✓जब आप सिमुलेटर पर चलाने से पहले पक्का करना चाहते हैं कि फ़ाइल काम करती है।
Skill का लिंक
https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/scenic/create-scenic-scenario/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“क्या आप एक Scenic परिदृश्य लिख सकते हैं जिसमें दाईं लेन से एक कार मेरी कार के सामने आ जाए, और जाँच सकते हैं कि वह काम करता है?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट आपके विवरण को एक छोटी योजना में बदलता है, फिर इस बिल्ड के साथ काम करने वाले पैटर्न से फ़ाइल बनाता है। फिर वह फ़ाइल को कंपाइल करता है और दृश्य सैंपल करके पुष्टि करता है कि वह चलती है, बिना सिमुलेटर शुरू किए।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे 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 |
अक्सर पूछे जाने वाले सवाल
क्या जाँच के लिए सिमुलेटर चाहिए?
नहीं। फ़ाइल पहले कंपाइल और सैंपल की जाती है, जिसके लिए सर्वर की ज़रूरत नहीं।
Scenic एक दृश्य के बजाय कई दृश्यों का वर्णन क्यों करता है?
Scenic संभावित स्थितियों का एक सेट बताता है, इसलिए हर रन में थोड़ा अलग दृश्य बनता है, जो फिर भी आपके विवरण से मेल खाता है।
क्या मैं सड़क पर पैदल यात्री रख सकता हूँ?
हाँ। पैदल यात्री और प्रॉप सड़क पर रखे जा सकते हैं, और स्किल उनका सेटअप संभालती है।
जानकारी
लेखक का मूल विवरण
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
लोकप्रियता
- GitHub स्टार
- 15k
- रैंकिंग में स्थान
- #11113
- लाइसेंस
- MIT
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
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 मूल्यांकन चलाने में मदद करती है, शुरू करने से पहले सेटअप जाँचकर और चेकपॉइंट सेव करके।
मिलती-जुलती skills
test-driven-development
311kयह आपके एजेंट को किसी भी फ़ीचर या सुधार से पहले पहले असफल होने वाला टेस्ट लिखना, उसे असफल होते देखना, फिर पास करने वाला सबसे छोटा कोड लिखना सिखाती है।
verification-before-completion
311kयह आपके एजेंट को किसी काम, सुधार या build के पूरा या पास होने का दावा करने से पहले असली जांच चलाकर उसका आउटपुट पढ़ना सिखाती है।
migrate-to-shoehorn
310kआपकी टेस्ट फ़ाइलों में जोखिम भरे type casts की जगह shoehorn लाइब्रेरी लगाती है, ताकि टेस्ट अधूरे डेटा से भी type checks पास कर सकें।