Dependencies Installation

This document provides guidance for installing the CARLA fork of Unreal Engine 4.26 and other software dependencies. A large portion of it was created based on the official CARLA website. Our tutorial adds the ability to run CARLA in the Virtual Reality environment using the Unreal Engine 4 (UE4) and the Oculus Quest headset. Please read carefully and follow all the steps, and the installation can take anywhere from 6 to 12 hours, depending on the hardware specification.

Hardware Requirements

  • x64 system. Linux configuration is possible, but this instruction only covers Windows.
  • 200 GB disk space. Our customized CARLA package will take around 45 GB and the related major software installations (including UE4) will take 155 GB.
  • An adequate GPU. NVIDIA GTX 1080 TI and above is required. In order to run the simulation at optimal quality, NVIDIA RTX 3080 and above is recommended. The GPU should have at least 8 GB of dedicated memory, although 16 GB is recommended.
  • Two TCP ports. 2000 and 2001 by default. Make sure that these ports are not blocked by firewalls or any other applications.

Software Requirements

  • Make Install Make 3.8.1 by choosing "Complete package, except sources" from the download list. In the last step of installation, select “Download Sources”. Check your Make version by running make --version in a terminal. If you get the error: 'make' is not recognized as an internal or external command, operable program or batch file, then Make is not successfully installed or added to path.
  • CMake Install CMake using the Windows x64 Installer. Check your CMake version by running: cmake --version in a terminal, If you get the error 'cmake' is not recognized as an internal or external command, operable program or batch file, then CMake is not successfully installed or added to path.
  • Git Install Git using the 64-bit Windows Installer. Accept all defaults.
  • 7Zip Install 7-zip using the x64 Windows Installer. Accept all defaults.

Python Installation

1. Install Python 3.8.10 using the 64-bit Windows Installer. When prompted, add Python to system path. Check your Python version using python --version.
2. Upgrade pip and install the required dependencies.

    pip3 install --upgrade pip
    pip3 install --user setuptools
    pip3 install --user wheel

Visual Studio 2019

Download Visual Studio 2019 and choose Community version. Using the installer to add the following packages (will take about 20GB):

  • Windows 8.1 SDK. Select it in the Installation details section on the right or go to the Indivdual Components tab and look under the SDKs, libraries, and frameworks heading.
  • x64 Visual C++ Toolset. In the Workloads section, choose Desktop development with C++. This will enable a x64 command prompt that will be used for the build. Check that it has been installed correctly by pressing the Windows button and searching for x64. Be careful not to open a x86_x64 prompt.
  • .NET framework 4.6.2. In the Workloads section, choose .NET desktop development and then in the Installation details panel on the right, select .NET Framework 4.6.2 development tools. This is required to build Unreal Engine.

CARLA Unreal Engine 4.26

1. Download the modified version of the Unreal Enginer from here. You will need to create an Epic Games account and link it to your Github account in order to access the Unreal Engine.
2. Navigate into the Unreal Engine source folder, and run the configuration scripts:

    Setup.bat
    GenerateProjectFiles.bat

3. Build the Engine:

  • Open the UE4.sln file inside the source folder with Visual Studio 2019.

  • In the build bar ensure that you have selected 'Development Editor', 'Win64' and 'UnrealBuildTool' options.

  • In the solution explorer, right-click UE4 and select Build.

  • The build can take a few hours, depending on your hardware specification.

  • Once the solution is compiled you can open the engine to check that everything was installed correctly by launching the executable Engine\Binaries\Win64\UE4Editor.exe.

If the installation was successful, this should be recognised by Unreal Engine's version selector. You can check this by right-clicking on any .uproject file and selecting Switch Unreal Engine version. You should see a pop-up showing Source Build at PATH where PATH is the installation path that you have chosen. If you can not see this selector or the Generate Visual Studio project files when you right-click on .uproject files, something went wrong with the Unreal Engine installation and you will likely need to reinstall it correctly.

CARLA 0.9.12 Project

1. Download Carla_Build.7z from here. Unzip the project into a standalone directory.
2. Navigate into the CARLA project directory and run command make launch in the x64 Native Tools Command Prompt for Visual Studio 2019.
3. After a few minutes, you will see "launching unreal editor" and the UE4 window will pop up. During the loading process, the UE4 window will stop at 95% progress for approximately 1-2 hours. Be patient and let the process finish. After successfully entering the UE4, you will see "Building Mesh Distance Fields" and "Compiling Shaders", which can also take 1-2 hours to finish.

Python Carla Dependencies

Download PythonAPI.7z from here, and use it to replace the default package inside the Carla project. Open a terminal and navigate to /PythonAPI/examples. Run the following command to install the dependencies.

    pip install -r requirements.txt
    pip install carla==0.9.12
    pip install networkx

OpenXR

1. Install Windows Oculus Application and accept all defaults.
2. Login with your Oculus account or sign up for one.
3. Configure and Install the OpenXR Runtime for Oculus follwing the instructions in here. Follow the instructions in the Oculus section.
4. Turn on the Oculus application, go to Settings > General. Under OpenXR Runtime, make sure "Oculus is set as the active OpenXR Runtime".

G29 Wheel

1. Download G29.7z from here and extract it into a folder called G29.
2. Download and install Logitech G Hub from here.
3. Plug the wheel into the computer, and make sure the wheel self calibrates to the center.
4. You can use Logitech G Hub to adjust the centering force and friction of the wheel.
5. If something goes wrong, check for wheel conenction in the Logitech G Hub.