toggle-env-objects
ما الذي تفعله
تشغّل هذه المهارة عناصر الخلفية المدمجة في خريطة CARLA وتوقفها، مثل المباني والأشجار. وهي مخصصة لمن يريد رؤية أوضح للطرق أو مشاهد اختبار أنظف.
متى تستخدمها
- ✓عندما تريد إخفاء المباني حتى تظهر الطرق والسيارات فقط.
- ✓عندما تحتاج إلى إزالة الأشجار أو النباتات الأخرى من المشهد الذي تختبره.
- ✓عندما تريد رؤية قائمة بالعناصر الموجودة في الخريطة قبل تغيير أي شيء.
رابط المهارة
https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/python-api/toggle-env-objects/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“هل يمكنك إخفاء كل المباني في خريطة CARLA حتى أرى الطرق والسيارات فقط؟”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يجمّع الوكيل العناصر الثابتة في الخريطة حسب نوعها، مثل Buildings أو Vegetation، ويشغّل مجموعة كاملة أو يوقفها. يبقى التغيير ساريًا حتى تُعاد تحميل الخريطة.
المحتوى التقني (ملف 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
- آخر تحديث
- 2/11/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
create-leaderboard-route
15kيساعد وكيلك على بناء ملفات مسارات CARLA Leaderboard بوضع نقاط الطريق ومحفزات السيناريوهات من كاميرا المحاكي، ثم فحصها وترتيبها.
package-leaderboard-agent
15kيساعد وكيلك على تغليف وكيل قيادة في صورة Docker لتقديمه إلى CARLA Leaderboard، مع فحص بنية المجلدات واختبار أن الصورة تحمّله.
read-leaderboard-results
15kيساعد وكيلك على قراءة ملف نتائج CARLA Leaderboard، وشرح درجة كل مسار ومخالفاته، وإعادة احتساب التشغيل بقواعد النسخة الأخرى.
run-leaderboard-evaluation
15kيساعد وكيلك على تشغيل مقيّم CARLA Leaderboard على مجموعة مسارات مع وكيل قيادتك، بفحص الإعداد أولًا وحفظ نقاط يمكن استئناف التشغيل منها.
مهارات مشابهة
test-driven-development
311kيعلّم وكيلك كتابة اختبار فاشل أولًا، ثم رؤيته يفشل، ثم كتابة أصغر شيفرة تنجحه، قبل بناء أي ميزة أو إصلاح.
verification-before-completion
311kيعلّم وكيلك تشغيل فحوصات حقيقية وقراءة نتائجها قبل أن يقول إن المهمة أو الإصلاح أو البناء مكتمل أو ناجح.
migrate-to-shoehorn
310kيستبدل تأكيدات النوع الخطرة في ملفات الاختبار بمكتبة shoehorn، حتى تتمكن الاختبارات من استخدام بيانات جزئية وتجتاز فحوص الأنواع.