Langsung ke konten
Skillpedia
Lain-lain15k Β· #11093

load-map

Fungsinya

Skill ini mengubah peta yang sedang dijalankan simulator. Untuk developer yang ingin menguji di kota atau jaringan jalan yang berbeda.

Kapan dipakai

  • βœ“Saat Anda ingin mengganti simulator ke kota atau peta lain.
  • βœ“Saat Anda ingin memuat ulang dunia saat ini.
  • βœ“Saat Anda ingin memuat file jalan OpenDRIVE atau mengaktifkan dan mematikan lapisan peta.

Link skill

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

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/python-api/load-map/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œMuat Town10 pada server saya yang sedang berjalan dan pertahankan pengaturan sinkron saya.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent mendaftar atau menyebut peta, memuatnya melalui Python API, lalu membaca kembali nama peta dan pengaturan untuk memastikan. Opsi mempertahankan pengaturan membawa mode sinkron, langkah waktu, dan mode render saat ini ke dunia baru.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

Load a CARLA map

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.

Change what map a running server hosts, from a client. The deliverable is a verified world: after any load the map name and the sync/rendering settings are read back, because a load can quietly land on a different map or reset settings.

The one decision that governs every load: reset settings, or keep them? reset_settings=True (the API default) drops the new world to async/default rendering; reset_settings=False carries your current synchronous_mode, fixed_delta_seconds, and no_rendering_mode across. In this skill that is the --keep flag. Full semantics: references/map-loading.md.

Instructions

Progress:
- [ ] Step 1: Check prerequisites (bash scripts/check_env.sh), clear FAILs
- [ ] Step 2: List maps if the target name is unknown
- [ ] Step 3: Do the operation (load / reload / opendrive / layer), keep-settings if a sync pipeline is live
- [ ] Step 4: Verify the printed map name + settings match what was asked

All commands need CARLA_HOST/CARLA_PORT from scripts/env.sh (defaults 127.0.0.1:2000). Prefix any command with source scripts/env.sh or export them.

Step 1: Check prerequisites

bash scripts/check_env.sh

FAILs only on a missing carla module or an unreachable server β€” both are hard blockers for a client operation. Start a server first if it FAILs (no server is launched by this skill).

Step 2: List available maps

source scripts/env.sh
python3 scripts/load_map.py list

Names are returned stripped of the /Game/Carla/Maps/ prefix, so Town03, Town10HD_Opt, etc. β€” pass those straight to load.

Friendly names resolve, but not uniformly β€” load maps a bare town name to the map actually used: Town2 β†’ Town02 (non-opt, like every numbered town except one), but Town10 β†’ Town10HD_Opt (Town10's canonical map is the layered HD one; plain Town10HD exists but is effectively unused). An explicit exact name (Town02_Opt, Town10HD) is always honoured as typed; load prints what it resolved to.

Step 3: Do the operation

# load a map, resetting settings to default (the plain case)
python3 scripts/load_map.py load --map Town03

# load a map but KEEP current settings β€” use inside a sync-mode pipeline
python3 scripts/load_map.py load --map Town03 --keep

# reload the current map (fresh actors), reset vs keep settings
python3 scripts/load_map.py reload
python3 scripts/load_map.py reload --keep

# build a world from an OpenDRIVE file (road network only, no props)
python3 scripts/load_map.py opendrive --xodr /path/to/road.xodr

# build a world from an OpenStreetMap export (.osm -> xodr -> world)
python3 scripts/load_map.py osm --osm /path/to/city.osm

# stream layers in/out on a layered ('_Opt') map already loaded
python3 scripts/load_map.py load --map Town10HD_Opt --layers Ground,Buildings
python3 scripts/load_map.py layer --load Foliage,ParkedVehicles
python3 scripts/load_map.py layer --unload ParkedVehicles

Low freedom on the two fragile points β€” --keep when a sync pipeline is live, and layers only on _Opt/large maps; otherwise choose maps/params freely.

Step 4: Verify

Every mutating command prints a VERIFY block (map name + synchronous_mode, fixed_delta_seconds, no_rendering_mode). Do not trust that a call returned β€” confirm the block: the map name is the one you asked for, and the settings are default (plain) or unchanged (--keep). An OpenDRIVE world reports its name as Carla/Maps/OpenDriveMap.

On a ROS 2 server

A map switch is an episode switch, so on a server started with --ros2 ([[run-carla-server]] ROS2=1):

  • rt/carla/map re-publishes automatically β€” the new map's full OpenDRIVE, as a latched (transient_local) std_msgs/String. Verified: the sample content changes with the map. It carries no header, so there is no stamp or episode id to correlate with; reading it needs an explicit --qos-durability transient_local request (plus --full-length, or it truncates at 128 chars).
  • Every actor is destroyed β€” but its topics do NOT go away. Verified: after a switch the old sensor topic is still listed with Publisher count: 1 and publishes nothing, because
Pertanyaan umum

Apa arti mempertahankan pengaturan?

Membawa mode sinkron, langkah waktu, dan mode render saat ini ke peta baru, alih-alih mengatur ulang.

Apakah memeriksa bahwa peta sudah berubah?

Ya. Agent membaca kembali nama dan pengaturan peta setelah setiap pemuatan.

Bisakah memuat file jalan kustom?

Bisa. Skill dapat membuat dunia dari file OpenDRIVE .xodr.

Detail

Deskripsi asli dari pembuat

Loads, reloads, and reshapes the map on a running CARLA server via the Python API β€” get_available_maps, load_world and reload_world (with or without resetting world settings), generate a world from an OpenDRIVE .xodr, and load/unload map layers. Use when the user asks to "load a map", "change the town", "reload the world", "list available maps", "load an xodr/opendrive map", or "load/unload map layers", and when settings (sync mode, fixed delta) must survive the switch.

repo: carla-simulator/carla

Popularitas

Bintang GitHub
15k
Peringkat
#11093
Lisensi
MIT
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa