import-carla-map
它能做什么
这项技能把你在 RoadRunner 中制作的道路地图转换为可在 CARLA 模拟器中运行的地图。适合为驾驶测试搭建自定义城镇或道路布局的人。
适用场景
- ✓当你已有 RoadRunner 导出的道路地图,并想在 CARLA 中使用的时候。
- ✓当你的地图非常大、被切分成多个区块,需要分批导入时。
- ✓当你想在运行中的服务器上检查导入的地图能否正常加载的时候。
技能链接
https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/ue4/import-carla-map/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我把文件夹中的 RoadRunner 地图导入 CARLA,并检查我能否在上面驾驶。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会从你指定的文件夹中读取地图的网格和道路文件,然后运行 CARLA 的导入工具,构建包含交通路线和人行区域的地图。原始文件会被复制,不会被更改。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Import a map into CARLA
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.
Turn a RoadRunner export — an .fbx mesh plus its .xodr OpenDRIVE — into a
CARLA map you can load and drive on. The map's directory comes from the
request — Import/Maps, ~/dev/Maps/MyTown, a mounted share, anywhere. Ask
for it if the request doesn't say; never guess a location. Your files are only
read, never modified in place (Import.py copies them into
Util/DockerUtils/dist/ for the navmesh stage and deletes the copies again).
# standard map: MyTown.fbx + MyTown.xodr in the directory the user named
python3 scripts/import_map.py <map-dir> --package MyTown
# large map: MyTown_Tile_0_0.fbx … + MyTown.xodr, imported in memory-bounded batches
python3 scripts/import_map.py <map-dir> --package BigCity --tile-size 1000 --batch-size 200
Both go through the same Import.py pipeline; the large-map path is just a
branch on the tile naming. The map lands at
/Game/<package>/Maps/<name>/<name>, cooked with its Traffic Manager route
graph and — for standard maps only — its pedestrian navmesh (Step 4).
Pipeline internals, naming rules, the tiled branch and the M-lessons:
references/maps.md.
Instructions
Map Import Progress:
- [ ] Step 1: Check prerequisites — hand off to build-carla-ue4 on a build/carla FAIL
- [ ] Step 2: Import (one command: runs Import.py over the map's directory, verifies artifacts)
- [ ] Step 3: Verify it loads and drives on a running server
- [ ] Step 4: (standard maps + walkers only) build and inspect the pedestrian navmesh
- [ ] (opt-in) Cook it into a distributable package
Step 1: Check prerequisites
bash scripts/check_env.sh <map-dir> # map-dir optional: also checks the .fbx/.xodr pair
Blocks only on hard failures: a runnable editor for this project (UE4_ROOT, the
checkout, CarlaUE4Editor) and a python that imports carla — map import
runs carla.Map() in-process, so a missing wheel aborts Import.py on its first
line (M4). On a build FAIL, stop and run [[build-carla-ue4]] against that
checkout.
Read the WARN lines too. Two matter before you import anything: Content -> … (shared with other checkouts) means the map lands in a content clone every
worktree sees, and leftover geometry in Util/DockerUtils/dist from an
interrupted run can feed the next navmesh build stale data.
Run it with the map directory as above. The MCP check_prerequisites tool takes
no argument, so through that path you get the environment checks only — the
.fbx/.xodr pair is then first checked by import_map.py itself.
The carla wheel must be importable by the python3 that runs Step 2 — unlike
prop import, that is a hard requirement here, not a verify-only one. You bring the
env; the skill never creates one:
- Activate it in the same shell before Step 2 (venv/conda/pyenv/system — no manager is assumed).
- Non-interactive? Point
CARLA_ENV_ACTIVATEat its activate script — an optional hookscripts/env.shsources, used by bothcheck_env.shandimport_map.py. Nothing else is detected. check_env.shprints the interpreter it resolved (client python: … (imports carla)); that line is the one to trust, not which env you think is active.
A missing FBX2OBJ is a warning, and only for a standard map: it imports and
drives, but gets no pedestrian navmesh. Do Step 4 first if that map needs
walkers, so the import builds the navmesh in one pass.
Step 2: Import
python3 scripts/import_map.py <map-dir> --package <PackageName>
<map-dir> is the directory the user named (or the .xodr/.fbx in it). The
script enforces the one rule that breaks silently otherwise — the .fbx and
.xodr must share the same name root (M1) — detects standard vs. tiled, runs
Import.py against that directory, then confirms the cooked artifacts by path and
size.
This imports into the source build you are running against: the map lands in
the Content tree and loads in the editor or on an uncooked server straight away.
Cooking a distributable package (a Dist/ tarball) is the separate opt-in step
at the end.
Always pass --package. It names the content package — the folder under
Content/ that holds the map and the `Config/<
常见问题
地图文件应该放在哪里?
放在你指定的文件夹中,例如存放网格和道路描述文件的文件夹。
我的原始文件会被修改吗?
不会。这项技能只读取它们,并复制一份用于导入,之后再删除这些副本。
大型地图会添加人行区域吗?
不会。非常大的分块地图不会添加人行区域,这与 CARLA 自身对大型地图的处理方式一致。
详情
作者的原始描述
Imports a custom RoadRunner map (FBX geometry + XODR OpenDRIVE) into a CARLA source build as a drivable map — reads the map from the directory the user names, runs CARLA's Import.py to cook the level, Traffic Manager graph and (standard maps only) pedestrian navmesh, and verifies it loads on a server. Handles both standard maps and large tiled maps; large maps get no navmesh, matching upstream CARLA. Use when the user asks to "import a map into CARLA", "add a custom/RoadRunner map", "ingest an FBX+XODR map", "make import", bring in a "large/tiled map", or fix missing walkers / a missing pedest
repo: carla-simulator/carla
热度
- GitHub 星标
- 15k
- 排名
- #11122
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
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 评估器,先检查设置,并保存可以恢复的检查点。