Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to the readme #127

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions demo/case_study_1/readme.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
:star: Star us on GitHub — it helps!
# Using AirSim to Simulate Aircraft Inspection by Autonomous Drones

Regular maintenance of aircraft is critical to the safety of flights. However, due to the size of the aircraft, maintenance technicians are having trouble inspecting the top of the aircraft. Since 2017, Airbus has been using drones to help with the maintenance of aircraft. The use of drones allows maintenance technicians to collect a large number of pictures of the aircraft for safety analysis.
The regular maintenance of an aircraft is a critical and important safety measure for flying. However, due to the size of the aircraft, maintenance technicians have difficulty inspecting the top of the aircraft. Since 2017, Airbus has been using drones to aid with the maintenance of aircrafts. The drones allow maintenance technicians to collect several images of the aircraft, which can be used for safety analysis.

For Chinese Version 中文版说明:https://gaas.gitbook.io/guide/case-study/zai-airsim-zhong-mo-ni-wu-ren-ji-dui-ke-ji-xun-jian
For the Chinese Version 中文版说明:https://gaas.gitbook.io/guide/case-study/zai-airsim-zhong-mo-ni-wu-ren-ji-dui-ke-ji-xun-jian

Existing drones are not suitable for such task. First, it requires pilots to operate the drone. A minor deviation from the planned flight route could damage the aircraft. Also, for effective inspection, the pictures of aircraft parts must be taken at the same angle every time. A lot of pilots are not qualified or willing to operate drones under such risky and challenging scenario. Second, traditional drones rely on GPS, but indoor aircraft storage does not have GPS reception.
Existing drones are not suited for such a task. First, it requires a pilot to operate the drone. A minor deviation from the planned flight route could damage the aircraft. Also, for an effective inspection, the pictures of aircraft parts must be taken at the same angle every single time. Many pilots are not qualified or willing to operate drones under such risky and challenging circumstances. Secondly, while traditional drones rely on GPS, aircraft hangars block gps signals.

This case study shows how to use GAAS to control autonomous drones for aircraft inspection. This case study is based on a real project currently ongoing in the GAAS team. Minor details are changed for confidentiality purpose.
This case study shows how to use GAAS to control autonomous drones for aircraft inspection. It is based on a real, currently ongoing project with the GAAS team. Minor details are changed for confidentiality purposes.

<p align="center">
<img src="https://github.com/generalized-intelligence/GAAS/blob/master/demo/aircraft_inspection.gif?raw=true"/>

## What is AirSim?

