run-carla-ue58-server
它能做什么
这项技能启动基于 Unreal Engine 5.8 构建的 CARLA 模拟器服务器,使你的程序可以连接。适合需要运行模拟器进行测试、又不需要屏幕的人。
适用场景
- ✓当你想在不打开窗口的情况下运行较新的 CARLA 服务器进行测试的时候。
- ✓当你已有打包好的 CARLA 构建,并想启动它的时候。
- ✓当你需要检查一个已在运行的服务器是否响应的时候。
技能链接
https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/ue58/run-carla-ue58-server/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我在无窗口模式下启动 Unreal 5.8 的 CARLA 服务器,并在我连接代码之前确认它有响应。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会从三种运行方式中选一种,启动服务器并等待其就绪。它也可以检查正在运行的服务器,并干净地将其停止。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Run a CARLA UE 5.8 server
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 ways to get a server, and the choice matters more than on UE4:
| Mode | What it is | Use it when |
|---|---|---|
game |
the editor binary with -game |
default. Full client support, every map in the tree |
package |
Build/<preset>/Package/.../CarlaUnreal.sh |
shipping a build; only the cooked maps exist, see below |
editor |
the full editor GUI | authoring, visual debugging |
There is a fourth thing that looks like the answer and is not:
Unreal/CarlaUnreal/Binaries/Linux/CarlaUnreal, the uncooked Development game
target. It cannot start — it is built to load cooked content and the tree has
none, so it dies on the missing global shader cache. nurec/README.md recommends
it anyway. Use game mode instead.
Instructions
Progress:
- [ ] Step 1: Check prerequisites (bash scripts/check_env.sh)
- [ ] Step 2: See what is runnable (detect)
- [ ] Step 3: Start it
- [ ] Step 4: Probe it before running your real client
- [ ] Step 5: Stop it
Step 2-3: Start
source scripts/env.sh
bash scripts/run_server.sh detect
# the normal case: headless, backgrounded, waits until the RPC port answers
DETACH=1 bash scripts/run_server.sh game Town10HD_Opt
# with native ROS 2
DETACH=1 ROS2=1 bash scripts/run_server.sh game Town10HD_Opt
# the packaged server
DETACH=1 bash scripts/run_server.sh package Town10HD_Opt
# a second server alongside the first
PORT=3000 DETACH=1 bash scripts/run_server.sh game
| Knob | Effect |
|---|---|
DETACH=1 |
background it and wait for the RPC port; log to /tmp/carla-ue58-<port>.log |
PORT / TM_PORT |
RPC port (streaming is PORT+1); default 2000 / 8000 |
ROS2=1 |
append -ros2; needs a build with ENABLE_ROS2=ON |
RMW= |
fastdds (default), cyclonedds, zenoh |
ROS_DOMAIN_ID= |
must match the subscriber side |
WINDOW=1 |
render to a window instead of offscreen; implies -notrace |
TRACE=1 |
keep UnrealTrace enabled under WINDOW=1 |
RES=WxH |
window size, WINDOW=1 only (e.g. RES=1920x1080) |
FULLSCREEN=1 |
exclusive fullscreen, WINDOW=1 only; default is -windowed |
NULLRHI=1 |
no RHI at all — see the warning below |
QUALITY=Low |
-quality-level=Low |
EXTRA= |
anything else |
DETACH=1 is not a convenience. A plain trailing & leaves the server
holding the shell's stdio; when that goes away it dies with
close: Bad file descriptor and then Signal 11. The script uses
setsid nohup … </dev/null &.
Filling the screen (and why not -fullscreen by default)
WINDOW=1 alone leaves the window at whatever size the engine picks. To fill a
display, give it the size and leave it a normal window:
WINDOW=1 RES=1920x1080 DETACH=1 bash scripts/run_server.sh game Town10HD_Opt
FULLSCREEN=1 asks for exclusive fullscreen instead, and it is deliberately not
the default: an overlay window — a terminal being screen-recorded on top of the
simulator, for instance — does not reliably stay above an exclusive-fullscreen
window, and some capture paths flicker. Sized-and-windowed looks the same on
camera and composites properly.
WINDOW=1 and the UnrealTrace crash
A windowed launch started straight after a headless one died on startup:
SIGSEGV: invalid attempt to read memory at address 0x00007dcfcdff1a10
UE::Trace::Private::Writer_WorkerThread [Trace/Writer.cpp:1082]
-> TraceAuxiliaryOnMessageCallback [TraceAuxiliary.cpp:1455]
-> FLLMTracker::TrackAllocation [HAL/LLM/LLM.cpp:6630]
Inside UnrealTrace's own writer thread — not the window, not the RHI — with a
stale UnrealTraceServer daemon still resident from the previous run. The same
command came up clean with -notrace, so WINDOW=1 now passes it by default
and TRACE=1 puts it back. If a launch still dies this way, clear the daemon:
pkill -f "[U]nrealTraceServer"
NULLRHI=1 will crash the server if you spawn a camera
Not "produces no images" — crashes. With no RHI there is no render target, so the camera readback path dereferences null on the render thread:
Unhandled Exception: SIGSEGV: invalid attempt to read memory at address 0x58
libUnrealEditor-Carla.so!ImageUtil::ReadImageDat
常见问题
可以不用屏幕运行吗?
可以。服务器可以无头运行,渲染在离屏完成。
应该用哪种方式启动服务器?
默认是 Game 模式,因为它支持源代码树中的每张地图。
可以在这里开启 ROS 2 吗?
可以,使用单横线标志即可,前提是构建中已经包含 ROS 2。
详情
作者的原始描述
Starts a CARLA UE 5.8 server from a ue58-dev tree — the editor binary in -game mode (the working headless server), the packaged shipping build, or the full editor — with offscreen/nullrhi rendering, custom RPC and streaming ports, and native ROS 2 via the single-dash -ros2 flag. Probes a running server, and stops one cleanly despite the 15-character process-name truncation. Use when the user asks to "run/start CARLA UE5", "launch a ue58 server", "run headless", "publish ROS 2 topics from UE5", or a client cannot reach the simulator.
repo: carla-simulator/carla
热度
- GitHub 星标
- 15k
- 排名
- #11136
- 许可证
- 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 评估器,先检查设置,并保存可以恢复的检查点。