Skip to content

Commit

Permalink
Merge pull request #282 from FS-Driverless/docs-update
Browse files Browse the repository at this point in the history
Update documentation
  • Loading branch information
wouter-heerwegh authored Jan 30, 2022
2 parents 8662f43 + 476644a commit feec1ed
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 34 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
This is a Formula Student Driverless Simulator (FSDS).
FSDS is a community project with the goal to provide an end-to-end simulation for FS Driverless teams.
It simulates all commonly used sensors and is compatible with ROS.
This project has proven itsself during [FS-Online 2020](https://formulastudentonline.com/) where 4 driverless teams competed.
This project has proven itself during [FS-Online 2020](https://formulastudentonline.com/) where 4 driverless teams competed.
See [day 1](https://www.youtube.com/watch?v=TCgKwuLo3Eo), [day 2](https://www.youtube.com/watch?v=A-RHuWMZbig) and [day 3](https://www.youtube.com/watch?v=1RwY1cNMqMg).

**Problems?** Ask questions in [Gitter chat](https://gitter.im/FS-Driverless/Formula-Student-Driverless-Simulator) or [open an issue](https://github.com/FS-Driverless/Formula-Student-Driverless-Simulator/issues).
Expand Down Expand Up @@ -35,6 +35,9 @@ It launches the fsds_ros_bridge to connect an autonomous system to the Unreal wo

This repo uses LFS for some large files. All files bigger than 90MB are added to LFS.

## Installation
For installation and more information about the ROS and python interface, [check the documentation](https://fs-driverless.github.io/Formula-Student-Driverless-Simulator/)

## Credits
This project is based on the work of some amazing open-source projects.

Expand Down
6 changes: 3 additions & 3 deletions docker/download_FSDSSimulator_binary.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Shell script to download Simulator bins from github; For custom versions of simulator path has to be updated
sudo apt-get install unzip
wget -c https://github.com/FS-Driverless/Formula-Student-Driverless-Simulator/releases/download/v2.0.0/fsds-v2.0.0-linux.zip
unzip fsds-v2.0.0-linux.zip
rm fsds-v2.0.0-linux.zip
wget -c https://github.com/FS-Driverless/Formula-Student-Driverless-Simulator/releases/download/v2.1.0/fsds-v2.1.0-linux.zip
unzip fsds-v2.1.0-linux.zip
rm fsds-v2.1.0-linux.zip
8 changes: 4 additions & 4 deletions docs/docker_ubuntu.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ After building the image, verify that the image exists by runnig:
```

#### Run FSDS inside the Docker container
Get [the binary](https://github.com/FS-Driverless/Formula-Student-Driverless-Simulator/releases/download/v2.0.0/fsds-v2.0.0-linux.zip), or package your own project in Ubuntu.
Get [the binary](https://github.com/FS-Driverless/Formula-Student-Driverless-Simulator/releases/download/v2.1.0/fsds-v2.1.0-linux.zip), or package your own project in Ubuntu.
You can either download the latest version yourself, or use the `download_FSDSSimulator_binary.sh` helper script.

Now, run fsds inside the Docker container:
Expand All @@ -41,15 +41,15 @@ Now, run fsds inside the Docker container:

Replace the variables as follows:
* `DOCKER_IMAGE_NAME`: Same as `target_image` parameter in previous step. By default, enter `fsdsairsim_binary:vulkan-ubuntu18.04`
* `UNREAL_BINARY_SHELL_SCRIPT`: for FSDSsimulator enviroment, it will be `fsds-v2.0.0-linux/FSDS.sh`
* `UNREAL_BINARY_SHELL_SCRIPT`: for FSDSsimulator enviroment, it will be `fsds-v2.1.0-linux/FSDS.sh`
* `UNREAL_BINARY_ARGUMENTS`: For FSDSsimulator, most relevant would be `-windowed`, `-ResX`, `-ResY`. [See here all options](https://docs.unrealengine.com/en-us/Programming/Basics/CommandLineArguments).

For FSDSsimulator, you can do a `$ ./run_airsim_image_binary.sh fsdsairsim_binary:vulkan-ubuntu18.04 fsds-v2.0.0-linux/FSDS.sh -windowed -ResX=1080 -ResY=720`
For FSDSsimulator, you can do a `$ ./run_airsim_image_binary.sh fsdsairsim_binary:vulkan-ubuntu18.04 fsds-v2.1.0-linux/FSDS.sh -windowed -ResX=1080 -ResY=720`

To run in headless mode, use suffix `-- headless` at the end:

```bash
$ ./run_airsim_image_binary.sh fsds-v2.0.0-linux/FSDS.sh -- headless
$ ./run_airsim_image_binary.sh fsds-v2.1.0-linux/FSDS.sh -- headless
```

You need to have a `settings.json` file in the current working directory from where you run `./run_airsim_image_binary.sh`.
10 changes: 5 additions & 5 deletions docs/getting-started-with-ros.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Connecting to the simulator with ROS

You can use the ROS bridge to connect the simulator to ROS.
You can use the ROS bridge to connect the simulator to ROS1 and ROS2.
The ROS bridge will publish the sensordata from the simulator into ROS topics.
Your autonomous system will be able to publish car-control messages which the ROS bridge will send to the simulator.

The ROS bridge only works on Ubuntu.
The ROS bridge works on Ubuntu or in WSL in windows (but it is harder to set up).
If you have the simulator running on windows we reccommend Windows Subsystem for Linux.
This offers a virtual Ubuntu machine within Windows.
You can read [here how to install it](software-install-instructions.md).
While you are at it you might also want to [install Xming](software-install-instructions.md) so you can run rviz and rqt_plot from within WSL.

## Requirements

The ROS bridge requires [ROS Melodic to be installed](software-install-instructions.md), as well as the following dependencies:
The ROS bridge requires [ROS Melodic/Noetic/Galactic to be installed](software-install-instructions.md), as well as the following dependencies:
```
sudo apt-get install ros-melodic-tf2-geometry-msgs python-catkin-tools ros-melodic-rqt-multiplot ros-melodic-joy ros-melodic-cv-bridge ros-melodic-image-transport libyaml-cpp-dev libcurl4-openssl-dev
```
Expand All @@ -27,7 +27,7 @@ Ready? Lets clone the repo into your home directory:
git clone [email protected]:FS-Driverless/Formula-Student-Driverless-Simulator.git --recurse-submodules
```

If you havn't setup your ssh keys, you can clone using https by running the following command:
If you haven't setup your ssh keys, you can clone using https by running the following command:
```
git clone https://github.com/FS-Driverless/Formula-Student-Driverless-Simulator.git --recurse-submodules
```
Expand All @@ -45,7 +45,7 @@ ln -s /mnt/c/Users/developer/Formula-Student-Driverless-Simulator ~/Formula-Stud
```

Now, checkout the version equal to the simulator.
If you are running for example simulator packaged version v2.0.0, run `git checkout tags/v2.0.0` to get the ROS brige to the same version
If you are running for example simulator packaged version v2.1.0, run `git checkout tags/v2.1.0` to get the ROS brige to the same version

## Preparing AirLib

Expand Down
17 changes: 10 additions & 7 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ If you clone the repo you will already have this file in place.
If not, copy-paste the contents of the [settings.json file at the root of this repository](https://github.com/FS-Driverless/Formula-Student-Driverless-Simulator/blob/master/settings.json) into the `~/Formula-Student-Driverless-Simulator`.
This should get you started with the default sensor configuration, feel free to try your own custom sensor suite.

## From release binaries
## Installation

### From release binaries

Pre-compiled binaries are available for every release.
Go to [releases](https://github.com/FS-Driverless/Formula-Student-Driverless-Simulator/releases) and download the latest one.
Expand All @@ -32,19 +34,20 @@ A window with a car should popup!
Try driving the car around using the arrowkeys.
If you get a black screen with some buttons, make sure the folder with the binary is in your user folder (Windows: `C:\Users\username\Formula-Student-Driverless-Simulator`, Linux: `~/Formula-Student-Driverless-Simulator`)

## From source using the Unreal Engine Editor
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).
### 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.

### 1. Get the repository
#### 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**.

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
#### 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).
Expand All @@ -65,7 +68,7 @@ On Ubuntu, go to folder `AirSim` and run `setup.sh` and `build.sh`.

The first time this takes quite a while. Go walk around a bit, maybe start playing [factoryidle](https://factoryidle.com/).

### 3. Working with the Unreal Engine project
#### 3. Working with the Unreal Engine project

Launch Unreal Engine, press Browse and open the FSDS project in `~/Driverless-Competition-Simulator/UE4Project/FSOnline.uproject`.
The project should now open correctly.
Expand All @@ -75,7 +78,7 @@ If it does not, make sure of the following:
* you have cloned with LFS enabed. If not, run `git lfs install` and `git lfs pull` to download the large files.
* within `~/Driverless-Competition-Simulator/AirSim/`, you have run `build.cmd` on Windows and `./setup.sh && ./build.sh` on Ubuntu.

On Ubuntu, we recommend adding the following alias to your ~/.bashrc to speed up the process of opening the repository in the future:
On Ubuntu, we recommend adding the following alias to your `~/.bashrc` to speed up the process of opening the repository in the future:
`alias ue='~/UnrealEngine/Engine/Binaries/Linux/UE4Editor ~/Formula-Student-Driverless-Simulator/UE4Project/FSOnline.uproject'`

It might show an error like 'This project was made with a different version of the Unreal Engine'. In that case select `more options` and `skip conversion`.
Expand All @@ -92,7 +95,7 @@ If you make changes to the plugin code or AirLib, you only have to recompile the
This can be done from within the Unreal Editor. go to to `Window` -> `Developer tools` -> `Modules`.
Search for `AirSim` and click `Recompile`.

### 4. Launching the game
#### 4. Launching the game

To run the game, click the big Play button.
If you want to run it like it would run when packaged, choose 'Run as standalone game'.
Expand Down
14 changes: 5 additions & 9 deletions docs/software-install-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,18 @@ In case you want to run the ros bridge on Windows, you will need Windows Subsyst
3. If you are on windows server, enable windows susbsystem for linux in the server manager and [install ubuntu](https://docs.microsoft.com/en-us/windows/wsl/install-on-server#download-a-linux-distribution).


## Install ROS Melodic (Ubuntu / WSL)
## Install ROS Melodic/Noetic/Galactic (Ubuntu / WSL)

```
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
curl -sSL 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xC1CF6E31E6BADE8868B172B4F42ED6FBAB17C654' | sudo apt-key add -
sudo apt update
sudo apt install ros-melodic-desktop
```
Follow [the guide on their website](http://wiki.ros.org/ROS/Installation)

Add the following line to end of your `~/.bashrc` file:
And add the following line to end of your `~/.bashrc` file:
```
source /opt/ros/melodic/setup.bash
source ~/Formula-Student-Driverless-Simulator/ros/devel/setup.bash
```

Be sure to replace `melodic` with your specific version

## Gui applications from WSL (Xming)
By default, if you are running Windows Subsystem for Linux with Ubuntu, you can't run gui applications.
This is super annoying if you want to use rqt applicatoins like rviz or rqt_plot.
Expand Down
5 changes: 0 additions & 5 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,3 @@ nav:
- "Operator": "operator.md"
- "System flow and signals": "competition-signals.md"
- "Spectator": "spectator.md"

extra_css:
- css\version-select.css
extra_javascript:
- js\version-select.js

0 comments on commit feec1ed

Please sign in to comment.