[AirSim](https://github.com/microsoft/AirSim) is an open-source simulator for drones, cars and more, built on Unreal Engine and developed by Microsoft. Comparing to Gazebo, AirSim has a more realistic simulated environment. AirSim supports PX4 based Hardware-In-The-Loop (HITL) and Software-In-The-Loop (SITL)。
[AirSim](https://github.com/microsoft/AirSim) is an open-source simulator for drones, cars and more, built on Unreal Engine and developed by Microsoft. Compared to Gazebo, AirSim has a more realistic simulated environment. AirSim supports PX4 based Hardware-In-The-Loop (HITL) and Software-In-The-Loop (SITL)。

> Like all Unreal project, AirSim projects can be packaged. However, I do not recommend you to do so under Ubuntu. Using PX4 SITL in AirSim under Ubuntu can cause the program to crash. We are working on fixing related issues.
> Like all Unreal projects, AirSim projects can be packaged. However, I do not recommend you to do so under Ubuntu. Using PX4 SITL in AirSim under Ubuntu can cause the program to crash. We are working on fixing related issues.

> Also, Unreal needs around 69GB hard disk space with relatively high computational resources. If you do not want to install such a heavy software on your computer, you may choose to do the simulation in Gazebo. The configuration for Gazebo is way easier.

Expand Down Expand Up @@ -44,15 +44,15 @@ cd AirSim
./build.sh
```
## How to launch AirSim 
1. Under Linux environment, go to the Unreal directory and run `UnrealEngine/Engine/Binaries/Linux/UE4Editor`.
1. Under the Linux environment, go to the Unreal directory and run `UnrealEngine/Engine/Binaries/Linux/UE4Editor`.
2. Now you can see the simulator interface. Under the AirSim directory `Unreal/Environments`, there is a default project named `Blocks` . Copy `AirSim/Unreal/Enviroments/Plugins` to `AirSim/Unreal/Enviroments/Blocks` . Then open the project in Unreal.

![Blocks Project](https://s2.ax1x.com/2019/08/21/mUkyPP.png)

## How to launch PX4 SITL
Before using PX4 in AirSim, we should install and launch PX4 SITL. Through PX4 SITL, we may use PX4 as the flight control for drones in AirSim.

1. First, make sure that you have installed all dependencies required by PX4 as listed in the [GAAS Tutorial](https://gaas.gitbook.io/guide/).
1. First, make sure you have installed all dependencies required by PX4 as listed in the [GAAS Tutorial](https://gaas.gitbook.io/guide/).
2. Install PX4 Firmware. **Note**: AirSim requires Firmware v1.8.2.
```
bash
Expand Down Expand Up @@ -84,7 +84,7 @@ make posix_sitl_default none_iris
}
```

5. In Unreal, click the Play button. The simulation is launched. You should see a drone in the simulator.
5. In Unreal, click the Play button. The simulation will be launched. You should see a drone in the simulator.
> Press `F1` key to see a list of shortcuts. You may also open FPS to view FPS at any time.

![Play Blocks](https://s2.ax1x.com/2019/08/21/mUkTP0.png)
Expand Down Expand Up @@ -119,11 +119,11 @@ cd (GAAS_PATH)/demo/tutorial_1/1_px4_mavros_offboard_controller
python px4_mavros_run.py
```
## Set up the drone and the aircraft for the inspection
1. First, build the aircraft storage background. We recommend purchasing background materials from the [Unreal Marketplace](https://www.unrealengine.com/marketplace/zh-CN/item/09dd36e13fdf4b1592a4a09db2ec995c). Purchasing and download must be done on Epic Games on Windows. Then edit the background to your preference with the help of the [Unreal Documentation].(https://docs.unrealengine.com/en-US/index.html)。Due to IP restrictions, we cannot share our Project file with everyone. If you encountered problems with building the background, we welcome you to ask your questions at AirSim repo or Unreal Forum.
1. First, build the aircraft storage background. We recommend purchasing background materials from the [Unreal Marketplace](https://www.unrealengine.com/marketplace/zh-CN/item/09dd36e13fdf4b1592a4a09db2ec995c). Purchasing and download must be done with Epic Games on Windows. Then edit the background to your preference with the help of the [Unreal Documentation].(https://docs.unrealengine.com/en-US/index.html)。Due to IP restrictions, we cannot share our Project file with everyone. If you encountered problems with building the background, we welcome you to ask your questions at AirSim repo or Unreal Forum.

![Airplane Project](https://s2.ax1x.com/2019/08/21/mUESmQ.png)

2. For the drone to fly without GPS, let's turn off GPS altogether. First, in PX4 SITL iris, change the `vision position fusion` in `EKF2_AID_MASK` to `8`. Then, edit the `(Firmware_Path)/posix-configs/SITL/init/ekf2/iris` to change `EKF2_AID_MASK` from 1 to 8.
2. For the drone to fly without GPS, let's turn off GPS altogether. First, in PX4 SITL iris, change the `vision position fusion` in `EKF2_AID_MASK` to `8`. Then, edit the `(Firmware_Path)/posix-configs/SITL/init/ekf2/iris` to change `EKF2_AID_MASK` from 1 to 8.

![QGC](https://s2.ax1x.com/2019/08/21/mUEU7d.png)

Expand Down