import-carla-ue58-prop
它能做什么
这项技能把三维网格导入 Unreal Engine 5.8 上的 CARLA 模拟器,作为道具使用。道具是指长椅和标志牌等物体。适合想在较新版本的模拟街道中添加自定义物品的人。
适用场景
- ✓当你有一个街道物体的三维模型,并想把它放进较新的 CARLA 构建的时候。
- ✓当新道具没有出现在模拟器中,你需要重启并检查的时候。
- ✓当你希望道具的尺寸根据实测尺寸设定,而不是靠猜测的时候。
技能链接
https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/ue58/import-carla-ue58-prop/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我把我的长椅三维模型导入 Unreal 5.8 上的 CARLA,并检查它是否以道具形式出现。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会在不打开编辑器窗口的情况下把网格导入编辑器,测量其尺寸,并把它加入道具列表。之后你需要重启服务器,道具才能被使用和验证。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Import a prop on UE 5.8
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.
Three steps, and the middle one is where UE4 recipes break:
FBX --(editor, headless)--> StaticMesh in Content
--(PropParameters.json)--> static.prop.<name> in the blueprint library
--(PropActorFactory)--> spawnable actor
Registration moved. On UE4 a prop is declared in a *.Package.json that
UCarlaBlueprintRegistry::LoadPropDefinitions scans for. On ue58 that function
has zero callers — it is dead code. Props are loaded by APropActorFactory
from Content/Carla/Config/PropParameters.json (key "Props", fields
Name/Mesh/Size). Writing a .Package.json changes nothing: verified by
doing it and watching the prop count stay at 83.
Instructions
Progress:
- [ ] Step 1: Check prerequisites (bash scripts/check_env.sh)
- [ ] Step 2: plan — see where the asset lands and what it will be called
- [ ] Step 3: import — get the scale right on the first go if you can
- [ ] Step 4: RESTART the server or editor, then verify
Step 2-3: Plan, then import
source scripts/env.sh
python3 scripts/import_prop.py plan ~/meshes/Bench.fbx
python3 scripts/import_prop.py import ~/meshes/Bench.fbx --tag Static
A directory works too, and a level of subdirectory is read as the tag — the same shape as the destination:
~/meshes/
├── Static/Bench.fbx -> /Game/Carla/Static/Static/Bench
└── Building/Kiosk.fbx -> /Game/Carla/Static/Building/Kiosk
| Flag | Effect |
|---|---|
--tag |
subfolder under the destination root (default Static) |
--scale |
import_uniform_scale; see below |
--size |
override the derived Tiny/Small/Medium/Big |
--dest-root |
default /Game/Carla/Static — keep it under /Game/Carla |
--no-register |
import the mesh without touching the registry |
--no-combine / --no-collision |
disable mesh combining / auto collision |
--verbose |
stream the editor log |
Get the scale right
FBX unit metadata is frequently absent or wrong, and nothing warns you. A door
from CARLA's own HoudiniEngine/Pieces imported at --scale 1.0 measured
0.43 × 250 × 400 m — a 400-metre door, spawnable and towering over the town.
At --scale 0.01 the same file measured 0.43 × 2.5 × 4.0 m and classified as
Medium.
import prints the measured dimensions and warns when the longest side exceeds
30 m, which is the practical "this is building-scale" threshold. Re-import with the
right factor; replace_existing is on, so it overwrites cleanly.
Size, when not overridden, comes from the measured longest dimension:
<=0.5 m Tiny, <=2 m Small, <=8 m Medium, else Big.
Keep the destination under /Game/Carla
An asset elsewhere in Content/ imports fine and works in the editor, but a
packaged server resolves content only under /Game/Carla/... — the same
single-fallback limitation that stops nested large maps loading from a package
([[run-carla-ue58-server]]). list flags any registered prop whose mesh sits
outside /Game/Carla.
Step 4: Restart, then verify
Prop definitions are read once at startup. A prop registered while a server is running will not appear until you restart it.
cd ../run-carla-ue58-server && bash scripts/run_server.sh stop
DETACH=1 bash scripts/run_server.sh game
cd ../import-carla-ue58-prop
python3 scripts/import_prop.py verify --name Bench --spawn
python3 scripts/import_prop.py list
verify checks the registry entry, that the .uasset is on disk, that the
blueprint is in the library with the right mesh_path, and — with --spawn —
spawns it, reports its bounding box and destroys it.
Undo
python3 scripts/import_prop.py revert --name Bench # dry run
python3 scripts/import_prop.py revert --name Bench --yes
Unregisters and deletes the asset directory. import and revert both back
PropParameters.json up to PropParameters.json.bak first.
Examples
Example 1: "add this bench mesh so I can spawn it"
plan, then import ~/bench.fbx. If the printed dimensions look wrong, re-import
with --scale. Restart the server, verify --spawn. The blueprint is
static.prop.bench.
**Example 2: "I imported a prop but it's not in the blueprint li
常见问题
为什么需要重启?
道具列表在模拟器启动时读取,因此新道具只有在重启后才会出现。
这项技能会修正我的模型尺寸吗?
它会根据测量的边界推导尺寸,这有助于解决三维文件中的单位比例问题。
它能撤销导入吗?
可以。这项技能可以干净地撤销导入。
详情
作者的原始描述
Imports FBX meshes into CARLA on UE 5.8 as spawnable props — drives the editor headlessly to import the mesh, derives the prop size from its measured bounds, and registers it in PropParameters.json so it appears in the blueprint library as static.prop.<name>. Handles the FBX unit-scale problem, verifies the result against a running server, and can revert cleanly. Use when the user asks to "import a prop", "add a custom mesh/object to CARLA", "make my model spawnable", or a prop imports but never shows up in the blueprint library.
repo: carla-simulator/carla
热度
- GitHub 星标
- 15k
- 排名
- #11132
- 许可证
- 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 评估器,先检查设置,并保存可以恢复的检查点。