toggle-env-objects

Lists and toggles CARLA map environment objects by CityObjectLabel via the Python API.

3|Updated Jul 20, 2026
One-click install
npx skills add https://github.com/carla-simulator/carla-agentic-tools --skill toggle-env-objects-carla-simulator
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: toggle-env-objects
Source: https://github.com/carla-simulator/carla-agentic-tools/tree/main/skills/python-api/toggle-env-objects
Command: npx skills add https://github.com/carla-simulator/carla-agentic-tools --skill toggle-env-objects-carla-simulator

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires carla, and includes scripts (resource) and references (resource) components.

What problem does it solve? Hiding or showing static, map-baked assets in CARLA (buildings, vegetation, poles, fences, signs) requires knowing the get_environment_objects / enable_environment_objects API and the CityObjectLabel taxonomy; this Skill encodes that procedure so an agent can list, preview, and toggle these objects without improvising. ## Core Features & Use Cases - List and summarize environment objects: Run labels for valid CityObjectLabel names and list for a whole-map by-type summary or per-label counts with samples. - Toggle visibility and collision by label: disable --label Buildings hides all buildings (rendering and collision); enable restores them, with --name substring filtering and --dry-run previews. - Use Case: A user asks to "remove the trees for a clean dataset capture" — the agent maps this to disable --label Vegetation, confirms the count toggled, and notes the state resets on map reload. ## Quick Start Ask the agent to hide all the buildings in the current CARLA map, or to list the environment objects by type first.

Frequently Asked Questions about toggle-env-objects

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I hide buildings or trees in a CARLA map?▼

Use the toggle_env.py script with disable and a CityObjectLabel, for example `disable --label Buildings` or `disable --label Vegetation`. This hides every matching static object, affecting both rendering and collision, and `enable --label X` restores them.

How to list environment objects in CARLA by type?▼

Run `toggle_env.py list` for a whole-map summary grouped by CityObjectLabel, or `list --label Buildings` for a count and sample of a specific label. The `labels` command prints all valid CityObjectLabel names.

Does enable_environment_objects work on CARLA 0.10.0 (UE5)?▼

Yes, get_environment_objects and enable_environment_objects work normally on CARLA 0.10.0, which adds a new Rock label (= 29). Map layer calls like load_map_layer are silently ignored on 0.10.0, so environment objects are the mechanism that actually hides geometry.

Why do hidden CARLA objects come back after loading a map?▼

Environment object toggles are per-world state, and a map load or reload rebuilds all objects. Re-apply the disable commands after any load-map operation to restore the hidden state.

Can I hide only some objects within a CityObjectLabel?▼

Yes, use the --name option for a case-insensitive substring match on the asset instance name, such as `disable --label Poles --name lamp`. A --limit option caps how many matched objects are toggled, and --dry-run previews the set first.

Why does toggling environment objects show no visual change?▼

The usual cause is a headless server started with -nullrhi, which does no rendering, or targeting the wrong label. Use a rendered server and run `list --label X` to confirm the target set is non-empty.