본문으로 건너뛰기
Skillpedia
테스트15k · #11103

spawn-walkers

하는 일

이 스킬은 거리 장면이 붐비도록 CARLA 시뮬레이션에 걸어 다니는 사람을 추가합니다. 차가 피해야 할 보행자가 필요한 자율주행 테스트 담당자를 위한 스킬입니다.

사용하는 경우

  • ✓시뮬레이션 거리를 걸어 다니는 사람들의 무리를 만들고 싶을 때.
  • ✓도로 위의 사람에게 차가 어떻게 반응하는지 테스트하려고 보행자가 있어야 할 때.
  • ✓사람들을 제거해 거리를 다시 비우고 싶을 때.

스킬 링크

https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/python-api/spawn-walkers/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/python-api/spawn-walkers/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“CARLA 도시에 30명의 사람을 걸어 다니게 하고, 테스트가 진행되는 동안 계속 걷도록 해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 각 보행자를 지도의 걸을 수 있는 영역에 배치하고, 무작위로 갈 곳을 정해 줍니다. 보행자는 계속 새 목적지를 고르며, 유지되는 세션이 이들을 계속 움직이게 합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Spawn wandering pedestrians

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.

Populate the map with pedestrians that walk around on their own. Each is a walker.pedestrian.* body paired with a controller.ai.walker that steers it to random points on the navigation mesh. The deliverable is a live, moving crowd; destroy tears it down cleanly.

By default they wander indefinitely: on spawn every controller is start()ed, given one random navmesh destination, and a random walking speed. That single target is enough — CARLA's walker AI automatically picks a fresh random destination each time a walker arrives (confirmed in LibCarla's nav code), so the crowd roams forever with no re-targeting loop. Pass --no-wander for a stationary crowd (controllers left unstarted).

This needs a navmesh — validate it first with the debug-navmesh skill if walkers won't move.

The controllers stop when the client that started them exits. Same rule as the Traffic Manager, and it is the reason a fire-and-forget spawn leaves the crowd standing still. Pass --hold: the process stays alive and the crowd keeps walking.

It is not primarily about pumping ticks, which is what this skill used to say. The two were confounded, because --hold both keeps the client alive and pumps. Separating them needed a second client owning a synchronous clock; measured on 0.10.0, walkers spawned against a world ticked by a traffic client:

setup result
spawn, process exits (another client ticking) 0/15 move
a separate client issues start() and stays alive 15/15 move, then stop when it exits
spawn --hold, observing only, never ticking 10/10 move, 9.94 m in 8 s

The first row has a second symptom worth knowing: a later start() on those controllers is accepted rather than rejected as already-started, which proves the original call never landed. _ensure_walking therefore verifies by displacement and re-issues (--retries) instead of trusting start().

Ticks still have to come from somewhere, of course — that is the clock rule below, not the walkers' own business.

The clock rule

Read the world settings before doing anything:

  • already synchronous — another client owns the clock. Never call tick(); observe with wait_for_tick(). Ticking a world you do not own is what silently drops commands like start().
  • asynchronous — this client may switch it to sync (--delta, default 20 Hz) and become the ticker. --no-sync opts out.

Either way the previous settings are restored on release: a synchronous world with nothing ticking does not advance at all, and is indistinguishable from a hung server. So stop a holder with Ctrl+C (SIGINT), never kill -9 — the restore runs in a finally.

Walkers are also spawned --z-offset (default 2.0 m) above the navmesh point: spawning at the navmesh z is rejected on 0.10.0 with "Spawn failed because of collision at spawn position" (+0.5 still fails, +1.0 is the first that works).

Instructions

Progress:
- [ ] Step 1: Check prerequisites (bash scripts/check_env.sh), clear FAILs
- [ ] Step 2: (if walkers won't move) validate the navmesh — debug-navmesh
- [ ] Step 3: Spawn N walkers with --hold (the controllers die with the client)
- [ ] Step 4: Verify visually / via the world-data skill; spawn reports its count
- [ ] Step 5: Ctrl+C the held process, then destroy (controllers first, then walkers)

Commands need CARLA_HOST/CARLA_PORT from scripts/env.sh.

Step 1: Check prerequisites

bash scripts/check_env.sh

Step 3-5: Spawn / roam / destroy

source scripts/env.sh

# 30 pedestrians wandering at 1.0-1.8 m/s — --hold keeps this client alive, and
# the controllers stop the moment it exits
python3 scripts/walkers.py spawn --count 30 --hold

# reproducible placement (still wanders forever)
python3 scripts/walkers.py spawn --count 50 --seed 42

# more road-crossing, faster walkers
python3 scripts/walkers.py spawn --count 20 --cross-factor 0.4 --speed-min 1.4 --speed-max 2.2

# a stationary crowd (no autonomous movement)
python3 scripts/walkers.py spawn --count 20 --no-wander

python3 scripts/walkers.py destroy        # correct-order teardown

Verify

The spawn comma

자주 묻는 질문

프로그램이 끝난 뒤에도 사람들이 계속 걷나요?

아니요. 이들을 시작한 프로그램이 종료되면 보행자도 멈춥니다. 그래서 이 스킬은 세션을 열어 둘 수 있습니다.

지도에 특별한 설정이 필요한가요?

네. 지도에 걷는 영역이 있어야 하며, 보행자가 움직이지 않으면 스킬이 먼저 이를 확인할 수 있습니다.

무리를 움직이지 않고 서 있게 할 수 있나요?

네. 걷기를 끄면 가만히 서 있는 무리를 만들 수 있습니다.

상세 정보

작성자의 원본 설명

Spawns pedestrians that wander autonomously via WalkerAIController, and destroys them in the correct order. Pairs each walker.pedestrian.* with a controller.ai.walker, places them on the navigation mesh, and sends them to random navmesh points at walking speed. Use when the user asks to "spawn pedestrians/walkers", "add people/crowds", "make pedestrians walk around", or "remove the walkers". Reads the world settings first: if the world is already synchronous it never ticks it, and if it is asynchronous it makes it synchronous and drives the clock itself.

repo: carla-simulator/carla

인기도

GitHub 스타
15k
순위
#11103
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