Skip to content

Commit

Permalink
add documentation on the camera views.
Browse files Browse the repository at this point in the history
  • Loading branch information
lovettchris committed Apr 6, 2017
1 parent 42ec685 commit bd8429d
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ platforms, specifically Matrice, is in works.

## How to get images from drone?
Here's a sample code. For more information, please see [DroneControlBase](https://github.com/Microsoft/AirSim/blob/master/AirLib/include/controllers/DroneControllerBase.hpp) class.
See [Camera Views](camera_views.md) for information on the camera views and how to change them.

```
int playWithImages()
Expand Down
29 changes: 29 additions & 0 deletions docs/camera_views.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Camera Views

The camera views that are shown on screen are the camera views you can fetch via the DroneControllerBase::getImageTypeForCamera API.
Note that getImageTypeForCamera returns .png compressed images.

![Cameras](images/cameras.png)

From left to right is the depth view, segmentation view and the FPV view. These views must be visible in order for
getImageTypeForCamera to work.

## Depth View

The depth view provides a ground truth depth map image. This depth is computed from the 3D model information and therefore can
be used to test any other algorithm that tries to compute depth from the images.

## Segmentation View

This view randomly colors objects in the scene based on information on how the 3D model was built. These colors are currently
random, so they contain no semantic tagging. For example, in the above picture the hedge in the forground is made up of separate
hedge segments so each segment gets a different color as a result, even though it is the same type of hedge.

If you want your Unreal environment to provide colors that are meaningful, then override FlyingPawn::setupStencilIDs() function or
assign proper values in CustomDepthStencilValue property in object browser window in Unreal Editor, then remove the random
assignment that is happening in AFlyingPawn::setStencilIDs.

## FPV View

This view is simulating a fixed forward pointing camera on the drone. Note however, that this camera switchs places with the
main game view if the user presses '[' or ']'.
Binary file added docs/images/cameras.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions docs/sitl.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,18 @@ Local position: x=-0.0326988, y=0.00656854, z=5.48506
If the z coordinate is large like this then takeoff might not work as expected. Resetting the SITL and simulation
should fix that problem.

## No Remote Control

If you plan to fly with no remote control, just using DroneShell commands for example, then you will need to set the
following parameters to stop the PX4 from triggering "failsafe mode on" every time a move command is finished.

````
param set NAV_RCL_ACT 0
param set NAV_DLL_ACT 0
````

NOTE: Do `NOT` do this on a real drone as it is too dangerous to fly without these failsafe measures.

## Using VirtualBox Ubuntu

If you want to run the above posix_sitl in a `VirtualBox Ubuntu` machine then it will have a different ip address from localhost.
Expand Down

0 comments on commit bd8429d

Please sign in to comment.