Skip to content

Commit

Permalink
Move compilation steps to step 2 (build AirSim)
Browse files Browse the repository at this point in the history
  • Loading branch information
wouter-heerwegh committed Oct 22, 2024
1 parent 3f320a6 commit a823958
Showing 1 changed file with 29 additions and 40 deletions.
69 changes: 29 additions & 40 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,39 @@ If you get a black screen with some buttons, make sure the folder with the binar

If all that works, you can continue to [the ROS interface](getting-started-with-ros.md) or [the python interface](getting-started-with-python.md).

### Building from source using the Unreal Engine Editor and Ubuntu 20.04,22.04+
This guide outlines the steps for building the project from source on Ubuntu 20.04 and 22.04. It should also work for Ubuntu 24.04+, although this has not yet been tested.
### From source using the Unreal Engine Editor
Instead of running the simulator from release binaries, you can compile it manually using unreal engine.
This is usefull if you want to get the latest changes or if you want to make changes to the maps or the simulation itself.
If you want to run the unreal engine project from source you will need [unreal engine and visual studio 2019](software-install-instructions.md).
On Ubuntu you can skip the visual studio 2019 part, but you still need Unreal Engine.

**Written by Roy Amoyal, Head of the Autonomous Division at BGRacing 2024 (Formula Student Driverless Project at Ben Gurion University)**
#### 1. Get the repository

You can either download the repo using the big green download button on the [github page of this project](https://github.com/FS-Driverless/Formula-Student-Driverless-Simulator) or clone the repository. For cloning, checkout the documentation on this further down this page. Make sure you clone the repository in your **home directory** and git **submodules** are included:

```
git clone https://github.com/FS-Driverless/Formula-Student-Driverless-Simulator.git --recurse-submodules
```

When downloading or cloning, by default you get the latest, unreleased version. This is probably not the version that you want. Make sure you select the version that you need!

#### Build AirSim
##### For Ubuntu 20.04
#### 2. Compiling the AirSim plugin
The Unreal Engine project requires the AirSim plugin.
We have to compile this plugin first.
The AirSim plugin is made up of AirLib (/AirSim/AirLib) and the plugin code (/UE4Project/Plugins/AirSim/Source).
AirLib is the shared code between the ros wrapper and the AirSim Unreal Engine plugin.

First build the AirLib code.

cd /home/$USER/Formula-Student-Driverless-Simulator/AirSim
./setup.sh && ./build.sh
On Windows, open the _Developer Command Prompt for VS 2019_, go to `Formula-Student-Driverless-Simulator/AirSim` and run
```
build.cmd
```

On Ubuntu 18.04 and 20.04, go to folder `AirSim` and run `setup.sh` and `build.sh`.

##### For Ubuntu 22.04+
**Written by Roy Amoyal, Head of the Autonomous Division at BGRacing 2024 (Formula Student Driverless Project at Ben Gurion University)**
First, install Docker on your Ubuntu system.

Change to the Docker Build Directory: Note that this directory is within the AirSim folder, not the root of the Formula-Student-Driverless-Simulator repository.
Expand All @@ -84,40 +105,8 @@ Change to the Docker Build Directory: Note that this directory is within the Air

~/UnrealEngine/Engine/Binaries/ThirdParty/Mono/Linux/bin/mono ~/UnrealEngine/Engine/Binaries/DotNET/UnrealBuildTool.exe Development Linux -Project=/home/$uSER/Formula-Student-Driverless-Simulator/UE4Project/FSOnline.uproject -TargetType=Editor -Progress

Congratulations! You have successfully built the project from source. You can now open and edit the project by running:

./home/$USER/Formula-Student-Driverless-Simulator/UE4Project/FSOnline.uproject

### Building from source using the Unreal Engine Editor for earlier versions of Ubuntu (e.g., Ubuntu 18.04)
Instead of running the simulator from release binaries, you can compile it manually using unreal engine.
This is usefull if you want to get the latest changes or if you want to make changes to the maps or the simulation itself.
If you want to run the unreal engine project from source you will need [unreal engine and visual studio 2019](software-install-instructions.md).
On Ubuntu you can skip the visual studio 2019 part, but you still need Unreal Engine.

#### 1. Get the repository

You can either download the repo using the big green download button on the [github page of this project](https://github.com/FS-Driverless/Formula-Student-Driverless-Simulator) or clone the repository. For cloning, checkout the documentation on this further down this page. Make sure you clone the repository in your **home directory** and git **submodules** are included:

```
git clone https://github.com/FS-Driverless/Formula-Student-Driverless-Simulator.git --recurse-submodules
```

When downloading or cloning, by default you get the latest, unreleased version. This is probably not the version that you want. Make sure you select the version that you need!

#### 2. Compiling the AirSim plugin
The Unreal Engine project requires the AirSim plugin.
We have to compile this plugin first.
The AirSim plugin is made up of AirLib (/AirSim/AirLib) and the plugin code (/UE4Project/Plugins/AirSim/Source).
AirLib is the shared code between the ros wrapper and the AirSim Unreal Engine plugin.

First build the AirLib code.

On Windows, open the _Developer Command Prompt for VS 2019_, go to `Formula-Student-Driverless-Simulator/AirSim` and run
```
build.cmd
```
Congratulations! You have successfully built the project from source. You can now continue with Unreal Engine.

On Ubuntu, go to folder `AirSim` and run `setup.sh` and `build.sh`.

> So what does build.cmd or setup.sh+build.sh do?
It downloads any nessesary libraries and compiles AirLib.
Expand Down

0 comments on commit a823958

Please sign in to comment.