Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 39 additions & 27 deletions Docs/build_linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ To avoid compatibility issues between Unreal Engine and the CARLA dependencies,
```sh
sudo apt-add-repository "deb http://archive.ubuntu.com/ubuntu jammy main universe"
sudo apt-get update
sudo apt-get install build-essential clang-10 lld-10 g++-12 cmake ninja-build libvulkan1 python python3 python3-dev python3-pip libpng-dev libtiff5-dev libjpeg-dev tzdata sed curl unzip autoconf libtool rsync libxml2-dev git git-lfs
sudo apt-get install build-essential clang-10 lld-10 g++-12 cmake ninja-build libvulkan1 python3 python3-dev python3-pip libpng-dev libtiff5-dev libjpeg-dev tzdata sed curl unzip autoconf libtool rsync libxml2-dev git git-lfs
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/lib/llvm-10/bin/clang++ 180 &&
sudo update-alternatives --install /usr/bin/clang clang /usr/lib/llvm-10/bin/clang 180 &&
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 180
Expand Down Expand Up @@ -76,12 +76,16 @@ If you need to upgrade:
pip3 install --upgrade pip
```

You also need to install some Python dependencies:
#### CARLA_ROOT environment variable

For many of the following instructions, you will need to refer to paths relative to the root directory of your local copy of the CARLA code repository. Therefore it is a good idea to set an environment variable to point to this location. For example, if you have cloned CARLA into your home directory:

```sh
pip3 install --user -r CARLA_ROOT/PythonAPI/carla/requirements.txt
export CARLA_ROOT="$HOME/carla"
```

Ensure to run this command at the start of each new terminal session you open, or add it to your `.bashrc` or `.profile`. If you don't want to use this environment variable, replace `${CARLA_ROOT}` in the commands given later with the appropriate path.

---

## Building Unreal Engine
Expand Down Expand Up @@ -119,6 +123,23 @@ __4.__ Open the Editor to check that Unreal Engine has been installed properly.
cd ~/UnrealEngine_4.26/Engine/Binaries/Linux && ./UE4Editor
```

### Set the Unreal Engine environment variable

For CARLA to locate the correct installation of Unreal Engine, an environment variable is needed.

To set the variable for this session only:

```sh
export UE4_ROOT=~/UnrealEngine_4.26
```

You may want to set the environment variable in your `.bashrc` or `.profile`, so that it is always set. Open `.bashrc` or `.profile` with `gedit` and add the line above near the end of the file and save:

```sh
cd ~
gedit .bashrc # or .profile
```

---

## Building CARLA
Expand Down Expand Up @@ -146,13 +167,13 @@ CARLA comes with a large repository of 3D assets including maps, vehicles and pe

If you are working on the latest updates of the `ue4-dev` branch you will need to download the latest version of the content. There are two ways to achieve this:

__1. Using the content update script__: This script downloads the latest package of the CARLA content as a `tar.gz` archive and decompresses the archive into the `CARLA_ROOT/Unreal/CarlaUE4/Content/Carla` directory:
__1. Using the content update script__: This script downloads the latest package of the CARLA content as a `tar.gz` archive and decompresses the archive into the `${CARLA_ROOT}/Unreal/CarlaUE4/Content/Carla` directory:

```sh
./Update.sh
```

__2. Using Git__: Using Git, you will establish a git repository for the content in the `CARLA_ROOT/Unreal/CarlaUE4/Content/Carla` directory. **This is the preferred method if you intend to commit content updates to CARLA (or your own fork of CARLA)**. From the root directory of the CARLA code repository, run the following command (if you have your own fork of the CARLA content, change the target remote repository accordingly):
__2. Using Git__: Using Git, you will establish a git repository for the content in the `${CARLA_ROOT}/Unreal/CarlaUE4/Content/Carla` directory. **This is the preferred method if you intend to commit content updates to CARLA (or your own fork of CARLA)**. From the root directory of the CARLA code repository, run the following command (if you have your own fork of the CARLA content, change the target remote repository accordingly):

```sh
git clone https://bitbucket.org/carla-simulator/carla-content Unreal/CarlaUE4/Content/Carla
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add to the command -b master, to clone master branch in case we switch default branch of bitbucket

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Blyron, I have added this in #9206

Expand All @@ -170,23 +191,6 @@ You may want to download the assets for a specific CARLA version for some purpos
tar -xvzf <assets_archive>.tar.gz.tar -C /path/to/carla/Unreal/CarlaUE4/Content/Carla
```

### Set the Unreal Engine environment variable

For CARLA to locate the correct installation of Unreal Engine, an environment variable is needed.

To set the variable for this session only:

```sh
export UE4_ROOT=~/UnrealEngine_4.26
```

You may want to set the environment variable in your `.bashrc` or `.profile`, so that it is always set. Open `.bashrc` or `.profile` with `gedit` and add the line above near the end of the file and save:

```sh
cd ~
gedit .bashrc # or .profile
```

---

### Build CARLA with Make
Expand All @@ -203,6 +207,14 @@ The following command compiles the Python API client:
make PythonAPI
```

The Python examples provided with CARLA need some prerequisite libraries installed:

You also need to install some Python dependencies:

```sh
pip3 install --user -r ${CARLA_ROOT}/PythonAPI/carla/requirements.txt
```

**Building the Python API for a specific Python version**

The above command will build the Python API for the system Python version. You can target a specific version of Python up to 3.11 with the following instructions:
Expand Down Expand Up @@ -239,20 +251,20 @@ python3.12 -m pip install --upgrade pip setuptools
make PythonAPI ARGS="--python-version=3.12"
```

* If you are using a non-standard Python installation or a Python virtual environment manager like PyEnv, Rye or Conda. Instead of the `--python-version` argument it may be better to use the `--python-root` argument (you can locate the installation using `which python3`):
<!-- * If you are using a non-standard Python installation or a Python virtual environment manager like PyEnv, Rye or Conda. Instead of the `--python-version` argument it may be better to use the `--python-root` argument (you can locate the installation using `which python3`):

```sh
make PythonAPI ARGS="--python-root=/path/to/python/installation"
```
``` -->

The CARLA Python API wheel will be generated in `CARLA_ROOT/PythonAPI/carla/dist`. The name of the wheel will depend upon the current CARLA version and the chosen Python version. Install the wheel with PIP:
The CARLA Python API wheel will be generated in `${CARLA_ROOT}/PythonAPI/carla/dist`. The name of the wheel will depend upon the current CARLA version and the chosen Python version. Install the wheel with PIP:

```sh
# CARLA 0.9.16, Python 3.8
pip3 install CARLA_ROOT/PythonAPI/carla/dist/carla-0.9.16-cp38-linux_x86_64.whl
pip3 install ${CARLA_ROOT}/PythonAPI/carla/dist/carla-0.9.16-cp38-linux_x86_64.whl

# CARLA 0.9.16, Python 3.10
#pip3 install CARLA_ROOT/PythonAPI/carla/dist/carla-0.9.16-cp310-linux_x86_64.whl
#pip3 install ${CARLA_ROOT}/PythonAPI/carla/dist/carla-0.9.16-cp310-linux_x86_64.whl
```

!!! Warning
Expand Down
30 changes: 29 additions & 1 deletion Docs/start_introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,35 @@ Talking about how CARLA grows means talking about a community of developers who

This documentation will be a companion along the way. The next page contains __[Quick start](start_quickstart.md)__ instructions for those eager to install a CARLA release. There is also a build guide for Linux and Windows. This will make CARLA from repository and allow to dive full-length into its features.

Welcome to CARLA.
Welcome to CARLA!

---

## Get started

There are numerous different ways that you can use CARLA. You can either get started out of the box straight away with the packaged version, or you can download the source code and start developing your own custom version of CARLA, follow the links below to start

### Download the latest release as a package

Use the links below to download the latest CARLA release for your operating system and read [these instructions](../start_quickstart) to get started.

<div class="build-buttons">
<p>
<a href="https://tiny.carla.org/carla-0-9-15-linux" target="_blank" class="btn btn-neutral" title="Download the latest CARLA release for Ubuntu">
<b>Download CARLA 0.9.15 for Ubuntu</b></a>
</p>
</div>

<div class="build-buttons">
<p>
<a href="https://tiny.carla.org/carla-0-9-15-windows" target="_blank" class="btn btn-neutral" title="Download latest CARLA release for Windows">
<b>Download CARLA 0.9.15 for Windows</b></a>
</p>
</div>

### Download the source code and create a custom version of CARLA

Follow the links below for instructions on how to clone the source code from [CARLA's GitHub repository](https://github.com/carla-simulator/carla) and get started developing CARLA!

<div class="build-buttons">
<p>
Expand Down
4 changes: 2 additions & 2 deletions Docs/start_quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pip3 install --upgrade pip

### Download and extract a CARLA package

Download the desired CARLA package from GitHub using the link provided below. We recommend downloading the Package for the latest release, which is currently [0.9.15](https://github.com/carla-simulator/carla/releases/tag/0.9.15/).
Download the desired CARLA package from GitHub using the link provided below. We recommend downloading the Package for the latest release, which is currently [0.9.15](https://github.com/carla-simulator/carla/releases/tag/0.9.15/). If you would prefer to use the latest features completed by the CARLA team, you can download the __nightly build__ for [__Linux__](https://carla-releases.s3.us-east-005.backblazeb2.com/Linux/Dev/CARLA_Latest.tar.gz) or [__Windows__](https://carla-releases.s3.us-east-005.backblazeb2.com/Windows/Dev/CARLA_Latest.zip).

<div class="build-buttons">
<p>
Expand All @@ -52,7 +52,7 @@ Download the desired CARLA package from GitHub using the link provided below. We
</p>
</div>

This repository contains multiple 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 may be unstable, use it with caution).
This repository contains multiple versions of CARLA. You will find options to download the __current release__ with all the most recent fixes and features. You can also find __previous releases__ of CARLA for legacy installations. The __nightly build__ contains developmental fixes and features that have been merged into the `ue4-dev` branch (the nightly build may be unstable, use it with caution).

The package is a compressed file named with the version number. Download and extract the archive in a convenient location (e.g. the `home` or `Documents` directory).

Expand Down
Loading