Chuyển đến nội dung
Skillpedia
Triển khai và đám mây (DevOps)15k · #11129

build-carla-ue58

Skill này làm gì

Skill biên dịch simulator CARLA cho Unreal Engine 5.8 từ mã nguồn, dùng hệ thống build CMake. Skill dành cho người kỹ thuật cần một bản build tùy chỉnh của dòng CARLA mới hơn.

Khi nào nên dùng

  • ✓Khi bạn muốn build CARLA trên Unreal Engine 5.8 từ nhánh mã nguồn ue58-dev.
  • ✓Khi bạn cần giao diện ROS 2 hoặc các tính năng tùy chọn khác trong bản build.
  • ✓Khi một bản build lỗi và bạn cần các bước chính xác cho phiên bản này thay vì hướng dẫn UE4 cũ.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/ue58/build-carla-ue58/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Bạn có thể build CARLA cho Unreal Engine 5.8 từ thư mục mã nguồn của tôi, với tùy chọn ROS 2 được bật không?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent kiểm tra thiết lập của bạn, cấu hình bản build với các tùy chọn bạn chọn, rồi build các mục tiêu theo thứ tự. Các tùy chọn được lưu trong thiết lập build, nên phải nhập lại mỗi khi thiết lập build được tạo lại.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Build 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.

This tree has no Makefile and no Util/BuildTools/. Every UE4 recipe — make CarlaUE4, make PythonAPI, make launch, make package, make import — does not exist. The whole build is CMake:

cmake --preset Release                              # configure (once per option change)
cmake --build Build/Release --target <target>       # build

Two consequences that cause most of the confusion:

  • Options live in the CMake cache, not on the build line. -DENABLE_ROS2=ON is passed to --preset, and must be repeated on every re-configure. Forget it and you get a working build that silently has no ROS 2 in it.
  • The engine is a separate, prior build. CARLA_UNREAL_ENGINE_PATH must point at the CarlaUnreal fork on branch ue58-dev-carla (UE 5.8). The ue5-dev branch uses a different engine fork (ue5-dev-carla, UE 5.5) — see the [[build-carla-ue5]] skill for that one.

Instructions

Progress:
- [ ] Step 1: Check prerequisites (bash scripts/check_env.sh), clear every FAIL
- [ ] Step 2: Build the engine, if UnrealEditor is not there yet
- [ ] Step 3: Configure a preset with the options you actually want
- [ ] Step 4: Build the targets, in order
- [ ] Step 5: Verify the artifacts (not the exit codes)

Step 1: Preflight

source scripts/env.sh
bash scripts/check_env.sh

This reads the CMake cache and tells you what the tree was actually configured with — the only honest answer to "was this built with ROS 2?" — plus the engine version, the OFPA large-map patch state, and whether a past sudo poisoned ~/.nuget / ~/.epic.

Step 2: The engine

git clone -b ue58-dev-carla https://github.com/CarlaUnreal/UnrealEngine.git UnrealEngine5_carla
cd UnrealEngine5_carla
./Setup.sh && ./GenerateProjectFiles.sh && make
export CARLA_UNREAL_ENGINE_PATH=$PWD

make takes no -j. Parallel jobs kill each other on the UnrealBuildTool mutex (Failed (ConflictingInstance)); plain make is already parallel. Budget 2–3 h. The clone needs a GitHub account linked to Epic Games, or it 404s.

make can exit 0 with targets dead. Check the binary, never the exit code:

ls -l $CARLA_UNREAL_ENGINE_PATH/Engine/Binaries/Linux/UnrealEditor

Step 3: Configure

source scripts/env.sh

bash scripts/build.sh configure                       # Release, defaults
ROS2=1 bash scripts/build.sh configure                # + ROS 2 native
ROS2=1 MAPS="Town10HD_Opt,Town12,Town13" bash scripts/build.sh configure

or by hand:

cd "$CARLA_UE58_ROOT"
cmake --preset Release -DENABLE_ROS2=ON \
  -DCARLA_MAPS_TO_COOK="/Game/Carla/Maps/Town10HD_Opt+/Game/Carla/Maps/Town12/Town12"

Presets are Release, Development, Debug (plus the Common base). The options worth knowing:

Option Effect
-DENABLE_ROS2=ON native ROS 2; builds carla-ros2-native and links it into the plugin
-DCARLA_MAPS_TO_COOK= restrict the cook. +-separated package paths, not filesystem paths, not ;
-DCARLA_UNREAL_ENGINE_PATH= engine fork path (else the env var)
-DCARLA_UNREAL_RHI=vulkan RHI for the editor/game
-DCARLA_DLSS_SDK_PATH= DLSS SDK; disabled builds without it
-DENABLE_RSS=ON, -DENABLE_PYTORCH=ON both default OFF; the OSM to OpenDRIVE converter is always built
-DCARLA_UNREAL_PACKAGE_BUILD_TYPE=Shipping package configuration
-DCMAKE_DISABLE_FIND_PACKAGE_Qt5=ON -DCMAKE_DISABLE_FIND_PACKAGE_Qt6=ON when system Qt is installed but not linkable with the UE toolchain

bash scripts/build.sh options prints the full list with defaults, read from the tree rather than from this table.

Step 4: Build

bash scripts/build.sh libcarla        # carla-server + carla-client
bash scripts/build.sh pythonapi       # carla-python-api-install (builds + installs the wheel)
bash scripts/build.sh unreal          # carla-unreal        (the game/server target)
bash scripts/build.sh editor          # carla-unreal-editor
bash scripts/build.sh launch          # build + open the editor
bash scripts/build.sh targets         # every available target, from the tree

or directly:

cmake --build Build/Rele
Câu hỏi thường gặp

Có giống bản build UE4 cũ không?

Không. Phiên bản này dùng CMake thay vì các lệnh make cũ, nên các bước khác nhau.

Có cần build engine riêng không?

Có. Engine phải được build trước từ nhánh fork riêng của mã Unreal.

Điều gì xảy ra nếu tôi quên một tùy chọn?

Bản build có thể hoàn tất mà không có tính năng, chẳng hạn ROS 2, và nó sẽ không cảnh báo bạn.

Chi tiết

Mô tả gốc của tác giả

Builds CARLA on Unreal Engine 5.8 from the ue58-dev branch using its CMake build system — configure a preset, then build the carla-unreal / carla-unreal-editor / carla-python-api-install / launch targets — with ROS 2, DLSS, RSS and cook-scope options, and the engine-side build of the CarlaUnreal UE 5.8 fork. There is no Makefile and no Util/BuildTools in this tree, so every UE4 `make` recipe is invalid here. Use when the user asks to "build CARLA UE5", "build ue58-dev", "compile CARLA with cmake", "rebuild the Python API", or hits a CMake configure or target failure.

repo: carla-simulator/carla

Độ phổ biến

Sao GitHub
15k
Vị trí xếp hạng
#11129
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự