Quick start package installation
This guide shows how to download and install the packaged version of CARLA. The package includes the CARLA server and two options for the client library. There are additional assets that can be downloaded and imported into the package. Advanced customization and development options that require use of the Unreal Engine editor are not available but these can be accessed by using the build version of CARLA for either Windows or Linux.
Before you begin
The following requirements should be fulfilled before installing CARLA:
- System requirements: CARLA is built for Windows and Linux systems.
- Operating system: CARLA Unreal Engine 5 version requires a minimum of Ubuntu 22.04 or Windows 11.
- An adequate GPU: CARLA aims for realistic simulations that require a lot of compute power. We recommend at minimum an NVIDIA RTX 3000 series or better with at least 16 Gb of VRAM. A dedicated GPU, separate from the GPU used for CARLA, is highly recommended to handle large machine learning workloads.
- GPU drivers: CARLA Unreal Engine 5 version requires NVIDIA RTX driver release 550 or later for Ubuntu and NVIDIA RTX driver release 560 or later for Windows
- Disk space: CARLA requires 130 GB of hard disk (or SSD) space.
- Python: Python is the main scripting language in CARLA. CARLA supports Python 3 on Linux and Windows.
- Pip: The CARLA Python client requires pip3 version 20.3 or higher for installation. To check your pip version:
# For Python 3 pip3 -V
If you need to upgrade:
# For Python 3 pip3 install --upgrade pip
- Two TCP ports and a good internet connection. 2000 and 2001 by default. Make sure that these ports are not blocked by firewalls or any other applications.
- Other requirements. CARLA requires some Python dependencies. Install the dependencies according to your operating system:
Windows
pip3 install --user pygame numpy
Linux
pip3 install --user pygame numpy
CARLA package installation
Download the desired CARLA package from GitHub:
This repository contains different versions of CARLA. You will find options to download the current release with all the most recent fixes and features, previous releases and a nightly build with all the developmental fixes and features (the nightly build is the most unstable version of CARLA).
The package is a compressed file named CARLA_version.number. Download and extract the release file. It contains a precompiled version of the simulator, the Python API module and some scripts to be used as examples.
Note
The documentation you are currently viewing is for the Unreal Engine 5 versions of CARLA. If you are intending to use the Unreal Engine 4 version of CARLA, you should refer the the correct documentation.
Install client library
Install the CARLA client library from the wheel provided with the package:
cd CARLA_ROOT/PythonAPI/dist/
pip3 install carla-*.*.*-cp3**-linux_x86_64.whl
The characters denoted by wildcards depend upon the version of the simulator you are using and your Python version.
It is recommended to install the CARLA client library in a virtual environment to avoid conflicts when working with multiple versions.
You may also wish to install the wheel directly from the package, to ensure version consistency. Locate the CARLA Python wheel in PythonAPI/dist
and install it with PIP.
Running CARLA
Linux:
cd path/to/carla/root
./CarlaUnreal.sh
Windows:
cd path/to/carla/root
CarlaUnreal.exe
A window containing a view over Town 10 will pop up. This is the spectator view. To fly around the city use the mouse and WASD
keys, holding down the right mouse button to control the direction.
This window is driven by the simulator server which is now running and waiting for a client to connect and interact with the world. You can try some of the example scripts to create traffic in the city and drive a vehicle around the map. Open up two separate terminals and run the following commands:
# Terminal A
cd PythonAPI\examples
pip3 install -r requirements.txt
python3 generate_traffic.py
# Terminal B
cd PythonAPI\examples
python3 manual_control.py
Follow-up
By now you should have a packaged version of CARLA up and running. If you came across any difficulties during the installation process, feel free to post in the CARLA forum or in the Discord channel.
The next step is to learn more about the core concepts in CARLA. Start with the First steps tutorial to start learning and then refer to the Foundations, Actors, Maps and Sensors sections to form a deeper understanding of CARLA's functionality. You should also familiarize yourself with the Python API classes and methods in the Python API reference.