跳到正文
Skillpedia
部署与云(DevOps)15k · #11121

build-carla-ue4

它能做什么

这项技能会在 Linux 电脑上从头到尾由源代码编译 CARLA 模拟器。适合需要自定义或未发布版本模拟器的技术人员。

适用场景

  • ✓当你需要的 CARLA 版本没有现成下载时。
  • ✓当你想在构建时开启原生 ROS 2 接口的时候。
  • ✓当你想通过运行中的服务器测试来确认构建可用的时候。

技能链接

https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/ue4/build-carla-ue4/SKILL.md

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“请帮我在我的 Linux 电脑上从源代码构建 CARLA,包括 Python 客户端,并确认服务器可以运行。”

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

工作原理

智能体会按顺序构建各个部分,遇到已存在的部分就跳过,并逐一检查结果。构建内容包括引擎、模拟器服务器和 Python 软件包。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Build CARLA ue4-dev on Linux (end-to-end)

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.

Builds CARLA from the ue4-dev branch (Unreal Engine 4.26) on Ubuntu 20.04 / 22.04 / 24.04. Each step is an idempotent script under scripts/; the scripts ARE the procedure — running them in order performs and verifies the build. Not for ue5-dev — that branch uses a different (CMake/CarlaSetup) build system entirely (L1).

Scope

This skill compiles CARLA's source artifacts and proves them, nothing more:

  1. Engine (if needed) — the CarlaUnreal UE 4.26 fork → UE4Editor (step 03).
  2. Server (if needed) — the Carla editor C++ modules incl the server plugin and CarlaTools, runnable uncooked via -nullrhi (step 06, make CarlaUE4Editor).
  3. PythonAPI (if needed) — LibCarla client + boost bindings → wheel installed into the active env (step 04).
  4. Launch (opt-in) — open the UE4 editor UI for interactive work (TARGET=launch on step 06, make launch).

Each build step is idempotent and skips when its artifact is already present (FORCE=1 to rebuild). Two adjacent jobs are out of scope and delegated:

  • Cooking/packaging a distributable Dist/ tarball → [[package-carla-ue4]] (make package). Do not cook here.
  • Running/serving the build (headless smoke-tests, windowed demos) → [[run-carla-server]]. Step 07 uses it to verify.

Full battle-log: references/lessons.md — every non-obvious failure hit during this build, with root cause + fix. Read it before debugging. L# citations below point at it.

Instructions

Copy this checklist and track progress — the build is long and gated, so a skipped step usually surfaces an hour in:

Build Progress:
- [ ] Step 0: Check prerequisites (bash scripts/check_env.sh), clear FAILs
- [ ] Step 1: apt deps (sudo — real terminal)   |  Step 2: prepare Python client env
- [ ] Step 3: build the UE4 fork (engine)  ||  Step 5: fetch content   (parallel, long)
- [ ] Step 6: build the server — make CarlaUE4Editor (needs 3)
- [ ] Step 4: build PythonAPI + install wheel (needs 2+3)
- [ ] Step 7: verify — boot from-source server (run-carla-server) + generate_traffic.py (needs 4+5+6)
- [ ] (opt-in) Step 6 TARGET=launch: open the UE4 editor UI (make launch)
- [ ] (separate skill) cook a Dist/ package -> package-carla-ue4

Prerequisites

  • Linux, x86_64. Ubuntu 20.04/22.04 supported; 24.04 works via the in-repo compat shim (see deltas below).
  • ~120 GB free disk (UE4 ~80 GB + content ~31 GB + intermediate builds, L2).
  • A CUDA-capable NVIDIA GPU (RTX-class) for the rendering server.
  • A Python client env, active — venv, conda, or system; no manager is assumed (mechanism in "Python client env" below). 3.10–3.12 all build on this HEAD (L5's ">3.10 breaks" caveat is stale). No env yet? Create one, e.g.:
    python3.12 -m venv ~/carla-client && source ~/carla-client/bin/activate   # venv
    # or:  conda create -y -n carla-ue4 python=3.12 && conda activate carla-ue4
    
  • Epic-linked GitHub account — the UE4 fork is private to the Epic Games org. Before step 03 the user MUST link their account (https://www.unrealengine.com/en-US/ue-on-github) and be able to clone https://github.com/CarlaUnreal/UnrealEngine.git (branch carla). If that clone returns repository not found/403, the account is not linked — STOP and surface exactly this; nothing downstream can proceed.

Set the roots (scripts/env.sh resolves them, all overridable):

  • UE4_ROOT — the CarlaUnreal UE 4.26 fork checkout. No default — export it.
  • CARLA_UE4_ROOT — the carla ue4-dev source checkout. Defaults to $PWD if it is a checkout, else a path-derived guess; export it otherwise.

Quick start

cd Skills/ue4/build-carla-ue4
source ~/carla-client/bin/activate     # activate ANY compatible client env first
export UE4_ROOT=/path/to/UnrealEngine_4.26
export CARLA_UE4_ROOT=/path/to/carla   # or run from inside the checkout

bash scripts/check_env.sh
bash scripts/01_install_deps.sh          # sudo — run in a real terminal (L11)
bash scripts/02_client_env.sh &
bash scripts/03_build_ue4.sh &           # long
bash scripts/05_fetch_content.sh &       # long
wait
bash scripts/0
常见问题

构建需要多长时间?

这项技能没有给出固定时间。构建涉及多个大型部分,因此可能需要很长时间。

之后还能开启 ROS 2 吗?

不能。ROS 2 支持必须在构建时选定,之后无法再添加。

能在 Windows 上运行吗?

不能。这项技能是为 Linux 电脑编写的,具体适用于其中列出的 Ubuntu 版本。

详情

作者的原始描述

Builds CARLA (branch ue4-dev, Unreal Engine 4.26) from source on Linux end-to-end — UE4 fork, the Carla server (editor C++ modules), the LibCarla Python client wheel, and content — then verifies them against a from-source server. Optionally builds the native ROS 2 interface in (ROS2=1 → --ros2, Fast-DDS/CycloneDDS/Zenoh), which is compile-time only and cannot be enabled later. Use when the user asks to "build CARLA from source", "compile CARLA ue4-dev", "set up CARLA on Ubuntu (incl. 24.04)", "build CARLA with ROS2 support", or "produce a CARLA server + client wheel". Cooking a distributable D

repo: carla-simulator/carla

热度

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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能