Skip to content

Guide · Open source

How to use CARLA: build, run and test driving software

Updated · written with AI from the project's own documentation and checked against our catalogue data

CARLA is an open-source simulator for autonomous driving research, used to develop, train and validate self-driving software without a real car on real roads. This guide is for researchers, labs and engineering teams who want to get it building from source. By the end you will know the prerequisites, the clone-and-build steps from the README, and the hardware and access requirements to check first.

CARLAcarla-simulator/carla · ★ 14.6k · MIT

Quick start

  1. 1Check your system. Confirm you have Ubuntu 22.04 or 24.04, or Windows 11, and an NVIDIA GPU with enough VRAM.
  2. 2Get Unreal Engine access. Link your GitHub account to Epic Games and make sure you can access the CARLA fork of Unreal Engine 5.8.
  3. 3Clone the repository. Clone the ue58-dev branch into a folder named CarlaUE5.
  4. 4Run the setup script. Run ./CarlaSetup.sh --interactive on Linux or CarlaSetup.bat on Windows, and enter credentials when prompted.
  5. 5Configure with CMake. Run the cmake configure command from the CARLA root directory.
  6. 6Build CARLA. Run cmake --build Build, then install the Python API if you need it.

Check whether CARLA fits your setup

CARLA is a heavy, build-from-source project. The README lists Ubuntu 22.04 or 24.04, or Windows 11, as the supported systems, and says the Unreal Engine 5.8 version will not work on Ubuntu 20.04 or Windows 10 or lower.

The recommended specs are an Intel i7 or i9 (9th to 11th gen), or AMD Ryzen 7 or 9, 32 GB RAM, an NVIDIA RTX 3070 or better, and 16 GB or more VRAM. Building also needs a GitHub account linked to Epic Games with access to the CARLA fork of Unreal Engine 5.8.

  • Supported OS: Ubuntu 22.04 or 24.04, or Windows 11
  • Recommended: 32 GB RAM and 16 GB or more VRAM on an NVIDIA GPU
  • Required: Git, a GitHub account linked to Epic Games with access to the UE5.8 fork
  • Python 3 is installed by the setup script on Linux if not present

Clone the UE5.8 development branch

Clone the repository from GitHub, specifying the ue58-dev branch. The README notes this branch exists alongside the Unreal Engine 4.26 version in the ue4-dev branch, and that the two differ significantly, so confirm you need UE5.8 first.

git clone -b ue58-dev https://github.com/carla-simulator/carla.git CarlaUE5

Run the setup script on Linux

From the CARLA root directory, run the setup script interactively. It prompts for your sudo password to install prerequisites, then for GitHub credentials to authorise the Unreal Engine download. The script installs Python 3 with apt by default; to use an existing Python, pass --python-root with the path (strip the /python3 suffix from the output of whereis python3).

For unattended runs, the README says to store credentials in the GIT_LOCAL_CREDENTIALS environment variable. This downloads and installs Unreal Engine 5.8, installs prerequisites and builds CARLA, which can take a long time and a lot of disk space.

  • Interactive: ./CarlaSetup.sh --interactive
  • Unattended: sudo -E ./CarlaSetup.sh (with GIT_LOCAL_CREDENTIALS set)
  • Windows: run CarlaSetup.bat; unattended mode is not available on Windows
cd CarlaUE5 ./CarlaSetup.sh --interactive

Configure and build with CMake

After the first setup, rebuilds use CMake from the CARLA root. On Linux, run the commands in a standard terminal. On Windows, open the x64 Native Tools Command Prompt for Visual Studio 2022. The Linux configure command includes -DENABLE_ROS2=ON, while the Windows one omits it.

If you target a specific Python installation, add -DPython_ROOT_DIR=PATH and -DPython3_ROOT_DIR=PATH to the configure command.

  • Configure: cmake -G Ninja -S . -B Build --toolchain=$PWD/CMake/Toolchain.cmake -DCMAKE_BUILD_TYPE=Release
  • Build: cmake --build Build
  • Install the Python API: cmake --build Build --target carla-python-api-install
  • Launch the editor: cmake --build Build --target launch
cmake -G Ninja -S . -B Build --toolchain=$PWD/CMake/Toolchain.cmake -DCMAKE_BUILD_TYPE=Release cmake --build Build

Find documentation for running simulations

The README does not walk through running a simulation. It points to the hosted documentation for first steps, the Python API reference, the Blueprint library and the asset catalogue. Use those to learn how to write client scripts and configure sensors and weather.

The README also lists related repositories: Scenario_Runner for traffic scenarios, ROS-bridge for connecting to ROS, and the Leaderboard for validating driving stacks.

  • First steps guide (ReadTheDocs)
  • Python API reference
  • Blueprint library and CARLA asset catalogue
  • Scenario_Runner, ROS-bridge and Leaderboard repositories

Understand the licence before you use it

CARLA-specific code is under the MIT License and CARLA-specific assets are under CC-BY. Unreal Engine 5 follows its own licence terms, so the engine part of your workflow is governed separately. Dependencies such as PROJ, SQLite and Xerces-C have their own licences listed in the README.

What people use it for

  • Testing perception or control software in simulated urban scenarios
  • Training imitation or reinforcement learning models on driving tasks
  • Running experiments with configurable sensor suites and environmental conditions
  • Validating driving stacks alongside the CARLA Leaderboard
  • Connecting CARLA to ROS through the ROS-bridge repository

Frequently asked questions

Is CARLA free to use?

CARLA-specific code is distributed under the MIT License and CARLA-specific assets are under CC-BY, according to the README. Unreal Engine 5 follows its own licence terms, and you need access to the CARLA fork of Unreal Engine 5.8 to build.

What are the requirements for CARLA?

The README lists Ubuntu 22.04 or 24.04, or Windows 11, plus a linked GitHub account with Unreal Engine access and Git. The recommended hardware is 32 GB RAM and an NVIDIA GPU with 16 GB or more VRAM.

Can I run CARLA on Ubuntu 20.04 or Windows 10?

No. The README states the Unreal Engine 5.8 version of CARLA will not work on Ubuntu 20.04 or Windows 10 or lower. The UE4.26 version in the ue4-dev branch is a different build.

How do I install CARLA?

Clone the ue58-dev branch with git, run the setup script (CarlaSetup.sh on Linux or CarlaSetup.bat on Windows), then build with CMake. The README gives the exact commands.

Why does the build need a GitHub account?

Building requires the CARLA fork of Unreal Engine 5.8, which is accessed through a GitHub account linked to Epic Games. The setup script prompts for your GitHub credentials to authorise the download.

What are alternatives to CARLA?

The comparable projects listed for this directory are AirSim, Autoware, Apollo (Baidu) and highway-env. Choose based on your platform, simulator needs and build effort.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

CARLA suits autonomous driving researchers, labs and teams who need configurable sensors, weather and urban scenarios and can meet the hardware and Unreal Engine access requirements. If you only want a simple demo or lack a recent NVIDIA GPU, 32 GB RAM or a supported OS, pick a lighter option such as highway-env.

Install options & downloads