run-route-scenario
하는 일
이 스킬은 자율주행 프로그램이 차를 제어하는 상태로 CARLA에서 계획된 경로를 주행합니다. 경로 중간에는 교통과 시나리오 이벤트도 함께 일어납니다. 자율주행 소프트웨어를 벤치마크하는 팀을 위한 스킬입니다.
사용하는 경우
- ✓단일 상황이 아니라 전체 경로에서 자율주행 프로그램을 테스트하고 싶을 때.
- ✓목록에서 경로 하나를 골라 차가 그 경로에서 어떻게 달리는지 보고 싶을 때.
- ✓공식 CARLA Leaderboard 설정과 같은 결과를 얻고 싶을 때.
스킬 링크
https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/scenario-runner/run-route-scenario/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“CARLA에서 내 자율주행 프로그램이 운전하는 5번 경로를 실행하고, 결과가 어땠는지 알려 주세요.”
매주 새 스킬 5개. 읽는 데 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
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
create-leaderboard-route
15k카메라 화면에서 웨이포인트와 시나리오 트리거를 배치하고, 확인하고, 순서를 정해 CARLA 리더보드 경로 파일을 만들도록 에이전트를 돕습니다.
package-leaderboard-agent
15k주행 에이전트를 CARLA Leaderboard 제출용 Docker 이미지로 패키징하고, 폴더 구조를 확인하며 이미지가 에이전트를 로드하는지 테스트하도록 돕습니다.
read-leaderboard-results
15kCARLA Leaderboard 결과 파일을 읽고 경로별 점수와 위반 사항을 설명하며, 다른 규칙 버전에서 실행을 다시 채점하도록 에이전트를 돕습니다.
run-leaderboard-evaluation
15k주행 에이전트로 경로 세트에 대한 CARLA Leaderboard 평가를 실행하도록 돕습니다. 먼저 설정을 확인하고, 재개할 수 있는 체크포인트를 저장합니다.
비슷한 스킬
test-driven-development
311k에이전트가 기능이나 수정을 만들기 전에 실패하는 테스트를 먼저 쓰고, 그것을 통과시키는 가장 작은 코드를 작성하도록 가르칩니다.
verification-before-completion
311k에이전트가 작업, 수정, 빌드가 완료되었거나 통과했다고 말하기 전에 실제 점검을 실행하고 결과를 읽도록 가르칩니다.
migrate-to-shoehorn
310k테스트 파일의 위험한 타입 캐스팅을 shoehorn 라이브러리로 바꿔, 테스트가 일부 데이터만 써도 타입 검사를 통과하도록 돕습니다.