run-route-scenario
यह क्या करती है
यह स्किल CARLA में तय रूट पर एक सेल्फ़-ड्राइविंग प्रोग्राम के नियंत्रण में गाड़ी चलाती है, रास्ते के ट्रैफ़िक और परिदृश्य घटनाओं के साथ। यह उन टीमों के लिए है जो अपने स्वायत्त ड्राइविंग सॉफ़्टवेयर की बेंचमार्किंग कर रही हैं।
कब इस्तेमाल करें
- ✓जब आप अपने सेल्फ़-ड्राइविंग प्रोग्राम को एक अकेली स्थिति के बजाय पूरे रूट पर परखना चाहते हैं।
- ✓जब आपको सूची से एक रूट चलाकर देखना है कि कार उस पर कैसा प्रदर्शन करती है।
- ✓जब आपको आधिकारिक CARLA Leaderboard सेटअप से मेल खाते नतीजे चाहिए।
Skill का लिंक
https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/scenario-runner/run-route-scenario/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“क्या आप CARLA में रूट 5 मेरे सेल्फ़-ड्राइविंग प्रोग्राम के हाथ में स्टीयरिंग देकर चला सकते हैं, और बता सकते हैं कि वह कैसा रहा?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट रूट फ़ाइल पढ़कर उसके शहर और घटनाएँ ढूँढता है, फिर आपके ड्राइविंग प्रोग्राम के साथ गाड़ी को उस पर चलाता है। वह रूट जाँचों की रिपोर्ट देता है, जैसे पूर्णता, रास्ते से भटकना, लाल बत्ती, टक्कर और कार का रुक जाना।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Run a route
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 route is a list of waypoints plus a set of scenarios pinned to trigger
points along it. RouteScenario builds one behaviour tree containing every
scenario on the route, plus background traffic, and evaluates route-level criteria
(completion, deviation, red lights, collisions, blocked).
This is the mode that matters for autonomous-driving work, for three reasons:
- An agent drives.
--agentonly works here; with--scenarioit is refused. - Most of the scenario library is only reachable here. ~34 classes have no standalone config.
- It is what the Leaderboard runs. Same
RouteScenario, same criteria. The Leaderboard adds scoring, sensor limits and result bookkeeping on top.
Instructions
Progress:
- [ ] Step 1: Check prerequisites (bash scripts/check_env.sh)
- [ ] Step 2: Inspect the route file — ids, towns, scenarios
- [ ] Step 3: Pick or write the agent
- [ ] Step 4: Run one route id first, then the file
- [ ] Step 5: Read the criteria; reset the world to async
Step 2: Inspect
source scripts/env.sh
bash scripts/run_route.sh list "$LEADERBOARD_ROOT/data/routes_devtest.xml"
bash scripts/run_route.sh show "$LEADERBOARD_ROOT/data/routes_devtest.xml" 0
list prints each route id, its town, waypoint count and scenario histogram, and
flags whether the towns it needs exist on the running server. show dumps one
route's scenarios in trigger order.
Route files come from two places: the Leaderboard's data/*.xml, or your own
(see [[create-leaderboard-route]] for the authoring tools). ScenarioRunner itself
ships no route files on master — the old srunner/data/routes_*.xml referenced
by the docs was removed.
Step 3: The agent
Route mode needs something to drive. srunner/autoagents/ has three:
| Agent | Use |
|---|---|
npc_agent.py |
a BasicAgent at 30 km/h following the route (not the Traffic Manager); the reference "it works" agent |
human_agent.py |
pygame window, keyboard control |
dummy_agent.py |
returns zero control; the template to copy |
ScenarioRunner derives the class name from the file name: npc_agent.py →
NpcAgent, my_cool_agent.py → MyCoolAgent
(os.path.basename(agent).split('.')[0].title().replace('_','')). A mismatch is an
AttributeError at load, not a helpful message. Writing one is
[[write-leaderboard-agent]] — the same AutonomousAgent interface applies here.
Step 4: Run
source scripts/env.sh
# one route, the NPC agent — the canonical check that routes work at all
AGENT="$SCENARIO_RUNNER_ROOT/srunner/autoagents/npc_agent.py" \
bash scripts/run_route.sh run "$LEADERBOARD_ROOT/data/routes_devtest.xml" 0
# every route in the file, results as JSON
AGENT=.../npc_agent.py OUTPUT=1 JSON=1 OUTPUT_DIR=./results \
bash scripts/run_route.sh run routes.xml
# your own agent with a config file, recorded for later replay
AGENT=~/team_code/my_agent.py AGENT_CONFIG=~/team_code/config.json RECORD=recordings \
bash scripts/run_route.sh run routes.xml 3
Direct equivalent:
python3 "$SCENARIO_RUNNER_ROOT/scenario_runner.py" \
--route routes.xml --route-id 0 --agent .../npc_agent.py --agentConfig cfg.json
--route-id is one id, not a range. Unlike the Leaderboard's
--routes-subset, there is no 0-4 or 1,6 syntax here: omit it to run every
route in the file, or loop.
Route mode forces two things regardless of what you pass:
--reloadWorld (the route names its town) and --sync when --agent is given
(arguments.sync = True). So the world will be reloaded and will be in
synchronous mode — plan the aftermath accordingly.
Step 5: Aftermath
Same trap as any sync run, worse here because it is unconditional: an interrupted
route leaves the world synchronous, which every other client sees as a hang.
run_route.sh resets it on exit including Ctrl-C. Otherwise:
[[set-world-settings]] async.
Examples
Example 1: "check that routes work"
AGENT="$SCENARIO_RUNNER_ROOT/srunner/autoagents/npc_agent.py" \
bash scripts/run_route.sh run "$LEADERBOARD_ROOT/data/routes_devtest.xml" 0
The NPC agent drives the route with a BasicAgent at 30 km/h; criteria print at the
end. If this fails,
अक्सर पूछे जाने वाले सवाल
क्या इसे इस्तेमाल करने के लिए ड्राइविंग प्रोग्राम चाहिए?
हाँ। रूट रन के लिए ऐसा एजेंट चाहिए जो गाड़ी चलाए, और यही इस मोड को अकेली परिदृश्य से अलग बनाता है।
क्या पूरी फ़ाइल चलाने से पहले एक रूट आज़मा सकते हैं?
हाँ। स्किल पहले एक रूट ID चला सकती है, फिर पूरी फ़ाइल।
कौन-सी जाँचें रिपोर्ट होती हैं?
रूट पूर्णता, रास्ते से विचलन, लाल बत्ती पार करना, टक्कर और कार का रुकना।
जानकारी
लेखक का मूल विवरण
Runs a route through ScenarioRunner's RouteScenario mode (--route / --route-id) with an autonomous agent driving the ego — the same mechanism the CARLA Leaderboard uses, and the only way to reach the ~34 route-only scenario classes (Accident, ParkedObstacle, HazardAtSideLane, InvadingTurn, HardBreakRoute, YieldToEmergencyVehicle, junction and actor-flow scenarios). Inspects route files, lists route ids and their scenarios, and runs one or all of them. Use when the user asks to "run a route", "drive a route with my agent", "run leaderboard scenarios without the leaderboard", or names a route-on
repo: carla-simulator/carla
लोकप्रियता
- GitHub स्टार
- 15k
- रैंकिंग में स्थान
- #11111
- लाइसेंस
- 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 पास कर सकें।