From 6b0f4b74368da9deafdb78971208982c5e74d4bc Mon Sep 17 00:00:00 2001
From: madratman When using an Azure Trial account, the default vCPU quota may not be enough to allocate the required VM to run AirSim. If that's the case, you will see an error when trying to create the VM and will have to make a support request to increase the default quota. To avoid charges for the Virtual Machine usage while not in use, remember to deallocate its resources from the Azure Portal or use the following command from the Azure CLI:
- To avoid charges for the Virtual Machine usage while not in use, remember to deallocate its resources from the Azure Portal or use the following command from the Azure CLI: Below are the default arguments. Regarding the deployment of th
bash
- az vm deallocate --resource-group MyResourceGroup --name MyVMName
+
az vm deallocate --resource-group MyResourceGroup --name MyVMName
+
Code and debug from Visual Studio Code and Remote SSH#
@@ -298,52 +304,58 @@ Requirements:
Build the docker image#
-
+
--base_image
: This is image over which we'll install airsim. We've tested on Ubuntu 18.04 with CUDA 10.0.
You can specify any NVIDIA cudagl at your own risk.
--target_image
is the desired name of your docker image.
- Defaults to airsim_binary
with same tag as the base image
- $ cd Airsim/docker;
- $ python build_airsim_image.py \
- --base_image=nvidia/cudagl:10.0-devel-ubuntu18.04 \
- --target_image=airsim_binary:10.0-devel-ubuntu18.04
Verify you have an image by:
- $ docker images | grep airsim
airsim_binary
with same tag as the base image
+
+$ cd Airsim/docker;
+$ python build_airsim_image.py \
+ --base_image=nvidia/cudagl:10.0-devel-ubuntu18.04 \
+ --target_image=airsim_binary:10.0-devel-ubuntu18.04
+
+
+$ docker images | grep airsim
Get an unreal binary or package your own project in Ubuntu.
+
$ cd Airsim/docker;
- $ ./download_blocks_env_binary.sh
-Running an unreal binary inside a docker container
- The syntax is:
- $ ./run_airsim_image_binary.sh DOCKER_IMAGE_NAME UNREAL_BINARY_SHELL_SCRIPT UNREAL_BINARY_ARGUMENTS -- headless
- For blocks, you can do a $ ./run_airsim_image_binary.sh airsim_binary:10.0-devel-ubuntu18.04 Blocks/Blocks.sh -windowed -ResX=1080 -ResY=720
DOCKER_IMAGE_NAME
: Same as target_image
parameter in previous step. By default, enter airsim_binary:10.0-devel-ubuntu18.04
$ cd Airsim/docker;
+ $ ./download_blocks_env_binary.sh
+
+
+ $ ./run_airsim_image_binary.sh DOCKER_IMAGE_NAME UNREAL_BINARY_SHELL_SCRIPT UNREAL_BINARY_ARGUMENTS -- headless
+
+
+For blocks, you can do a $ ./run_airsim_image_binary.sh airsim_binary:10.0-devel-ubuntu18.04 Blocks/Blocks.sh -windowed -ResX=1080 -ResY=720
DOCKER_IMAGE_NAME
: Same as target_image
parameter in previous step. By default, enter airsim_binary:10.0-devel-ubuntu18.04
UNREAL_BINARY_SHELL_SCRIPT
: for Blocks enviroment, it will be Blocks/Blocks.sh
UNREAL_BINARY_ARGUMENTS
:
For airsim, most relevant would be -windowed
, -ResX
, -ResY
. Click on link to see all options.
Running in Headless mode:
+ Suffix -- headless
at the end:
$ ./run_airsim_image_binary.sh Blocks/Blocks.sh -- headless
+
+
-- headless
at the end:
- $ ./run_airsim_image_binary.sh Blocks/Blocks.sh -- headless
settings.json
--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 for other versions. --target_image
is the desired name of your docker image. airsim_source
with same tag as the base image
- $ cd Airsim/docker;
- $ python build_airsim_image.py \
- --source \
- ----base_image adamrehn/ue4-engine:4.19.2-cudagl10.0 \
- --target_image=airsim_source:4.19.2-cudagl10.0
+ Defaults to airsim_source
with same tag as the base image
$ cd Airsim/docker;
+$ python build_airsim_image.py \
+ --source \
+ ----base_image adamrehn/ue4-engine:4.19.2-cudagl10.0 \
+ --target_image=airsim_source:4.19.2-cudagl10.0
+
+
Run the airsim source image we built by:
- ./run_airsim_image_source.sh airsim_source:4.19.2-cudagl10.0
- Syntax is ./run_airsim_image_source.sh DOCKER_IMAGE_NAME -- headless
+
./run_airsim_image_source.sh airsim_source:4.19.2-cudagl10.0
+
+
+Syntax is ./run_airsim_image_source.sh DOCKER_IMAGE_NAME -- headless
-- headless
: suffix this to run in optional headless mode.
Inside the container, you can see UnrealEngine
and AirSim
under /home/ue4
.
UnrealEngine
and AirSim
under /home/ue4
. ue4@HOSTMACHINE:~$ /home/ue4/UnrealEngine/Engine/Binaries/Linux/UE4Editor
airsim_source
containers#Let's take the Blocks environment as an example.
- In the following script, specify the full path to your unreal uproject file by project
and the directory where you want the binaries to be placed by archivedirectory
- $ /home/ue4/UnrealEngine/Engine/Build/BatchFiles/RunUAT.sh BuildCookRun -platform=Linux -clientconfig=Shipping -serverconfig=Shipping -noP4 -cook -allmaps -build -stage -prereqs -pak -archive \
- -archivedirectory=/home/ue4/Binaries/Blocks/ \
- -project=/home/ue4/AirSim/Unreal/Environments/Blocks/Blocks.uproject
This would create a Blocks binary in /home/ue4/Binaries/Blocks/
.
-You can test it by running /home/ue4/Binaries/Blocks/LinuxNoEditor/Blocks.sh -windowed
project
and the directory where you want the binaries to be placed by archivedirectory
$ /home/ue4/UnrealEngine/Engine/Build/BatchFiles/RunUAT.sh BuildCookRun -platform=Linux -clientconfig=Shipping -serverconfig=Shipping -noP4 -cook -allmaps -build -stage -prereqs -pak -archive \
+-archivedirectory=/home/ue4/Binaries/Blocks/ \
+-project=/home/ue4/AirSim/Unreal/Environments/Blocks/Blocks.uproject
+
+
+This would create a Blocks binary in `/home/ue4/Binaries/Blocks/`.
+You can test it by running `/home/ue4/Binaries/Blocks/LinuxNoEditor/Blocks.sh -windowed`
+
#### airsim_binary
docker image:
- - We're mapping the host machine's PATH/TO/Airsim/docker/settings.json
to the docker container's /home/airsim_user/Documents/AirSim/settings.json
.
- - Hence, we can load any settings file by simply modifying PATH_TO_YOUR/settings.json
by modifying the following snippets in * run_airsim_image_binary.sh
- nvidia-docker run -it \
- -v $PATH_TO_YOUR/settings.json:/home/airsim_user/Documents/AirSim/settings.json \
- -v $UNREAL_BINARY_PATH:$UNREAL_BINARY_PATH \
- -e SDL_VIDEODRIVER=$SDL_VIDEODRIVER_VALUE \
- -e SDL_HINT_CUDA_DEVICE='0' \
- --net=host \
- --env="DISPLAY=$DISPLAY" \
- --env="QT_X11_NO_MITSHM=1" \
- --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
- -env="XAUTHORITY=$XAUTH" \
- --volume="$XAUTH:$XAUTH" \
- --runtime=nvidia \
- --rm \
- $DOCKER_IMAGE_NAME \
- /bin/bash -c "$UNREAL_BINARY_COMMAND"
- #### airsim_source
docker image:
airsim_binary
docker image:#PATH/TO/Airsim/docker/settings.json
to the docker container's /home/airsim_user/Documents/AirSim/settings.json
. PATH_TO_YOUR/settings.json
by modifying the following snippets in * run_airsim_image_binary.sh
nvidia-docker run -it \
+ -v $PATH_TO_YOUR/settings.json:/home/airsim_user/Documents/AirSim/settings.json \
+ -v $UNREAL_BINARY_PATH:$UNREAL_BINARY_PATH \
+ -e SDL_VIDEODRIVER=$SDL_VIDEODRIVER_VALUE \
+ -e SDL_HINT_CUDA_DEVICE='0' \
+ --net=host \
+ --env="DISPLAY=$DISPLAY" \
+ --env="QT_X11_NO_MITSHM=1" \
+ --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
+ -env="XAUTHORITY=$XAUTH" \
+ --volume="$XAUTH:$XAUTH" \
+ --runtime=nvidia \
+ --rm \
+ $DOCKER_IMAGE_NAME \
+ /bin/bash -c "$UNREAL_BINARY_COMMAND"
+
+
+airsim_source
docker image:#PATH/TO/Airsim/docker/settings.json
to the docker container's /home/airsim_user/Documents/AirSim/settings.json
. PATH_TO_YOUR/settings.json
by modifying the following snippets in run_airsim_image_source.sh
:
- nvidia-docker run -it \
- -v $(pwd)/settings.json:/home/airsim_user/Documents/AirSim/settings.json \
- -e SDL_VIDEODRIVER=$SDL_VIDEODRIVER_VALUE \
- -e SDL_HINT_CUDA_DEVICE='0' \
- --net=host \
- --env="DISPLAY=$DISPLAY" \
- --env="QT_X11_NO_MITSHM=1" \
- --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
- -env="XAUTHORITY=$XAUTH" \
- --volume="$XAUTH:$XAUTH" \
- --runtime=nvidia \
- --rm \
- $DOCKER_IMAGE_NAME
PATH_TO_YOUR/settings.json
by modifying the following snippets in run_airsim_image_source.sh
: nvidia-docker run -it \
+ -v $(pwd)/settings.json:/home/airsim_user/Documents/AirSim/settings.json \
+ -e SDL_VIDEODRIVER=$SDL_VIDEODRIVER_VALUE \
+ -e SDL_HINT_CUDA_DEVICE='0' \
+ --net=host \
+ --env="DISPLAY=$DISPLAY" \
+ --env="QT_X11_NO_MITSHM=1" \
+ --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
+ -env="XAUTHORITY=$XAUTH" \
+ --volume="$XAUTH:$XAUTH" \
+ --runtime=nvidia \
+ --rm \
+ $DOCKER_IMAGE_NAME
+
diff --git a/lidar/index.html b/lidar/index.html
index 8296030e19..f39c339548 100644
--- a/lidar/index.html
+++ b/lidar/index.html
@@ -416,8 +416,10 @@ If a vehicle provides its sensor list, it must provide the whole list. Selective add/remove/update of the default sensor list is NOT supported. A vehicle specific sensor list can be specified in the vehicle settings part of the json. e.g.,
- "Vehicles": {
+"Vehicles": {
- "Drone1": {
- "VehicleType": "SimpleFlight",
- "AutoCreate": true,
- ...
- "Sensors": {
- "MyLidar1": {
- "SensorType": 6,
- "Enabled" : true,
- "NumberOfChannels": 16,
- "PointsPerSecond": 10000,
- "X": 0, "Y": 0, "Z": -1,
- "DrawDebugPoints": true
- },
- "MyLidar2": {
- "SensorType": 6,
- "Enabled" : true,
- "NumberOfChannels": 4,
- "PointsPerSecond": 10000,
- "X": 0, "Y": 0, "Z": -1,
- "DrawDebugPoints": true
- }
+ "Drone1": {
+ "VehicleType": "SimpleFlight",
+ "AutoCreate": true,
+ ...
+ "Sensors": {
+ "MyLidar1": {
+ "SensorType": 6,
+ "Enabled" : true,
+ "NumberOfChannels": 16,
+ "PointsPerSecond": 10000,
+ "X": 0, "Y": 0, "Z": -1,
+ "DrawDebugPoints": true
+ },
+ "MyLidar2": {
+ "SensorType": 6,
+ "Enabled" : true,
+ "NumberOfChannels": 4,
+ "PointsPerSecond": 10000,
+ "X": 0, "Y": 0, "Z": -1,
+ "DrawDebugPoints": true
}
}
- }
+ }
+}
Sensor specific settings#
@@ -435,57 +449,43 @@ Server side visualization for d
Sensor APIs#
Jump straight to hello_drone.py
or hello_drone.cpp
for example usage, or see follow below for the full API.
-
--
-
Barometer
-C++
-cpp
-msr::airlib::BarometerBase::Output getBarometerData(const std::string& barometer_name, const std::string& vehicle_name);
-Python
-python
-barometer_data = client.getBarometerData(barometer_name = "", vehicle_name = "")
-
--
-
IMU
-C++
-cpp
-msr::airlib::ImuBase::Output getImuData(const std::string& imu_name = "", const std::string& vehicle_name = "");
-Python
-python
-imu_data = client.getImuData(imu_name = "", vehicle_name = "")
-
--
-
GPS
-C++
-cpp
-msr::airlib::GpsBase::Output getGpsData(const std::string& gps_name = "", const std::string& vehicle_name = "");
-Python
-python
-gps_data = client.getGpsData(gps_name = "", vehicle_name = "")
-
--
-
Magnetometer
-C++
-cpp
-msr::airlib::MagnetometerBase::Output getMagnetometerData(const std::string& magnetometer_name = "", const std::string& vehicle_name = "");
-Python
-python
-magnetometer_data = client.getMagnetometerData(magnetometer_name = "", vehicle_name = "")
-
--
-
Distance sensor
-C++
-cpp
-msr::airlib::DistanceSensorData getDistanceSensorData(const std::string& distance_sensor_name = "", const std::string& vehicle_name = "");
-Python
-python
-distance_sensor_data = client.getDistanceSensorData(distance_sensor_name = "", vehicle_name = "")
-
--
-
Lidar
- See lidar for Lidar API.
-
-
+Barometer#
+msr::airlib::BarometerBase::Output getBarometerData(const std::string& barometer_name, const std::string& vehicle_name);
+
+
+barometer_data = client.getBarometerData(barometer_name = "", vehicle_name = "")
+
+
+IMU#
+msr::airlib::ImuBase::Output getImuData(const std::string& imu_name = "", const std::string& vehicle_name = "");
+
+
+imu_data = client.getImuData(imu_name = "", vehicle_name = "")
+
+
+GPS#
+msr::airlib::GpsBase::Output getGpsData(const std::string& gps_name = "", const std::string& vehicle_name = "");
+
+
+gps_data = client.getGpsData(gps_name = "", vehicle_name = "")
+
+
+Magnetometer#
+msr::airlib::MagnetometerBase::Output getMagnetometerData(const std::string& magnetometer_name = "", const std::string& vehicle_name = "");
+
+
+magnetometer_data = client.getMagnetometerData(magnetometer_name = "", vehicle_name = "")
+
+
+Distance sensor#
+msr::airlib::DistanceSensorData getDistanceSensorData(const std::string& distance_sensor_name = "", const std::string& vehicle_name = "");
+
+
+distance_sensor_data = client.getDistanceSensorData(distance_sensor_name = "", vehicle_name = "")
+
+
+Lidar#
+See the lidar page for Lidar API.
diff --git a/sitemap.xml.gz b/sitemap.xml.gz
index 3358b5696265d5e7e6e8ba045281322ac82cbedc..01597cfa37d5d7c841aeee6713959f5c304141de 100644
GIT binary patch
delta 14
VcmaFN_?VGRzMF$X#&{yzT>v3F1WW(`
delta 14
VcmaFN_?VGRzMF&NoAyMuy8tC!1s(tZ
diff --git a/unreal_custenv/index.html b/unreal_custenv/index.html
index 5b89fd2d8d..492b6e4f95 100644
--- a/unreal_custenv/index.html
+++ b/unreal_custenv/index.html
@@ -313,7 +313,7 @@ Step by Step Instructions{
"FileVersion": 3,
"EngineAssociation": "4.24",
"Category": "Samples",
@@ -391,17 +391,20 @@ I already have my own Unreal project. How do I use AirSim with it?#
Copy the Unreal\Plugins
folder from the build you did in the above section into the root of your Unreal project's folder. In your Unreal project's .uproject file, add the key AdditionalDependencies
to the "Modules" object
-as we showed in the LandscapeMountains.uproject
above.
- "AdditionalDependencies": [
- "AirSim"
-]
-and the Plugins
section to the top level object:
- "Plugins": [
- {
- "Name": "AirSim",
- "Enabled": true
- }
- ]
+as we showed in the LandscapeMountains.uproject
above.
+"AdditionalDependencies": [
+ "AirSim"
+]
+
+
+and the Plugins
section to the top level object:
+"Plugins": [
+ {
+ "Name": "AirSim",
+ "Enabled": true
+ }
+]
+