зеркало из https://github.com/microsoft/AirSim.git
Enable mkdocs
This commit is contained in:
Родитель
0e01f09598
Коммит
9e9ef5d227
15
CHANGELOG.md
15
CHANGELOG.md
|
@ -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!
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
@ -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).
|
||||
|
|
|
@ -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
|
|
@ -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
docs/apis.md
14
docs/apis.md
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
|
|
@ -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`
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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).
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -127,13 +127,13 @@ int getStereoAndDepthImages()
|
|||
|
||||
### Python
|
||||
|
||||
For a more complete ready to run sample code please see [sample code in AirSimClient project](../PythonClient/multirotor/hello_drone.py) for multirotors or [HelloCar sample](../PythonClient/car/hello_car.py). This code also demonstrates simple activities such as saving images in files or using `numpy` to manipulate images.
|
||||
For a more complete ready to run sample code please see [sample code in AirSimClient project](https://github.com/Microsoft/AirSim/tree/master/PythonClient//multirotor/hello_drone.py) for multirotors or [HelloCar sample](https://github.com/Microsoft/AirSim/tree/master/PythonClient//car/hello_car.py). This code also demonstrates simple activities such as saving images in files or using `numpy` to manipulate images.
|
||||
|
||||
### C++
|
||||
|
||||
For a more complete ready to run sample code please see [sample code in HelloDrone project](../HelloDrone/main.cpp) for multirotors or [HelloCar project](../HelloCar/main.cpp).
|
||||
For a more complete ready to run sample code please see [sample code in HelloDrone project](https://github.com/Microsoft/AirSim/tree/master/HelloDrone//main.cpp) for multirotors or [HelloCar project](https://github.com/Microsoft/AirSim/tree/master/HelloCar//main.cpp).
|
||||
|
||||
See also [other example code](../Examples/StereoImageGenerator.hpp) that generates specified number of stereo images along with ground truth depth and disparity and saving it to [pfm format](pfm.md).
|
||||
See also [other example code](https://github.com/Microsoft/AirSim/tree/master/Examples/DataCollection/StereoImageGenerator.hpp) that generates specified number of stereo images along with ground truth depth and disparity and saving it to [pfm format](pfm.md).
|
||||
|
||||
## Available Cameras
|
||||
### Car
|
||||
|
@ -159,7 +159,7 @@ To active this mode, edit [settings.json](settings.md) that you can find in your
|
|||
}
|
||||
```
|
||||
|
||||
[Here's the Python code example](../PythonClient/computer_vision/cv_mode.py) to move camera around and capture images.
|
||||
[Here's the Python code example](https://github.com/Microsoft/AirSim/tree/master/PythonClient//computer_vision/cv_mode.py) to move camera around and capture images.
|
||||
|
||||
This mode was inspired from [UnrealCV project](http://unrealcv.org/).
|
||||
|
||||
|
@ -167,7 +167,7 @@ This mode was inspired from [UnrealCV project](http://unrealcv.org/).
|
|||
To move around the environment using APIs you can use `simSetVehiclePose` API. This API takes position and orientation and sets that on the invisible vehicle where the front-center camera is located. All rest of the cameras move along keeping the relative position. If you don't want to change position (or orientation) then just set components of position (or orientation) to floating point nan values. The `simGetVehiclePose` allows to retrieve the current pose. You can also use `simGetGroundTruthKinematics` to get the quantities kinematics quantities for the movement. Many other non-vehicle specific APIs are also available such as segmentation APIs, collision APIs and camera APIs.
|
||||
|
||||
## Camera APIs
|
||||
The `simGetCameraInfo` returns the pose (in world frame, NED coordinates, SI units) and FOV (in degrees) for the specified camera. Please see [example usage](../PythonClient/computer_vision/cv_mode.py).
|
||||
The `simGetCameraInfo` returns the pose (in world frame, NED coordinates, SI units) and FOV (in degrees) for the specified camera. Please see [example usage](https://github.com/Microsoft/AirSim/tree/master/PythonClient//computer_vision/cv_mode.py).
|
||||
|
||||
The `simSetCameraOrientation` sets the orientation for the specified camera as quaternion in NED frame. The handy `airsim.to_quaternion()` function allows to convert pitch, roll, yaw to quaternion. For example, to set camera-0 to 15-degree pitch, you can use:
|
||||
```
|
||||
|
@ -177,7 +177,7 @@ client.simSetCameraOrientation(0, airsim.toQuaternion(0.261799, 0, 0)); #radians
|
|||
### Gimbal
|
||||
You can set stabilization for pitch, roll or yaw for any camera [using settings](settings.md#gimbal).
|
||||
|
||||
Please see [example usage](../PythonClient/computer_vision/cv_mode.py).
|
||||
Please see [example usage](https://github.com/Microsoft/AirSim/tree/master/PythonClient//computer_vision/cv_mode.py).
|
||||
|
||||
## Changing Resolution and Camera Parameters
|
||||
To change resolution, FOV etc, you can use [settings.json](settings.md). For example, below addition in settings.json sets parameters for scene capture and uses "Computer Vision" mode described above. If you omit any setting then below default values will be used. For more information see [settings doc](settings.md). If you are using stereo camera, currently the distance between left and right is fixed at 25 cm.
|
||||
|
@ -224,7 +224,7 @@ When you specify `ImageType = DepthVis` in `ImageRequest`, you get an image that
|
|||
You normally want to retrieve disparity image as float (i.e. set `pixels_as_float = true` and specify `ImageType = DisparityNormalized` in `ImageRequest`) in which case each pixel is `(Xl - Xr)/Xmax`, which is thereby normalized to values between 0 to 1.
|
||||
|
||||
### Segmentation
|
||||
When you specify `ImageType = Segmentation` in `ImageRequest`, you get an image that gives you ground truth segmentation of the scene. At the startup, AirSim assigns value 0 to 255 to each mesh available in environment. This value is than mapped to a specific color in [the pallet](../Unreal/Plugins/AirSim/Content/HUDAssets/seg_color_pallet.png). The RGB values for each object ID can be found in [this file](seg_rgbs.txt).
|
||||
When you specify `ImageType = Segmentation` in `ImageRequest`, you get an image that gives you ground truth segmentation of the scene. At the startup, AirSim assigns value 0 to 255 to each mesh available in environment. This value is than mapped to a specific color in [the pallet](https://github.com/Microsoft/AirSim/tree/master/Unreal//Plugins/AirSim/Content/HUDAssets/seg_color_pallet.png). The RGB values for each object ID can be found in [this file](seg_rgbs.txt).
|
||||
|
||||
You can assign a specific value (limited to the range 0-255) to a specific mesh using APIs. For example, below Python code sets the object ID for the mesh called "Ground" to 20 in Blocks environment and hence changes its color in Segmentation view:
|
||||
|
||||
|
@ -255,7 +255,7 @@ print(np.unique(img_rgba[:,:,1], return_counts=True)) #green
|
|||
print(np.unique(img_rgba[:,:,2], return_counts=True)) #blue
|
||||
```
|
||||
|
||||
A complete ready-to-run example can be found in [segmentation.py](../computer_vision/segmentation.py).
|
||||
A complete ready-to-run example can be found in [segmentation.py](https://github.com/Microsoft/AirSim/tree/master/PythonClient//computer_vision/segmentation.py).
|
||||
|
||||
#### Unsetting object ID
|
||||
An object's ID can be set to -1 to make it not show up on the segmentation image.
|
||||
|
@ -270,7 +270,7 @@ If you don't know how to open Unreal Environment in Unreal Editor then try follo
|
|||
Once you decide on the meshes you are interested, note down their names and use above API to set their object IDs. There are [few settings](settings.md#segmentation-settings) available to change object ID generation behavior.
|
||||
|
||||
#### Changing Colors for Object IDs
|
||||
At present the color for each object ID is fixed as in [this palate](../Unreal/Plugins/AirSim/Content/HUDAssets/seg_color_pallet.png). We will be adding ability to change colors for object IDs to desired values shortly. In the meantime you can open the segmentation image in your favorite image editor and get the RGB values you are interested in.
|
||||
At present the color for each object ID is fixed as in [this palate](https://github.com/Microsoft/AirSim/tree/master/Unreal//Plugins/AirSim/Content/HUDAssets/seg_color_pallet.png). We will be adding ability to change colors for object IDs to desired values shortly. In the meantime you can open the segmentation image in your favorite image editor and get the RGB values you are interested in.
|
||||
|
||||
#### Startup Object IDs
|
||||
At the start, AirSim assigns object ID to each object found in environment of type `UStaticMeshComponent` or `ALandscapeProxy`. It then either uses mesh name or owner name (depending on settings), lower cases it, removes any chars below ASCII 97 to remove numbers and some punctuations, sums int value of all chars and modulo 255 to generate the object ID. In other words, all object with same alphabet chars would get same object ID. This heuristic is simple and effective for many Unreal environments but may not be what you want. In that case, please use above APIs to change object IDs to your desired values. There are [few settings](settings.md#segmentation-settings) available to change this behavior.
|
||||
|
@ -282,4 +282,4 @@ The `simGetSegmentationObjectID` API allows you get object ID for given mesh nam
|
|||
Currently this is just a map from object ID to grey scale 0-255. So any mesh with object ID 42 shows up with color (42, 42, 42). Please see [segmentation section](#segmentation) for more details on how to set object IDs. Typically noise setting can be applied for this image type to get slightly more realistic effect. We are still working on adding other infrared artifacts and any contributions are welcome.
|
||||
|
||||
## Example Code
|
||||
A complete example of setting vehicle positions at random locations and orientations and then taking images can be found in [GenerateImageGenerator.hpp](../Examples/StereoImageGenerator.hpp). This example generates specified number of stereo images and ground truth disparity image and saving it to [pfm format](pfm.md).
|
||||
A complete example of setting vehicle positions at random locations and orientations and then taking images can be found in [GenerateImageGenerator.hpp](https://github.com/Microsoft/AirSim/tree/master/Examples/DataCollection/StereoImageGenerator.hpp). This example generates specified number of stereo images and ground truth disparity image and saving it to [pfm format](pfm.md).
|
||||
|
|
|
@ -55,8 +55,8 @@ Use `getLidarData()` API to retrieve the Lidar data.
|
|||
* The coordinates are in the local vehicle NED like all other AirSim APIs.
|
||||
|
||||
### Python Examples
|
||||
[drone_lidar.py](../PythonClient/multirotor)
|
||||
[car_lidar.py](../PythonClient/car)
|
||||
[drone_lidar.py](https://github.com/Microsoft/AirSim/tree/master/PythonClient//multirotor)
|
||||
[car_lidar.py](https://github.com/Microsoft/AirSim/tree/master/PythonClient//car)
|
||||
|
||||
## Coming soon
|
||||
* Visualization of lidar data on client side.
|
|
@ -0,0 +1,181 @@
|
|||
dev_addr: 127.0.0.1:8080
|
||||
strict: true
|
||||
site_name: AirSim
|
||||
site_dir: build
|
||||
docs_dir: doc_root
|
||||
repo_url: https://github.com/microsoft/airsim
|
||||
#site_url: http://microsoft.github.io/airsim
|
||||
#edit_uri: edit/master/docs
|
||||
#repo_name: GitHub
|
||||
site_description: 'Open source simulator based on Unreal Engine for autonomous vehicles from Microsoft AI & Research'
|
||||
|
||||
markdown_extensions:
|
||||
# - meta
|
||||
# - toc:
|
||||
# permalink: true # For ¶
|
||||
# #permalink: "#"
|
||||
# #separator: "_"
|
||||
# - admonition
|
||||
# - fenced_code
|
||||
# - codehilite
|
||||
# - smarty
|
||||
# - tables
|
||||
# - def_list
|
||||
# - sane_lists
|
||||
# - codehilite:
|
||||
# guess_lang: true
|
||||
# linenums: true
|
||||
# - mdx_math:
|
||||
# enable_dollar_delimiter: True
|
||||
# - pymdownx.highlight:
|
||||
# guess_lang: true
|
||||
# extend_pygments_lang:
|
||||
# - name: php
|
||||
# lang: php
|
||||
# options:
|
||||
# startinline: true
|
||||
# - pymdownx.arithmatex:
|
||||
# #inline_syntax: ['dollar']
|
||||
# #block_syntax: ['dollar', 'begin']
|
||||
# #insert_as_script: True
|
||||
# # - pymdownx.keys:
|
||||
# # strict: false
|
||||
# - pymdownx.betterem:
|
||||
# smart_enable: all
|
||||
# - pymdownx.caret
|
||||
# #- pymdownx.critic
|
||||
# - pymdownx.details
|
||||
# - pymdownx.inlinehilite
|
||||
# - pymdownx.tasklist:
|
||||
# custom_checkbox: true
|
||||
# #- pymdownx.magiclink:
|
||||
# #- base_repo_url: https://github.com/abinit/abinit
|
||||
# #- repo_url_shortener: true
|
||||
# - pymdownx.mark
|
||||
# - pymdownx.smartsymbols:
|
||||
# registered: false
|
||||
# copyright: false
|
||||
# care_of: false
|
||||
# - pymdownx.superfences
|
||||
# - pymdownx.tilde
|
||||
|
||||
remote_branch: gh-pages
|
||||
#remote_name: origin
|
||||
|
||||
theme:
|
||||
#name: 'rtd-dropdown'
|
||||
name: 'readthedocs'
|
||||
# Disable the default top left logo until we sort out our custom one.
|
||||
logo:
|
||||
icon: ' '
|
||||
# extra_css:
|
||||
# - css/extra.css
|
||||
# - css/gallery.css
|
||||
# - css/my_codehilite.css
|
||||
|
||||
# # Don't include MkDocs' JavaScript
|
||||
# include_search_page: false
|
||||
# search_index_only: true
|
||||
|
||||
extra:
|
||||
version: 1.2.1
|
||||
#previous_published_versions: [1.2.1]
|
||||
#logo: images/logo-abinit-2015.svg
|
||||
feature:
|
||||
tabs: true
|
||||
palette:
|
||||
#primary: orange
|
||||
#accent: orange
|
||||
# primary: deep orange
|
||||
# accent: deep orange
|
||||
#primary: indigo
|
||||
#accent: indigo
|
||||
#font:
|
||||
#fonttext: 'Ubuntu'
|
||||
#fontcode: 'Ubuntu Mono'
|
||||
social:
|
||||
- type: facebook
|
||||
link: https://www.facebook.com/groups/1225832467530667/
|
||||
- type: github-alt
|
||||
link: https://github.com/Microsoft/AirSim
|
||||
# - type: twitter
|
||||
# link: https://twitter.com/hashtag/abinit
|
||||
# - type: youtube
|
||||
# link: https://www.youtube.com/watch?v=gcbfb_Mteo4
|
||||
|
||||
copyright: Copyright © 2018 Microsoft Research
|
||||
|
||||
nav:
|
||||
- "Home": 'README.md'
|
||||
- "Whats New": 'CHANGELOG.md'
|
||||
- "Get AirSim":
|
||||
- "Download Binaries": 'docs/use_precompiled.md'
|
||||
- "Build on Windows": 'docs/build_windows.md'
|
||||
- "Build on Linux": 'docs/build_linux.md'
|
||||
- "Creating Custom Environment": 'docs/unreal_custenv.md'
|
||||
- "Using AirSim":
|
||||
- "Core APIs": 'docs/apis.md'
|
||||
- "Image APIs": 'docs/image_apis.md'
|
||||
- "C++ APIs": 'docs/apis_cpp.md'
|
||||
- "Development Workflow": 'docs/dev_workflow.md'
|
||||
- "Settings": 'docs/settings.md'
|
||||
- "Camera Views": 'docs/camera_views.md'
|
||||
- "Using Car": 'docs/using_car.md'
|
||||
- "Remote Control": 'docs/remote_control.md'
|
||||
- "XBox Controller": 'docs/xbox_controller.md'
|
||||
- "Steering Wheel": 'docs/steering_wheel_installation.md'
|
||||
- "Multiple Vehicles": 'docs/multi_vehicle.md'
|
||||
- "Sensors": 'docs/sensors.md'
|
||||
- "LIDAR": 'docs/lidar.md'
|
||||
- "ROS": 'docs/ros.md'
|
||||
- "Playing Logs": 'docs/playback.md'
|
||||
- "Design":
|
||||
- "Architecture": 'docs/design.md'
|
||||
- "Code Structure": 'docs/code_structure.md'
|
||||
- "Coding Guidelines": 'docs/coding_guidelines.md'
|
||||
- "Flight Controller": 'docs/flight_controller.md'
|
||||
- "Simple Flight": 'docs/simple_flight.md'
|
||||
- "Hello Drone": 'docs/hello_drone.md'
|
||||
- "MavLink and PX4":
|
||||
- "PX4 Setup for AirSim": 'docs/px4_setup.md'
|
||||
- "PX4 in SITL": 'docs/px4_sitl.md'
|
||||
- "AirSim with Pixhawk": 'https://youtu.be/1oY8Qu5maQQ'
|
||||
- "PX4 Setup with AirSim": 'https://youtu.be/HNWdYrtw3f0'
|
||||
- "Debugging Attitude Estimation": 'https://www.youtube.com/watch?v=d_FyjKDWQfc&feature=youtu.be'
|
||||
- "Intercepting MavLink Messages": 'https://github.com/Microsoft/AirSim/wiki/Intercepting-MavLink-messages'
|
||||
- "Rapid Descent on PX4 Drones": 'https://github.com/Microsoft/AirSim/wiki/Rapid-Descent-on-PX4-drones'
|
||||
- "Building PX4": "docs/px4_build.md"
|
||||
- "PX4/MavLink Logging": 'docs/px4_logging.md'
|
||||
- "MavLink LogViewer": "docs/log_viewer.md"
|
||||
# - "MavLinkCom": 'MavLinkCom/README.md'
|
||||
# - "MavLink MoCap": 'MavLinkCom/MavLinkMoCap/Readme.md'
|
||||
- "Upgrading":
|
||||
- "Upgrading Unreal": 'docs/unreal_upgrade.md'
|
||||
- "Upgrading APIs": 'docs/upgrade_apis.md'
|
||||
- "Upgrading Settings": 'docs/upgrade_settings.md'
|
||||
- "Contributed Tutorials":
|
||||
- "Reinforcement Learning": 'docs/reinforcement_learning.md'
|
||||
- "Using Environments from Marketplace": 'https://www.youtube.com/watch?v=y09VbdQWvQY'
|
||||
- "Simple Collision Avoidance": 'https://github.com/simondlevy/AirSimTensorFlow'
|
||||
- "Autonomous Driving on Azure": 'https://aka.ms/AutonomousDrivingCookbook'
|
||||
- "Building Hexacopter": 'https://github.com/Microsoft/AirSim/wiki/hexacopter'
|
||||
- "Moving on Path Demo": 'https://github.com/Microsoft/AirSim/wiki/moveOnPath-demo'
|
||||
- "Building Point Clouds": 'https://github.com/Microsoft/AirSim/wiki/Point-Clouds'
|
||||
- "Surveying Using Drone": 'https://github.com/Microsoft/AirSim/wiki/Implementing-a-Drone-Survey-script'
|
||||
- "Misc":
|
||||
- "AirSim on Real Drones": 'docs/custom_drone.md'
|
||||
- "Installing cmake on Linux": 'docs/cmake_linux.md'
|
||||
- "Tips for Busy HDD": 'docs/hard_drive.md'
|
||||
- "pfm format": 'docs/pfm.md'
|
||||
- "Setting up Unreal Environment": 'docs/unreal_proj.md'
|
||||
- "Blocks Environment": 'docs/unreal_blocks.md'
|
||||
- "Who is Using AirSim": 'docs/who_is_using.md'
|
||||
- "Working with UE Plugin Contents": 'docs/working_with_plugin_contents.md'
|
||||
- "Formula Student Technion Self-drive": 'https://github.com/Microsoft/AirSim/wiki/technion'
|
||||
- "Support":
|
||||
- "FAQ": 'docs/faq.md'
|
||||
- "Support": 'SUPPORT.md'
|
||||
- "Create Issue": 'docs/create_issue.md'
|
||||
- "Contribute": 'CONTRIBUTING.md'
|
||||
|
||||
|
|
@ -49,9 +49,9 @@ It's as easy as specifying them in [settings.json](settings.md). The `Vehicles`
|
|||
## Using APIs for Multiple Vehicles
|
||||
The new APIs since AirSim 1.2 allows you to specify `vehicle_name`. This name corresponds to keys in json settings (for example, Car1 or Drone2 above).
|
||||
|
||||
[Example code for cars](../PythonClient/car/multi_agent_car.py)
|
||||
[Example code for cars](https://github.com/Microsoft/AirSim/tree/master/PythonClient//car/multi_agent_car.py)
|
||||
|
||||
[Example code for multirotors](../PythonClient/multirotor/multi_agent_drone.py)
|
||||
[Example code for multirotors](https://github.com/Microsoft/AirSim/tree/master/PythonClient//multirotor/multi_agent_drone.py)
|
||||
|
||||
### Demo
|
||||
[![AirSimMultiple Vehicles Demo Video](images/demo_multi_vehicles.png)](https://youtu.be/35dgcuLuF5M)
|
||||
|
|
|
@ -4,4 +4,4 @@ Pfm (or Portable FloatMap) image format stores image as floating point pixels an
|
|||
|
||||
One of the good viewer to view this file format is [PfmPad](https://sourceforge.net/projects/pfmpad/). We don't recommend Maverick photo viewer because it doesn't seem to show depth images properly.
|
||||
|
||||
AirSim has code to write pfm file for [C++](https://github.com/Microsoft/AirSim/blob/master/AirLib/include/common/common_utils/Utils.hpp#L637) and read as well as write for [Python](../PythonClient/airsim/utils.py#L122).
|
||||
AirSim has code to write pfm file for [C++](https://github.com/Microsoft/AirSim/blob/master/AirLib/include/common/common_utils/Utils.hpp#L637) and read as well as write for [Python](https://github.com/Microsoft/AirSim/tree/master/PythonClient//airsim/utils.py#L122).
|
||||
|
|
|
@ -9,7 +9,7 @@ This is still in active development. What we share below is a framework that can
|
|||
|
||||
## RL with Car
|
||||
|
||||
[Source code](../PythonClient/car/DQNcar.py)
|
||||
[Source code](https://github.com/Microsoft/AirSim/tree/master/PythonClient//car/DQNcar.py)
|
||||
|
||||
This example works with AirSimNeighborhood environment available in [releases](https://github.com/Microsoft/AirSim/releases).
|
||||
|
||||
|
@ -102,7 +102,7 @@ Note that the simulation needs to be up and running before you execute DQNcar.py
|
|||
|
||||
## RL with Quadrotor
|
||||
|
||||
[Source code](../multirotor/DQNdrone.py)
|
||||
[Source code](https://github.com/Microsoft/AirSim/tree/master/PythonClient//multirotor/DQNdrone.py)
|
||||
|
||||
This example works with AirSimMountainLandscape environment available in [releases](https://github.com/Microsoft/AirSim/releases).
|
||||
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
# Release Notes
|
||||
|
||||
**Please see [changelog](CHANGELOG.md). This page is not maintained currently.**
|
||||
|
||||
|
||||
## v1.1 - 2017-09-28
|
||||
- We have added [car model](using_car.md)!
|
||||
|
||||
## v1.0 - 2017-08-29
|
||||
- [simple_flight](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](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.
|
|
@ -27,7 +27,7 @@ If not sensors are specified in the settings json, the the following sensors are
|
|||
### ComputerVision
|
||||
* None
|
||||
|
||||
Please see 'createDefaultSensorSettings' method in [AirSimSettings.hpp](../AirLib/include/common/)
|
||||
Please see 'createDefaultSensorSettings' method in [AirSimSettings.hpp](https://github.com/Microsoft/AirSim/tree/master/AirLib//include/common/)
|
||||
|
||||
## Configuration of Default Sensor list
|
||||
|
||||
|
@ -99,7 +99,7 @@ If a vehicle provides its sensor list, it must provide the whole list. Selective
|
|||
### Shared settings
|
||||
There are two shared settings:
|
||||
* SensorType
|
||||
An integer representing the sensor-type [SensorBase.hpp](../AirLib/include/sensors/)
|
||||
An integer representing the sensor-type [SensorBase.hpp](https://github.com/Microsoft/AirSim/tree/master/AirLib//include/sensors/)
|
||||
```
|
||||
enum class SensorType : uint {
|
||||
Barometer = 1,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
There have been several API changes in AirSim v1.2 that we hope removes inconsistency, adds future extensibility and presents cleaner interface. Many of these changes are however *breaking changes* which means you will need to modify your client code that talks to AirSim.
|
||||
|
||||
## Quicker Way
|
||||
While most changes you need to do in your client code are fairly easy, a quicker way is simply to take a look at the example code such as [Hello Drone](../PythonClient/multirotor/hello_drone.py)or [Hello Car](../PythonClient/car/hello_car.py) to get gist of changes.
|
||||
While most changes you need to do in your client code are fairly easy, a quicker way is simply to take a look at the example code such as [Hello Drone](https://github.com/Microsoft/AirSim/tree/master/PythonClient//multirotor/hello_drone.py)or [Hello Car](https://github.com/Microsoft/AirSim/tree/master/PythonClient//car/hello_car.py) to get gist of changes.
|
||||
|
||||
## Importing AirSim
|
||||
Instead of,
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
@echo off
|
||||
REM //---------- set up variable ----------
|
||||
setlocal
|
||||
set ROOT_DIR=%~dp0
|
||||
pushd %~dp0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
:success
|
||||
@echo "Task completed."
|
||||
goto end
|
||||
|
||||
:failed
|
||||
@echo "Task has failed."
|
||||
goto end
|
||||
|
||||
:end
|
||||
popd
|
Загрузка…
Ссылка в новой задаче