load-map
Skill này làm gì
Skill thay đổi bản đồ mà simulator đang chạy. Skill dành cho lập trình viên muốn thử nghiệm trong một thị trấn hoặc mạng đường khác.
Khi nào nên dùng
- ✓Khi bạn muốn chuyển simulator sang một thị trấn hoặc bản đồ khác.
- ✓Khi bạn muốn tải lại thế giới hiện tại.
- ✓Khi bạn muốn nạp một file đường OpenDRIVE hoặc bật tắt các lớp bản đồ.
Liên kết skill
https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/python-api/load-map/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
“Hãy tải Town10 trên server đang chạy của tôi và giữ nguyên các cài đặt đồng bộ.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent liệt kê hoặc gọi tên bản đồ, tải nó qua Python API, rồi đọc lại tên bản đồ và các cài đặt để xác nhận. Tùy chọn giữ cài đặt mang chế độ đồng bộ, bước thời gian và chế độ render hiện tại sang thế giới mớ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.
Load a CARLA map
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.
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/mapre-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_localrequest (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: 1and publishes nothing, because
Câu hỏi thường gặp
Giữ cài đặt nghĩa là gì?
Nó mang chế độ đồng bộ, bước thời gian và chế độ render hiện tại sang bản đồ mới thay vì đặt lại.
Skill có kiểm tra bản đồ đã đổi chưa không?
Có. Skill đọc lại tên bản đồ và cài đặt sau mỗi lần tải.
Có thể tải file đường tùy chỉnh không?
Có. Skill có thể tạo thế giới từ một file OpenDRIVE .xodr.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 15k
- Vị trí xếp hạng
- #11093
- 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ự
blucli
394kGiúp agent của bạn tìm, phát, tạm dừng, nhóm và chỉnh âm lượng loa Bluesound và NAD qua lệnh blu.
camsnap
394kGiúp agent của bạn chụp ảnh, quay clip ngắn hoặc lấy sự kiện chuyển động từ camera mạng và webcam nội bộ mà bạn đã thiết lập.
eightctl
394kGiúp agent của bạn kiểm tra và điều khiển thiết bị Eight Sleep pod, gồm nhiệt độ, báo thức và lịch ngủ.