toggle-env-objects
하는 일
이 스킬은 CARLA 지도에 있는 건물과 나무 같은 배경 요소를 켜거나 끕니다. 도로와 차량을 더 잘 보고 싶거나 테스트 장면을 깔끔하게 하려는 사람을 위한 스킬입니다.
사용하는 경우
- ✓건물을 숨겨 도로와 차량만 보이게 하고 싶을 때.
- ✓테스트 중인 장면에서 나무나 다른 식물을 없애고 싶을 때.
- ✓무엇을 바꾸기 전에 지도에 들어 있는 항목 목록을 보고 싶을 때.
스킬 링크
https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/python-api/toggle-env-objects/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“CARLA 지도의 건물을 모두 숨겨서 도로와 차량만 보이게 해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 지도의 고정 항목을 건물, 식생 같은 유형별로 묶고, 그룹 전체를 켜거나 끕니다. 변경 내용은 지도가 다시 불러와질 때까지 유지됩니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Toggle CARLA environment objects
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.
Show or hide the map's static, baked assets — buildings, vegetation, poles,
fences, walls, signs — grouped by CityObjectLabel. These are not spawned
actors: they come with the map. Toggling changes both rendering and
collision, applies to the whole matching set at once, and resets on a map
reload.
Resolving words to a label
The agent maps the request to a CityObjectLabel (run labels for the list),
then acts:
- "hide the buildings" →
disable --label Buildings - "remove the trees" →
disable --label Vegetation - "turn off street poles" →
disable --label Poles - "show only the roads" → disable the other big labels (Buildings, Vegetation,
Fences, Walls…), or re-
enableselectively.
Narrow within a label by asset name with --name (substring).
Instructions
Progress:
- [ ] Step 1: Check prerequisites (bash scripts/check_env.sh), clear FAILs
- [ ] Step 2: List to see labels/counts (labels, list --label X)
- [ ] Step 3: disable / enable the matching set (use --dry-run first if unsure)
- [ ] Step 4: Confirm on a rendered view (effect is visual + collision)
Commands need CARLA_HOST/CARLA_PORT from scripts/env.sh.
Step 1: Check prerequisites
bash scripts/check_env.sh
Step 2-3: List and toggle
source scripts/env.sh
python3 scripts/toggle_env.py labels # valid CityObjectLabel names
python3 scripts/toggle_env.py list # whole-map summary by type
python3 scripts/toggle_env.py list --label Buildings # count + sample of buildings
python3 scripts/toggle_env.py disable --label Buildings # hide all buildings
python3 scripts/toggle_env.py disable --label Vegetation --dry-run # preview first
python3 scripts/toggle_env.py disable --label Poles --name lamp # subset by name
python3 scripts/toggle_env.py enable --label Buildings # bring them back
Step 4: Confirm
The effect is visual + collision on a rendered server. enable_environment_objects
returns nothing to read back, so the command reports the count toggled;
confirm the change in a windowed/packaged view.
On CARLA 0.10.0 (the UE5 line: 5.5 and 5.8)
get_environment_objects() and enable_environment_objects() — what this skill
uses — work normally. Measured on Town10HD_Opt: 59 102 objects, 48 369 of them
Buildings, then Vegetation 4 270, Fences 1 767, Static 1 223,
Dynamic 489, Sidewalks 269, TrafficSigns 147, Poles 120,
TrafficLight 62, Bicycle 56, plus 1 768 labelled NONE.
CityObjectLabel gained Rock (= 29), which does not exist on 0.9.x
(LibCarla/source/carla/rpc/ObjectLabel.h:48). Code that iterates the enum by
name is fine; code that hard-codes label integers is not.
Do not reach for map layers as an alternative here. load_map_layer /
unload_map_layer are accepted and silently do nothing on 0.10.0 — see
[[load-map]] for the measurement and the cause. enable_environment_objects is
the mechanism that actually hides geometry on this version.
Examples
Example 1: clear the buildings
User says: "hide all the buildings"
disable --label Buildings → reports N buildings hidden; the town goes bare.
enable --label Buildings restores them.
Example 2: strip vegetation for a clean capture
User says: "remove the trees and bushes"
disable --label Vegetation. Combine with a weather/settings setup for dataset
capture.
Example 3: preview before a big toggle
User says: "what would hiding the fences affect?"
disable --label Fences --dry-run lists the count and sample without changing
anything.
Troubleshooting
Problem: nothing changes visually
Cause: headless -nullrhi server (no rendering), or wrong label.
Solution: use a rendered server; list --label X to confirm the set is non-empty.
Problem: objects came back after loading a map
Cause: toggles are per-world; a map load/reload rebuilds all objects.
Solution: re-apply the toggles after load-map.
Problem: list --label X is empty but I see those assets
Cause: the assets may be tagged under a different label (e.g. Static/Other).
Solution: list (no label) for the by-type summary, then target the right label.
O
자주 묻는 질문
건물을 숨기면 충돌도 사라지나요?
네. 객체를 끄면 보이는 모습뿐 아니라 차량이 부딪힐 수 있는지도 바뀝니다.
일부 건물만 숨길 수 있나요?
네. 그룹 안에서 이름을 사용해 일치하는 항목으로 변경 범위를 좁힐 수 있습니다.
지도를 다시 불러오면 변경이 유지되나요?
아니요. 지도가 다시 불러와지면 항목은 원래 상태로 돌아갑니다.
상세 정보
작성자의 원본 설명
Lists and toggles a map's static environment objects via get_environment_objects / enable_environment_objects — hide or show buildings, vegetation, poles, fences, traffic signs and other baked assets by CityObjectLabel (and optional name filter). Use when the user asks to "hide/remove the buildings", "turn off the trees/vegetation", "show only the roads", "disable the fences", or "list the environment objects". Affects rendering and collision; resets on map reload.
repo: carla-simulator/carla
인기도
- GitHub 스타
- 15k
- 순위
- #11105
- 라이선스
- 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 라이브러리로 바꿔, 테스트가 일부 데이터만 써도 타입 검사를 통과하도록 돕습니다.