跳到正文
Skillpedia
通用编程15k · #11131

import-carla-ue58-map

它能做什么

这项技能说明如何在 Unreal Engine 5.8 上为 CARLA 模拟器添加自己的道路地图,并根据你的目标选择合适的方法。适合想在自定义城镇或道路布局上驾驶的人。

适用场景

  • ✓当你有由 FBX 和 OpenDRIVE 文件制作的地图,并想把它放进 CARLA 构建中的时候。
  • ✓当你想让地图随打包好的 CARLA 服务器一起发布的时候。
  • ✓当你只有一个 OpenDRIVE 道路文件,想不做任何构建就快速试用的时候。

技能链接

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

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/ue58/import-carla-ue58-map/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请帮我选出把自定义道路地图放进 Unreal 5.8 上 CARLA 的正确方法。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会比较四种选项及各自的需求,然后带你完成适合的那一种。它会说明导入的文件最终存放在哪里,以及分块地图如何合并为一张地图。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Get a map into CARLA on UE 5.8

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.

Four different things get called "adding a map", and picking the wrong one wastes hours. They are not variations of one procedure:

Route What you need Build step Result
A. Cook into a package the map already in Content package target, 1–2 h map ships inside the .pak
B. Import into a source build .fbx + .xodr editor commandlets, minutes map in Content, usable in the editor
C. OpenDRIVE at runtime just a .xodr none procedural road mesh, no scenery
D. Standalone asset package — — does not exist on ue58-dev

Route D is the UE4 make package ARGS="--packages=Name" flow, and it is gone in both directions — nothing builds such a package and nothing installs one. The docs that described it (tuto_A_create_standalone.md, tuto_M_add_map_package.md) are absent from this tree: Docs/maps_tutorials.md and Docs/custom_assets_tutorials.md link to 10 files that do not exist. Do not plan around it — the section below lists this and the three other UE4 capabilities with no ue58 equivalent.

What the UE4 skill does that this one cannot

Read this before promising a user anything the UE4 flow could do. Four capabilities of [[import-carla-map]] have no equivalent on ue58-dev, all verified against both trees:

UE4 capability UE4 mechanism ue58 state
Build a standalone, distributable asset package Util/BuildTools/Package.sh --packages=Name1,Name2 gone — no Package.sh; the only targets are whole-server (package, packageShipping, packageDebug, packageDebugGame, packageDevelopment, packageTest, Unreal/CMakeLists.txt:546-551), scoped only by CARLA_MAPS_TO_COOK
Install such a package into an existing release Util/ImportAssets.sh, shipped at the release root gone — a built ue58 package root holds only CHANGELOG LICENSE Linux PythonAPI README Tools VERSION
Tag materials so imported geometry is segmented -run=GenerateTaggedMaterialsRegistry -PackageNames=…, run by Package.sh per package gone — the commandlet exists in 2 UE4 plugin files and 0 here, so semantic_tags comes back empty on imported assets ([[import-carla-ue58-prop]] hits the same wall)
Generate the pedestrian navmesh on import Util/DockerUtils/dist/ ships RecastBuilder; build.sh runs FBX2OBJ then RecastBuilder silently does nothing — see below

The navmesh gap is silent, and it is the one that bites

Import.py:487 build_binary_for_navigation shells out to Util/DockerUtils/dist/build.sh, whose every step is guarded:

if [ -f "FBX2OBJ" ]; then …
if [ -f "RecastBuilder" ]; then …

UE4 ships RecastBuilder in that folder. ue58's dist/ contains only addOBJ.py, build.bat, build.sh, get_xodr_crosswalks.py. CMake does build RecastBuilder — to Build/<preset>/_deps/recastnavigation-build/RecastBuilder/ and into packages as Tools/RecastBuilder — but nothing copies it into dist/, and no CMake target references DockerUtils at all. FBX2OBJ has its own Util/DockerUtils/fbx/CMakeLists.txt that the main build never adds, and no binary exists under Build/. So the import runs, exits 0, writes no .bin, and walkers cannot navigate the new map — with no warning anywhere.

Work around it by putting both binaries where build.sh looks:

cp "$(find "${CARLA_UE58_ROOT}/Build" -name RecastBuilder -type f | head -1)" \
   "${CARLA_UE58_ROOT}/Util/DockerUtils/dist/"
# FBX2OBJ must be built first: it is a standalone CMake project needing the FBX SDK
# cmake -S Util/DockerUtils/fbx -B /tmp/fbx2obj && cmake --build /tmp/fbx2obj

Route C is unaffected. CarlaEpisode.cpp:45 BuildRecastBuilderFile() prefers <RootDir>/Tools/RecastBuilder and falls back to the compiled-in RECASTBUILDER_PATH, so a runtime OpenDRIVE world gets its navmesh properly.

What is NOT missing

Util/Tools/Import.py is UE4's Util/BuildTools/Import.py with paths renamed — the whole diff is 24 lines (UE4_ROOT→CARLA_UNREAL_ENGINE_PATH, UE4Editor→UnrealEditor, CarlaUE4→CarlaUnreal, is not→!=, two imports). Every function is identical, and the thr

常见问题

最快的选项是什么?

运行时加载 OpenDRIVE 文件完全不需要构建,但它只提供道路形状,没有周边景物。

有独立的地图软件包吗?

没有。这项技能指出,该分支上不存在这个选项。

可以使用分块地图吗?

可以。这项技能会说明,如何把分块导出的地图合并为一张可流式加载的地图。

详情

作者的原始描述

Gets a custom map into CARLA on UE 5.8 — the four distinct routes and which one to pick — via Util/Tools/Import.py for FBX+OpenDRIVE assets into a source build, CARLA_MAPS_TO_COOK to ship a map inside a package, or client.generate_opendrive_world() for an OpenDRIVE-only map at runtime with no build at all. Covers where imported assets land, how a tiled export is merged into one streamable map and converted to World Partition, and the capabilities the UE4 skill has that ue58 lacks — standalone asset packages, their installer, semantic-material tagging, and a pedestrian navmesh that is generated

repo: carla-simulator/carla

热度

GitHub 星标
15k
排名
#11131
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能