Langsung ke konten
Skillpedia
Testing15k Β· #11111

run-route-scenario

Fungsinya

Skill ini mengemudikan rute yang sudah direncanakan melalui CARLA dengan program mengemudi otonom yang mengendalikan mobil, bersama lalu lintas dan peristiwa skenario di sepanjang jalan. Untuk tim yang membandingkan perangkat lunak mengemudi otonom mereka.

Kapan dipakai

  • βœ“Saat Anda ingin menguji program mengemudi otonom pada rute lengkap, bukan satu situasi.
  • βœ“Saat Anda perlu menjalankan satu rute dari daftar untuk melihat performanya.
  • βœ“Saat Anda menginginkan hasil yang sesuai dengan pengaturan CARLA Leaderboard resmi.

Link skill

https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/scenario-runner/run-route-scenario/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/scenario-runner/run-route-scenario/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œBisakah Anda menjalankan rute 5 di CARLA dengan program mengemudi otonom saya yang mengendalikan mobil, dan beri tahu saya hasilnya?”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent membaca file rute untuk menemukan kotanya dan peristiwanya, lalu menjalankan mobil di sepanjang rute dengan program mengemudi Anda. Agent melaporkan pemeriksaan rute seperti penyelesaian, penyimpangan, lampu merah, tabrakan, dan apakah mobil macet.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

Run a route

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.

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. --agent only works here; with --scenario it 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,

Pertanyaan umum

Apakah perlu program mengemudi untuk memakainya?

Ya. Run rute membutuhkan agent yang mengemudikan mobil, yang membuat mode ini berbeda dari skenario tunggal.

Bisakah mencoba satu rute sebelum menjalankan seluruh file?

Bisa. Skill dapat menjalankan satu ID rute terlebih dahulu, lalu seluruh file.

Pemeriksaan apa saja yang dilaporkan?

Penyelesaian rute, penyimpangan dari jalur, menerobos lampu merah, tabrakan, dan apakah mobil terhambat.

Detail

Deskripsi asli dari pembuat

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

Popularitas

Bintang GitHub
15k
Peringkat
#11111
Lisensi
MIT
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa