Skip to content

Commit

Permalink
Enable mkdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
sytelus committed Nov 9, 2018
1 parent 0e01f09 commit 9e9ef5d
Show file tree
Hide file tree
Showing 21 changed files with 354 additions and 52 deletions.
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,17 @@ Below is summarized list of important changes. This does not include minor/less
* The [reinforcement learning example](docs/reinforcement_learning.md) with AirSim
* New built-in flight controller called [simple_flight](docs/simple_flight.md) that "just works" without any additional setup. It is also now *default*.
* AirSim now also generates [depth as well as disparity images](docs/image_apis.md) that is in camera plan.
* We also have official Linux build now! If you have been using AirSim with PX4, you might want to read the [release notes](docs/release_notes.md).
* We also have official Linux build now!

## Sep 2017
- We have added [car model](docs/using_car.md)!

## Aug 2017
- [simple_flight](docs/simple_flight.md) is now default flight controller for drones. If you want to use PX4, you will need to modify settings.json as per [PX4 setup doc](docs/px4_setup.md).
- Linux build is official and currently uses Unreal 4.17 due to various bug fixes required
- ImageType enum has breaking changes with several new additions and clarifying existing ones
- SubWindows are now configurable from settings.json
- PythonClient is now complete and has parity with C++ APIs. Some of these would have breaking changes.

## Feb 2017
- First release!
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Contributing

## Quick Start
- Please read our [short and sweet coding guidelines](coding_guidelines.md).
- Please read our [short and sweet coding guidelines](docs/coding_guidelines.md).
- For big changes such as adding new feature or refactoring, [file an issue first](https://github.com/Microsoft/AirSim/issues).
- Use our [recommended development workflow](dev_workflow.md) to make changes and test it.
- Use our [recommended development workflow](docs/dev_workflow.md) to make changes and test it.
- Use [usual steps](https://akrabat.com/the-beginners-guide-to-contributing-to-a-github-project/) to make contributions just like other GitHub projects. If you are not familiar with Git Branch-Rebase-Merge workflow, please [read this first](http://shitalshah.com/p/git-workflow-branch-rebase-squash-merge/).

## Checklist
Expand Down
6 changes: 3 additions & 3 deletions PythonClient/imitation_learning/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ The code in this section is based on the [Autonomous Driving Cookbook](https://g

## What's inside

![imitation learning](../../docs/images/imitation_learning_example.gif)
![imitation learning](https://github.com/microsoft/airsim/wiki/images/technion/imitation_learning_example.gif)
*Driving in simulation using trained imitation learning model, based on recorded data*

Imitation learning includes the usage of labeled data as input to a training algorithm with the purpose of having the algorithm imitate the actions of people who recorded the data.

![diagram](../../docs/images/imitation_diagram.PNG)
![diagram](https://github.com/microsoft/airsim/wiki/images/technion/imitation_diagram.PNG)

This diagram is represented by these files:

Expand All @@ -45,5 +45,5 @@ By using the predicted steering value, the code calculates related control param
## Training Tips
We recommend on using augmentation and recording techniques.
We give here an example for two methods:
- [CycleLight](../../docs/graphic_features.md) - Animation of a day light cycle in a changeable, potentially very short period of time.
- [CycleLight](https://github.com/Microsoft/AirSim/wiki/graphic_features) - Animation of a day light cycle in a changeable, potentially very short period of time.
- Shifted images - Altering the camera’s position to the right or the left of the car, so that it can record images in extreme conditions. To simulate driving back to the center from those extreme situations, post-process the recorded angle of the steering accordingly (manually).
69 changes: 69 additions & 0 deletions build_docs.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
@echo off
REM //---------- set up variable ----------
setlocal
set ROOT_DIR=%~dp0
pushd %~dp0

set BUILD_DIR=%ROOT_DIR%temp\docs_build
rem mdir /s /q %BUILD_DIR%
robocopy "docs" "%BUILD_DIR%\doc_root\docs" /MIR /njh /njs /ndl /np /nfl /r:0
robocopy "." "%BUILD_DIR%\doc_root" *.md /njh /njs /ndl /np /nfl /r:0
robocopy "%BUILD_DIR%\doc_root\docs" "%BUILD_DIR%" mkdocs.yml /MOV /njh /njs /ndl /np /nfl /r:0

REM Copy of all folders is no needed as we use absolute URLs now
REM for /d %%x in (
REM "%ROOT_DIR%*"
REM ) do (
REM cd /d "%BUILD_DIR%\doc_root"
REM IF "%%~nx"=="" (
REM REM Do nothing
REM ) ELSE (
REM IF NOT EXIST "%%~nx" mklink /D "%%~nx" "%ROOT_DIR%%%~nx"
REM )
REM )

cd /d %BUILD_DIR%

if "%1"=="no_serve" goto PromptYN
mkdocs serve

:PromptYN
REM if exist "%SystemRoot%\System32\choice.exe" goto UseChoice
setlocal EnableExtensions EnableDelayedExpansion
:UseSetPrompt
set "PromptMessage=Do you want to commit to GitHub Pages [Y/N]? "
set "UserChoice=N"
set /P "UserChoice=%PromptMessage%"
set "UserChoice=!UserChoice: =!"
if /I "!UserChoice!" == "N" endlocal & goto :AnswerNo
if /I not "!UserChoice!" == "Y" goto UseSetPrompt
endlocal
goto AnswerYes
REM :UseChoice
REM %SystemRoot%\System32\choice.exe /C YN /N /M "%PromptMessage%"
REM if errorlevel 2 goto :AnswerNo
REM goto AnswerYes

:AnswerYes
@echo Building and commiting to gh-pages branch...
mkdocs build
git checkout gh-pages
cd /d %BUILD_DIR%
REM robocopy "docs" "%BUILD_DIR%\build" /MIR /njh /njs /ndl /np /nfl /r:0

goto success

:AnswerNo
@echo No commits were done.
goto success

:success
@echo "Task completed."
goto end

:failed
@echo "Task has failed."
goto end

:end
popd
33 changes: 33 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
*.pyc
*.egg
*.so
*.swp

.dir-locals.el
.cache/
.idea
.mypy_cache/
.pytest_cache/
.ropeproject/
TAGS
.tags
.tox/
.tx/
.venv/
.coverage
htmlcov
.DS_Store
sphinx/pycode/Grammar*pickle
distribute-*

env/
build/
dist/
Sphinx.egg-info/
doc/_build/
doc/locale/
tests/.coverage
tests/build/
utils/regression_test.js

node_modules/
14 changes: 7 additions & 7 deletions docs/apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ First install this package:
pip install msgpack-rpc-python
```

You can either get AirSim binaries from [releases](https://github.com/Microsoft/AirSim/releases) or compile from the source ([Windows](https://github.com/Microsoft/AirSim/blob/master/docs/build_windows.md), [Linux](https://github.com/Microsoft/AirSim/blob/master/docs/build_linux.md)). Once you can run AirSim, choose Car as vehicle and then navigate to `PythonClient\car\` folder and run:
You can either get AirSim binaries from [releases](https://github.com/Microsoft/AirSim/releases) or compile from the source ([Windows](build_windows.md), [Linux](build_linux.md)). Once you can run AirSim, choose Car as vehicle and then navigate to `PythonClient\car\` folder and run:

```
python hello_car.py
Expand Down Expand Up @@ -125,12 +125,12 @@ for response in responses:


### Image / Computer Vision APIs
AirSim offers comprehensive images APIs to retrieve synchronized images from multiple cameras along with ground truth including depth, disparity, surface normals and vision. You can set the resolution, FOV, motion blur etc parameters in [settings.json](settings.md). There is also API for detecting collision state. See also [complete code](../Examples/StereoImageGenerator.hpp) that generates specified number of stereo images and ground truth depth with normalization to camera plan, computation of disparity image and saving it to [pfm format](pfm.md).
AirSim offers comprehensive images APIs to retrieve synchronized images from multiple cameras along with ground truth including depth, disparity, surface normals and vision. You can set the resolution, FOV, motion blur etc parameters in [settings.json](settings.md). There is also API for detecting collision state. See also [complete code](https://github.com/Microsoft/AirSim/tree/master/Examples/DataCollection/StereoImageGenerator.hpp) that generates specified number of stereo images and ground truth depth with normalization to camera plan, computation of disparity image and saving it to [pfm format](pfm.md).

More on [image APIs and Computer Vision mode](image_apis.md).

### Pause and Continue APIs
AirSim allows to pause and continue the simulation through `pause(is_paused)` API. To pause the simulation call `pause(True)` and to continue the simulation call `pause(False)`. You may have scenario, especially while using reinforcement learning, to run the simulation for specified amount of time and then automatically pause. While simulation is paused, you may then do some expensive computation, send a new command and then again run the simulation for specified amount of time. This can be achieved by API `continueForTime(seconds)`. This API runs the simulation for the specified number of seconds and then pauses the simulation. For example usage, please see [pause_continue_car.py](../PythonClient/car/pause_continue_car.py) and [pause_continue_drone.py](../PythonClient/multirotor/pause_continue_drone.py).
AirSim allows to pause and continue the simulation through `pause(is_paused)` API. To pause the simulation call `pause(True)` and to continue the simulation call `pause(False)`. You may have scenario, especially while using reinforcement learning, to run the simulation for specified amount of time and then automatically pause. While simulation is paused, you may then do some expensive computation, send a new command and then again run the simulation for specified amount of time. This can be achieved by API `continueForTime(seconds)`. This API runs the simulation for the specified number of seconds and then pauses the simulation. For example usage, please see [pause_continue_car.py](https://github.com/Microsoft/AirSim/tree/master/PythonClient//car/pause_continue_car.py) and [pause_continue_drone.py](https://github.com/Microsoft/AirSim/tree/master/PythonClient//multirotor/pause_continue_drone.py).


### Collision API
Expand All @@ -140,7 +140,7 @@ The collision information can be obtained using `simGetCollisionInfo` API. This
AirSim supports multiple vehicles and control them through APIs. Please [Multiple Vehicles](multi_vehicle.md) doc.

### Coordinate System
All AirSim API uses NED coordinate system, i.e., +X is North, +Y is East and +Z is Down. All units are in SI system. Please note that this is different from coordinate system used internally by Unreal Engine. In Unreal Engine, +Z is up instead of down and length unit is in centimeters instead of meters. AirSim APIs takes care of the appropriate conversions. The starting point of the vehicle is always coordinates (0, 0, 0) in NED system. Thus when converting from Unreal coordinates to NED, we first subtract the starting offset and then scale by 100 for cm to m conversion. The vehicle is spawned in Unreal environment where the Player Start component is placed. There is a setting called `OriginGeopoint` in [settings.json](setings.md) which assigns geographic longitude, longitude and altitude to the Player Start component.
All AirSim API uses NED coordinate system, i.e., +X is North, +Y is East and +Z is Down. All units are in SI system. Please note that this is different from coordinate system used internally by Unreal Engine. In Unreal Engine, +Z is up instead of down and length unit is in centimeters instead of meters. AirSim APIs takes care of the appropriate conversions. The starting point of the vehicle is always coordinates (0, 0, 0) in NED system. Thus when converting from Unreal coordinates to NED, we first subtract the starting offset and then scale by 100 for cm to m conversion. The vehicle is spawned in Unreal environment where the Player Start component is placed. There is a setting called `OriginGeopoint` in [settings.json](settings.md) which assigns geographic longitude, longitude and altitude to the Player Start component.

## Vehicle Specific APIs
### APIs for Car
Expand Down Expand Up @@ -202,9 +202,9 @@ The APIs use [msgpack-rpc protocol](https://github.com/msgpack-rpc/msgpack-rpc)
## References and Examples

* [C++ API Examples](apis_cpp.md)
* [Car Examples](../PythonClient/car)
* [Multirotor Examples](../PythonClient/multirotor)
* [Computer Vision Examples](../PythonClient/computer_vision)
* [Car Examples](https://github.com/Microsoft/AirSim/tree/master/PythonClient//car)
* [Multirotor Examples](https://github.com/Microsoft/AirSim/tree/master/PythonClient//multirotor)
* [Computer Vision Examples](https://github.com/Microsoft/AirSim/tree/master/PythonClient//computer_vision)
* [Move on Path](https://github.com/Microsoft/AirSim/wiki/moveOnPath-demo) demo showing video of fast multirotor flight through Modular Neighborhood environment
* [Building a Hexacopter](https://github.com/Microsoft/AirSim/wiki/hexacopter)
* [Building Point Clouds](https://github.com/Microsoft/AirSim/wiki/Point-Clouds)
Expand Down
2 changes: 1 addition & 1 deletion docs/apis_cpp.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Please read [general API doc](apis.md) first if you haven't already. This document describes C++ examples and other C++ specific details.

## Quick Start
Fastest way to get started is to open AirSim.sln in Visual Studio 2017. You will see [Hello Car](../HelloCar) and [Hello Drone](../HelloDrone) examples in the solution. These examples will show you the include paths and lib paths you will need to setup in your VC++ projects. If you are using Linux then you will specify these paths either in your [cmake file](../cmake/HelloCar/CMakeLists.txt) or on compiler command line.
Fastest way to get started is to open AirSim.sln in Visual Studio 2017. You will see [Hello Car](https://github.com/Microsoft/AirSim/tree/master/HelloCar/) and [Hello Drone](https://github.com/Microsoft/AirSim/tree/master/HelloDrone/) examples in the solution. These examples will show you the include paths and lib paths you will need to setup in your VC++ projects. If you are using Linux then you will specify these paths either in your [cmake file](https://github.com/Microsoft/AirSim/tree/master/cmake//HelloCar/CMakeLists.txt) or on compiler command line.

#### Include and Lib Folders
* Include folders: `$(ProjectDir)..\AirLib\deps\rpclib\include;include;$(ProjectDir)..\AirLib\deps\eigen3;$(ProjectDir)..\AirLib\include`
Expand Down
2 changes: 1 addition & 1 deletion docs/code_structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This is the only portion of project which is dependent on Unreal engine. We have
## MavLinkCom

This is the library developed by our own team member [Chris Lovett](https://github.com/lovettchris) that provides C++ classes to talk to the MavLink devices. This library is stand alone and can be used in any project.
See [MavLinkCom](../MavLinkCom/README.md) for more info.
See [MavLinkCom](https://github.com/Microsoft/AirSim/tree/master/MavLinkCom//README.md) for more info.

## Sample Programs
We have created a few sample programs to demonstrate how to use the API. See HelloDrone and DroneShell.
Expand Down
2 changes: 1 addition & 1 deletion docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Unreal 4.15 added the ability for Foliage LOD dithering to be disabled on a case
See [XBox controller](xbox_controller.md) for details.

#### Can I build a hexacopter with AirSim?
See [how to build a hexacopter](hexacopter.md).
See [how to build a hexacopter](https://github.com/microsoft/airsim/wiki/hexacopter).

#### How do I use AirSim with multiple vehicles?
Here is [multi-vehicle setup guide](multi_vehicle.md).
Expand Down
2 changes: 1 addition & 1 deletion docs/flight_controller.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Flight Controller
# Flight Controller

## What is Flight Controller?
"Wait!" you ask, "Why do you need flight controller for a simulator?". The primary job of flight controller is to take in *desired state* as input, estimate *actual state* using sensors data and then drive the actuators in such a way so that actual state comes as close to the desired state. For quadrotors, desired state can be specified as roll, pitch and yaw, for example. It then estimates actual roll, pitch and yaw using gyroscope and accelerometer. Then it generates appropriate motor signals so actual state becomes desired state. You can find more in-depth in [our paper](paper/main.pdf).
Expand Down
2 changes: 1 addition & 1 deletion docs/hello_drone.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
## How does Hello Drone work?

Hello Drone uses the RPC client to connect to the RPC server that is automatically started by the AirSim.
The RPC server routes all the commands to a class that implements [DroneControlBase](../AirLib/include/controllers/DroneControllerBase.hpp). In essence, DroneControlBase defines our abstract interface for getting data from the quadrotor and sending back commands. We currently have concrete implementation for DroneControlBase for MavLink based vehicles. The implementation for DJI drone platforms, specifically Matrice, is in works.
The RPC server routes all the commands to a class that implements [MultirotorApiBase](https://github.com/Microsoft/AirSim/tree/master/AirLib//include/vehicles/multirotor/api/MultirotorApiBase.hpp). In essence, MultirotorApiBase defines our abstract interface for getting data from the quadrotor and sending back commands. We currently have concrete implementation for MultirotorApiBase for MavLink based vehicles. The implementation for DJI drone platforms, specifically Matrice, is in works.
Loading

0 comments on commit 9e9ef5d

Please sign in to comment.