From da3ee5287449b9861af4da1994b9cc97395dfec8 Mon Sep 17 00:00:00 2001 From: madratman Date: Thu, 27 Feb 2020 20:31:40 +0000 Subject: [PATCH] prelim drone racing lab readme --- README.md | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..f271cbf --- /dev/null +++ b/README.md @@ -0,0 +1,99 @@ +# AirSim Drone Racing Lab + + +## Quickstart +- [Website](https://microsoft.github.io/AirSim-Drone-Racing-Lab/) +- [Linux and Windows Binaries](https://github.com/microsoft/AirSim-NeurIPS2019-Drone-Racing/releases) +- [Python API Doc](https://microsoft.github.io/AirSim-Drone-Racing-Lab/api.html), [airsimdroneracinglab PyPI package](https://pypi.org/project/airsimdroneracinglab/) + + + +### Downloading and running AirSim Drone Racing Lab Binaries +#### Downloading +- Linux + - Use the [download_linux_binaries.sh](download_linux_binaries.sh) script + - Python package: + `pip install airsimdroneracinglab` + +- Windows + + +Notes: +- `Source code (zip)` or `Source code (tar.gz)` might not be up-to-date with the master branch of this repository. It can be lagging by `n commits to master since this release`, specified on the released page. + For the code on this repository, it's best to just `git clone`. + +#### Running +- Linux + - Open a terminal window, `cd` to `AirSim_Training/` or `AirSim_Qualification` directory, and enter the following command: + ``` + ./AirSimDroneRacingLab.sh -windowed -opengl4 + ``` + - Running headless (with rendering of images enabled): + ``` + DISPLAY= ./AirSimDroneRacingLab.sh -opengl4 + ``` + - To disable rendering completely for training planning and / or control policies, you can use: + ``` + -./AirSimDroneRacingLab.sh -nullrhi + ``` + Note that `simGetImages` will not work with this option. + - To increase speed of `simGetImages` / increase speed of Unreal Engine's game thread; + - Add the `"ViewMode": "NoDisplay"` to your settings.json file, or use [this file](https://gist.github.com/madratman/5fadbb08f65e9c0187ccc1f5090fc086) directly. + This disables rendering in the main viewport camera. + Then run the binary with the following options. + ``` + ./AirSimDroneRacingLab.sh -windowed -NoVSync -BENCHMARK + ``` + You can also use the Unreal console commands `Stat FPS`, `Stat UnitGraph`, `r.VSync`, `t.maxFPS`. See [Issue #111](https://github.com/microsoft/AirSim-NeurIPS2019-Drone-Racing/issues/111) for more details. + +- Windows + - Navigate to the `AirSim/` directory, and double-click `run.bat` (or `AirSimDroneRacingLab.exe -windowed`) + +## Docker +- Prerequisites: + - Install [docker-ce](https://docs.docker.com/install/linux/docker-ce/ubuntu/). + - Complete the desired [post-installation steps for linux](https://docs.docker.com/install/linux/linux-postinstall/) after installing docker. + At the minimum, the page tells you how torun docker without root, and other useful setup options. + - Install [nvidia-docker2](https://github.com/NVIDIA/nvidia-docker/wiki/Installation-(version-2.0)). + +- Dockerfile: + We provide a sample [dockerfile](docker/Dockerfile) you can modify. + It downloads the training and qualification binaries automatically, and installs the python client. + By default, it uses Ubuntu 18.04 and CUDA 10.0 with OpenGL, and is build on top of [nvidia/cudagl:10.0-devel-ubuntu18.04](https://hub.docker.com/r/nvidia/cudagl). + This can be changed of course, as explained in the following section. + +- Building the docker image: + You can use [build_docker_image.py](docker/build_docker_image.py) to build the dockerfile above (or your own custom one) + **Usage** (with default arguments) + ```shell + cd docker/; + python3 build_docker_image.py \ + --dockerfile Dockerfile \ + --base_image nvidia/cudagl:10.0-devel-ubuntu18.04 \ + -- target_image airsim_neurips:10.0-devel-ubuntu18.04 + ``` +- Running the docker image: + See [docker/run_docker_image.sh](docker/run_docker_image.sh) to run the docker image: + **Usage** + - for running default image, training binaries, in windowed mode: + `$ ./run_docker_image.sh "" training` + - for running default image, qualification binaries, in windowed mode: + `$ ./run_docker_image.sh "" qualification` + - for running default image, training binaries, in headless mode: + `$ ./run_docker_image.sh "" training headless` + - for running default image, qualification binaries, in headless mode: + `$ ./run_docker_image.sh "" qualification headless` + - for running a custom image in windowed mode, pass in you image name and tag: + `$ ./run_docker_image.sh DOCKER_IMAGE_NAME:TAG` + - for running a custom image in headless mode, pass in you image name and tag, followed by "headless": + `$ ./run_docker_image.sh DOCKER_IMAGE_NAME:TAG headless` + +## AirSim Drone Racing Lab Features and API +- The API is documented at [airsimneurips API doc](https://microsoft.github.io/AirSim-NeurIPS2019-Drone-Racing/api.html) + +- + +- + +## Questions +Please open a Github Issue on **this** repository (not [AirSim](https://github.com/microsoft/AirSim)) for any technical questions w.r.t. the Neurips competition. \ No newline at end of file