toggle-env-objects
Skill này làm gì
Skill bật hoặc tắt các vật thể nền có sẵn của bản đồ CARLA, như tòa nhà và cây. Skill dành cho người muốn nhìn đường rõ hơn hoặc có cảnh thử nghiệm gọn gàng hơn.
Khi nào nên dùng
- ✓Khi bạn muốn ẩn tòa nhà để chỉ thấy đường và xe.
- ✓Khi bạn cần loại bỏ cây hoặc thực vật khác khỏi cảnh đang thử nghiệm.
- ✓Khi bạn muốn xem danh sách vật thể của bản đồ trước khi thay đổi gì.
Liên kết skill
https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/python-api/toggle-env-objects/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Bạn có thể ẩn tất cả tòa nhà trên bản đồ CARLA của tôi để tôi chỉ thấy đường và xe không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent nhóm các vật thể cố định của bản đồ theo loại, như Buildings hoặc Vegetation, và bật hoặc tắt cả nhóm. Thay đổi tồn tại cho đến khi bản đồ được tải lại.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
Câu hỏi thường gặp
Ẩn tòa nhà có xóa luôn va chạm của nó không?
Có. Tắt một vật thể sẽ thay đổi cả cách nó hiển thị lẫn việc xe có thể đâm vào nó không.
Có thể chỉ ẩn một số tòa nhà không?
Có. Một tên có thể dùng để thu hẹp thay đổi vào các mục khớp trong một nhóm.
Thay đổi có còn sau khi tôi tải lại bản đồ không?
Không. Các vật thể trở về trạng thái bình thường khi bản đồ được tải lại.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 15k
- Vị trí xếp hạng
- #11105
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
create-leaderboard-route
15kGiúp agent của bạn tạo file tuyến đường CARLA Leaderboard bằng cách đặt các điểm waypoint và trigger kịch bản từ camera của simulator, rồi kiểm tra và sắp xếp chúng.
package-leaderboard-agent
15kGiúp agent của bạn đóng gói một agent lái xe thành image Docker để nộp lên CARLA Leaderboard, kiểm tra cấu trúc thư mục và thử rằng image nạp được agent.
read-leaderboard-results
15kGiúp agent của bạn đọc file kết quả CARLA Leaderboard, giải thích điểm và vi phạm của từng tuyến, và chấm lại một lần chạy theo phiên bản luật khác.
run-leaderboard-evaluation
15kGiúp agent của bạn chạy bộ đánh giá CARLA Leaderboard trên một tập tuyến với agent lái xe, kiểm tra thiết lập trước và lưu checkpoint để có thể tiếp tục.
Skill tương tự
test-driven-development
311kDạy agent của bạn viết kiểm thử thất bại trước, xem nó thất bại, rồi viết đoạn mã ngắn nhất để vượt qua trước khi làm bất kỳ tính năng hay bản sửa nào.
verification-before-completion
311kDạy agent của bạn chạy kiểm tra thực tế và đọc kết quả đầu ra trước khi khẳng định một việc, bản sửa hoặc bản build đã hoàn thành hay vượt qua.
migrate-to-shoehorn
310kThay các ép kiểu rủi ro trong tệp kiểm thử bằng thư viện shoehorn, để các bài kiểm thử dùng dữ liệu một phần vẫn qua được kiểm tra kiểu.