Skip to content

Commit

Permalink
merging docs changes
Browse files Browse the repository at this point in the history
Moving change to table of configurable parameters in distance sensors from docs\sensors.md to docs\distance_sensor.md
  • Loading branch information
zimmy87 committed Apr 28, 2021
2 parents b71abea + 815fe8e commit 8c5cbb0
Show file tree
Hide file tree
Showing 27 changed files with 282 additions and 202 deletions.
2 changes: 1 addition & 1 deletion docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Below is summarized list of important changes. This does not include minor/less
* Added [Time of Day API](apis.md#time-of-day-api)
* An experimental integration of [AirSim on Unity](https://github.com/Microsoft/AirSim/tree/master/Unity) is now available. Learn more in [Unity blog post](https://blogs.unity3d.com/2018/11/14/airsim-on-unity-experiment-with-autonomous-vehicle-simulation).
* [New environments](https://github.com/Microsoft/AirSim/releases/tag/v1.2.1): Forest, Plains (windmill farm), TalkingHeads (human head simulation), TrapCam (animal detection via camera)
* Highly efficient [NoDisplay view mode](https://github.com/Microsoft/AirSim/blob/master/docs/settings.md#viewmode) to turn off main screen rendering so you can capture images at high rate
* Highly efficient [NoDisplay view mode](settings.md#viewmode) to turn off main screen rendering so you can capture images at high rate
* [Enable/disable sensors](https://github.com/Microsoft/AirSim/pull/1479) via settings
* [Lidar Sensor](lidar.md)
* [Support for Flysky FS-SM100 RC](https://github.com/Microsoft/AirSim/commit/474214364676b6631c01b3ed79d00c83ba5bccf5) USB adapter
Expand Down
4 changes: 2 additions & 2 deletions docs/Unity.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ This will generate the necessary shared library and copy it to the UnityDemo Plu
* Click on the new project which showed up in the Unity Hub menu to open it in Unity.
* In the bottom pane, click on `Projects`->`Assets`->`Scenes`. Then, **Double-click** on `SimModeSelector`. This will load the SimModeSelector scene into the scene hierarchy pane. *DO NOT* add CarDemo or DroneDemo scene into the scene hierarchy pane.
* Hit the play button to start the simulation (and hit play again to stop the simulation. .
* Alternatively, you can change the SimMode in your `Settings.json` file. (You can read more about [`Settings.json` here](https://github.com/Microsoft/AirSim/blob/master/docs/settings.md))
* Alternatively, you can change the SimMode in your `Settings.json` file. (You can read more about [`Settings.json` here](settings.md))
* Controlling the car:
Use `WASD` or the `Arrow keys` or the AirSim client.
* Controlling the drone:
Expand Down Expand Up @@ -119,7 +119,7 @@ chmod +x "{project_name}.{configuration}"
```
### Using Airsim API
* For quickstart with the Python APIs for the car or the drone, simply run the [`hello_car.py`](https://github.com/Microsoft/AirSim/blob/master/PythonClient/car/hello_car.py) or the [`hello_drone.py`](https://github.com/Microsoft/AirSim/blob/master/PythonClient/multirotor/hello_drone.py) script accordingly.
* Details of the AirSim C++ and Python APIs are [here](https://github.com/Microsoft/AirSim/blob/master/docs/apis.md).
* Details of the AirSim C++ and Python APIs are [here](apis.md).

### Acknowledgements
* The drone object was provided by user 31415926 on [sketchfab](https://sketchfab.com/models/055841df0fb24cd4abde06a91f7d360a). It is licensed under the [CC License](https://creativecommons.org/licenses/by/4.0/).
5 changes: 3 additions & 2 deletions docs/airsim_ros_pkgs.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ Throttle, brake, steering and gear selections for control. Both automatic and ma
Listens to odometry published by `airsim_node`

#### Publishers:
- `/vel_cmd_world_frame` [airsim_ros_pkgs/VelCmd](airsim_ros_pkgs/VelCmd)
- `/vel_cmd_world_frame` [airsim_ros_pkgs/VelCmd](https://github.com/microsoft/AirSim/tree/master/ros/src/airsim_ros_pkgs/msg/VelCmd.msg)
Sends velocity command to `airsim_node`

### Global params
Expand Down Expand Up @@ -212,7 +212,8 @@ Upon completion, you will be able to build and run the ros wrapper as in a nativ

##### WSL1 vs WSL2

WSL2 is the latest version of the Windows10 Subsystem for Linux. It is many times faster than WSL1 and is therefore much preferred for building the code in terms of speed.
WSL2 is the latest version of the Windows10 Subsystem for Linux. It is many times faster than WSL1 (if you use the native file system in `/home/...` rather
than Windows mounted folders under `/mnt/...`) and is therefore much preferred for building the code in terms of speed.

Once installed, you can switch between WSL1 or WSL2 versions as you prefer.

Expand Down
2 changes: 1 addition & 1 deletion docs/airsim_tutorial_pkgs.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ catkin build airsim_tutorial_pkgs -DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=
$ source PATH_TO/AirSim/ros/devel/setup.bash
$ roslaunch airsim_tutorial_pkgs front_stereo_and_center_mono.launch
```
The above would start rviz with tf's, registered RGBD cloud using [depth_image_proc](https://wiki.ros.org/depth_image_proc) using the [`depth_to_pointcloud` launch file](https://github.com/microsoft/AirSim/master/ros/src/airsim_tutorial_pkgs/launch/front_stereo_and_center_mono/depth_to_pointcloud.launch), and the lidar point cloud.
The above would start rviz with tf's, registered RGBD cloud using [depth_image_proc](https://wiki.ros.org/depth_image_proc) using the [`depth_to_pointcloud` launch file](https://github.com/microsoft/AirSim/blob/master/ros/src/airsim_tutorial_pkgs/launch/front_stereo_and_center_mono/depth_to_pointcloud.launch), and the lidar point cloud.


### Two drones, with cameras, lidar, IMU each
Expand Down
2 changes: 1 addition & 1 deletion docs/apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class WeatherParameter:

Please note that `Roadwetness`, `RoadSnow` and `RoadLeaf` effects requires adding [materials](https://github.com/Microsoft/AirSim/tree/master/Unreal/Plugins/AirSim/Content/Weather/WeatherFX) to your scene.

Please see [example code](https://github.com/Microsoft/AirSim/blob/master/PythonClient/computer_vision/weather.py) for more details.
Please see [example code](https://github.com/Microsoft/AirSim/blob/master/PythonClient/environment/weather.py) for more details.

### Recording APIs

Expand Down
6 changes: 3 additions & 3 deletions docs/apis_cpp.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ int main()
```

## See Also
* [Examples](../Examples) of how to use internal infrastructure in AirSim in your other projects
* [DroneShell](../DroneShell) app shows how to make simple interface using C++ APIs to control drones
* [HelloSpawnedDrones](../HelloSpawnedDrones) app shows how to make additional vehicles on the fly
* [Examples](https://github.com/microsoft/AirSim/tree/master/Examples) of how to use internal infrastructure in AirSim in your other projects
* [DroneShell](https://github.com/microsoft/AirSim/tree/master/DroneShell) app shows how to make simple interface using C++ APIs to control drones
* [HelloSpawnedDrones](https://github.com/microsoft/AirSim/tree/master/HelloSpawnedDrones) app shows how to make additional vehicles on the fly
* [Python APIs](apis.md)

2 changes: 1 addition & 1 deletion docs/azure.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Once both the AirSim environment and the Python application are ready, you can p

This would be a perfect scenario when you want to run the simulation at scale. For instance, you could have several different configurations for the same simulation and execute them in a parallel, unattended way using a Docker image on Azure Container Services

Since AirSim requires access to the host GPU, it is required to use a Docker runtime that supports it. For more information about running AirSim in Docker, click [here](https://github.com/microsoft/AirSim/blob/master/docs/docker_ubuntu.md).
Since AirSim requires access to the host GPU, it is required to use a Docker runtime that supports it. For more information about running AirSim in Docker, click [here](docker_ubuntu.md).

When using Azure Container Services to run this image, the only extra-requirement is to add GPU support to the Container Group where it will be deployed.

Expand Down
6 changes: 3 additions & 3 deletions docs/build_linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ We've two options - you can either build inside docker containers or your host m

## Docker

Please see instructions [here](https://github.com/Microsoft/AirSim/blob/master/docs/docker_ubuntu.md)
Please see instructions [here](docker_ubuntu.md)

## Host machine

### Pre-build Setup

#### Linux - Build Unreal Engine

- Make sure you are [registered with Epic Games](https://docs.unrealengine.com/latest/INT/Platforms/Linux/BeginnerLinuxDeveloper/SettingUpAnUnrealWorkflow/1/index.html). This is required to get source code access for Unreal Engine.
- Make sure you are [registered with Epic Games](https://docs.unrealengine.com/en-US/SharingAndReleasing/Linux/BeginnerLinuxDeveloper/SettingUpAnUnrealWorkflow/index.html). This is required to get source code access for Unreal Engine.

- Clone Unreal in your favorite folder and build it (this may take a while!). **Note**: We only support Unreal >= 4.24 at present. We recommend using 4.25.

Expand Down Expand Up @@ -106,7 +106,7 @@ Alternatively, you can use [APIs](apis.md) for programmatic control or use the s
You can also take a look at the `Diagnostics.txt` file.

- How do I use an IDE on Linux?
* You can use Qt Creator or CodeLite. Instructions for Qt Creator are available [here](https://docs.unrealengine.com/latest/INT/Platforms/Linux/BeginnerLinuxDeveloper/SettingUpAnIDE/index.html).
* You can use Qt Creator or CodeLite. Instructions for Qt Creator are available [here](https://docs.unrealengine.com/en-US/SharingAndReleasing/Linux/BeginnerLinuxDeveloper/SettingUpQtCreator/index.html).

- Can I cross compile for Linux from a Windows machine?
* Yes, you can, but we haven't tested it. You can find the instructions [here](https://docs.unrealengine.com/latest/INT/Platforms/Linux/GettingStarted/index.html).
Expand Down
2 changes: 1 addition & 1 deletion docs/build_windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Once AirSim is set up by following above steps, you can,
See [Using APIs](apis.md) and [settings.json](settings.md) for various options available.

# AirSim on Unity (Experimental)
[Unity](https://unity3d.com/) is another great game engine platform and we have an **experimental** integration of [AirSim with Unity](https://microsoft.github.com/AirSim/Unity). Please note that this is work in progress and all features may not work yet.
[Unity](https://unity3d.com/) is another great game engine platform and we have an **experimental** integration of [AirSim with Unity](Unity.md). Please note that this is work in progress and all features may not work yet.

# FAQ

Expand Down
2 changes: 1 addition & 1 deletion docs/custom_drone.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ You can run the MavlinkCom library and MavLinkTest app to test the connection
between your companion computer and flight controller.

## How Does This Work?
AirSim uses MavLinkCom component developed by @lovettchris. The MavLinkCom has a proxy architecture where you can open a connection to PX4 either using serial or UDP and then other components share this connection. When PX4 sends MavLink message, all components receive that message. If any component sends a message then it's received by PX4 only. This allows you to connect any number of components to PX4 [This code](https://github.com/Microsoft/AirSim/blob/master/AirLib/include/vehicles/multirotor/controllers/MavLinkDroneController.hpp#L793) opens a connection for LogViewer and QGC. You can add something more if you like.
AirSim uses MavLinkCom component developed by @lovettchris. The MavLinkCom has a proxy architecture where you can open a connection to PX4 either using serial or UDP and then other components share this connection. When PX4 sends MavLink message, all components receive that message. If any component sends a message then it's received by PX4 only. This allows you to connect any number of components to PX4 [This code](https://github.com/microsoft/AirSim/blob/master/AirLib/include/vehicles/multirotor/firmwares/mavlink/MavLinkMultirotorApi.hpp#L600) opens a connection for LogViewer and QGC. You can add something more if you like.

If you want to use QGC + AirSim together than you will need QGC to let own the serial port. QGC opens up TCP connection that acts as a proxy so any other component can connect to QGC and send MavLinkMessage to QGC and then QGC forwards that message to PX4. So you tell AirSim to connect to QGC and let QGC own serial port.

Expand Down
2 changes: 1 addition & 1 deletion docs/dev_workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ First make sure your project's .uproject file is referencing the plugin. Then ma
You are in luck! We have `build_all_ue_projects.bat` which exactly does that. Don't treat it as black box (at least not yet), open it up and see what it does. It has 4 variables that are being set from command line args. If these args is not supplied they are set to default values in next set of statements. You might want to change default values for the paths. This batch file builds AirSim plugin, deploys it to all listed projects (see CALL statements later in the batch file), runs packaging for those projects and puts final binaries in specified folder - all in one step! This is what we use to create our own binary releases.

#### How do I contribute back to AirSim?
Before making any changes make sure you have created your feature branch. After you test your code changes in Blocks environment, follow the [usual steps](https://akrabat.com/the-beginners-guide-to-contributing-to-a-github-project/) to make contributions just like any 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/).
Before making any changes make sure you have created your feature branch. After you test your code changes in Blocks environment, follow the [usual steps](https://akrabat.com/the-beginners-guide-to-contributing-to-a-github-project/) to make contributions just like any other GitHub projects. Please use rebase and squash merge, for more information see [An introduction to Git merge and rebase: what they are, and how to use them](https://www.freecodecamp.org/news/an-introduction-to-git-merge-and-rebase-what-they-are-and-how-to-use-them-131b863785f/).



25 changes: 25 additions & 0 deletions docs/distance_sensor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## Distance Sensor

By default, Distance Sensor points to the front of the vehicle. It can be pointed in any direction by modifying the settings

Configurable Parameters -

Parameter | Description
--------------------|------------
X Y Z | Position of the sensor relative to the vehicle (in NED, in meters) (Default (0,0,0)-Multirotor, (0,0,-1)-Car)
Yaw Pitch Roll | Orientation of the sensor relative to the vehicle (degrees) (Default (0,0,0))
MinDistance | Minimum distance measured by distance sensor (metres, only used to fill Mavlink message for PX4) (Default 0.2m)
MaxDistance | Maximum distance measured by distance sensor (metres) (Default 40.0m)
ExternalController | Whether data is to be sent to external controller such as ArduPilot or PX4 if being used (default `true`)

For example, to make the sensor point towards the ground (for altitude measurement similar to barometer), the orientation can be modified as follows -

```json
"Distance": {
"SensorType": 5,
"Enabled" : true,
"Yaw": 0, "Pitch": -90, "Roll": 0
}
```

**Note:** For Cars, the sensor is placed 1 meter above the vehicle center by default. This is required since otherwise the sensor gives strange data due it being inside the vehicle. This doesn't affect the sensor values say when measuring the distance between 2 cars. See [`PythonClient/car/distance_sensor_multi.py`](https://github.com/Microsoft/AirSim/blob/master/PythonClient/car/distance_sensor_multi.py) for an example usage.
16 changes: 8 additions & 8 deletions docs/docker_ubuntu.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,27 +52,27 @@ You can download it by running
$ ./run_airsim_image_binary.sh Blocks/Blocks.sh -- headless
```

- [Specifying a `settings.json`](https://github.com/Microsoft/AirSim/blob/master/docs/docker_ubuntu.md#airsim_binary-docker-image)
- [Specifying a `settings.json`](docker_ubuntu.md#airsim_binary-docker-image)

## Source
#### Requirements:
- Install [nvidia-docker2](https://github.com/NVIDIA/nvidia-docker/wiki/Installation-(version-2.0))
- Install [ue4-docker](https://adamrehn.com/docs/ue4-docker/configuration/configuring-linux)
- Install [ue4-docker](https://docs.adamrehn.com/ue4-docker/configuration/configuring-linux)

#### Build Unreal Engine inside docker:
* To get access to Unreal Engine's source code, register on Epic Games' website and link it to your github account, as explained in the `Required Steps` section [here](https://docs.unrealengine.com/en-us/Platforms/Linux/BeginnerLinuxDeveloper/SettingUpAnUnrealWorkflow).
Note that you don't need to do `Step 2: Downloading UE4 on Linux`!

* Build unreal engine 4.19.2 docker image. We're going to use CUDA 10.0 in our example.
`$ ue4-docker build 4.19.2 --cuda=10.0 --no-full`
[optional] `$ ue4-docker clean` to free up some space. [Details here](https://adamrehn.com/docs/ue4-docker/commands/clean)
[optional] `$ ue4-docker clean` to free up some space. [Details here](https://docs.adamrehn.com/ue4-docker/commands/clean)
- `ue4-docker` supports all CUDA version listed on NVIDIA's cudagl dockerhub [here](https://hub.docker.com/r/nvidia/cudagl/).
- Please see [this page](https://adamrehn.com/docs/ue4-docker/building-images/advanced-build-options) for advanced configurations using `ue4-docker`
- Please see [this page](https://docs.adamrehn.com/ue4-docker/building-images/advanced-build-options) for advanced configurations using `ue4-docker`

* Disk space:
- The unreal images and containers can take up a lot of space, especially if you try more than one version.
- Here's a list of useful links to monitor space used by docker and clean up intermediate builds:
* [Large container images primer](https://adamrehn.com/docs/ue4-docker/read-these-first/large-container-images-primer)
* [Large container images primer](https://docs.adamrehn.com/ue4-docker/read-these-first/large-container-images-primer)
* [$ `docker system df`](https://docs.docker.com/engine/reference/commandline/system_df/)
[$ `docker container prune`](https://docs.docker.com/engine/reference/commandline/container_prune/)
[$ `docker image prune`](https://docs.docker.com/engine/reference/commandline/image_prune/)
Expand All @@ -81,7 +81,7 @@ $ ./run_airsim_image_binary.sh Blocks/Blocks.sh -- headless
#### Building AirSim inside UE4 docker container:
* Build AirSim docker image (which lays over the unreal image we just built)
Below are the default arguments.
`--base_image`: This is image over which we'll install airsim. We've tested on `adamrehn/ue4-engine:4.19.2-cudagl10.0`. See [ue4-docker](https://adamrehn.com/docs/ue4-docker/building-images/available-container-images) for other versions.
`--base_image`: This is image over which we'll install airsim. We've tested on `adamrehn/ue4-engine:4.19.2-cudagl10.0`. See [ue4-docker](https://docs.adamrehn.com/ue4-docker/building-images/available-container-images) for other versions.
`--target_image` is the desired name of your docker image.
Defaults to `airsim_source` with same tag as the base image

Expand All @@ -106,8 +106,8 @@ $ python build_airsim_image.py \
* Inside the container, you can see `UnrealEngine` and `AirSim` under `/home/ue4`.
* Start unreal engine inside the container:
`ue4@HOSTMACHINE:~$ /home/ue4/UnrealEngine/Engine/Binaries/Linux/UE4Editor`
* [Specifying an airsim settings.json](https://github.com/Microsoft/AirSim/blob/master/docs/docker_ubuntu.md#airsim_source-docker-image)
* Continue with [AirSim's Linux docs](https://microsoft.github.io/AirSim/docs/build_linux/#build-unreal-environment).
* See [Specifying an airsim settings.json](docker_ubuntu.md#airsim_source-docker-image) below.
* Continue with [AirSim's Linux docs](build_linux.md#build-unreal-environment).

#### [Misc] Packaging Unreal Environments in `airsim_source` containers
* Let's take the Blocks environment as an example.
Expand Down
Loading

0 comments on commit 8c5cbb0

Please sign in to comment.