> For the complete documentation index, see [llms.txt](https://davids-tutorials.gitbook.io/robotics/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://davids-tutorials.gitbook.io/robotics/running-gazebo-with-ardupilot-sitl-and-qgroundcontrol.md).

# Running Gazebo with ArduPilot SITL & qGroundControl

Pre-req: [Virtual Machine](/robotics/virtual-machines-virtual-box.md), [Gazebo Garden](/robotics/gazebo-garden.md), [ArduPilot](/robotics/ardupilot-and-sitl.md)

### Open first terminal (Ctrl + Alt + T) for Gazebo

```
export GZ_SIM_RESOURCE_PATH=$HOME/gz_ws/src/ardupilot_gazebo/models:$HOME/gz_ws/src/ardupilot_gazebo/worlds:$GZ_SIM_RESOURCE_PATH
```

```
export GZ_SIM_SYSTEM_PLUGIN_PATH=$HOME/gz_ws/src/ardupilot_gazebo/build:$GZ_SIM_SYSTEM_PLUGIN_PATH
```

```
gz sim -r iris_runway.sdf
```

> Note: this takes up alot of RAM and slows my computer

### Open second terminal (Ctrl + Alt + T) for ArduPilot

```
sim_vehicle.py -v ArduCopter -f gazebo-iris --model JSON --map --console
```

> wait for pop ups to show and for command line to say one of the following:<br>
>
> MAV>
>
> STABLIZE>

> (Optional) in second terminal, type the following:

```
mode guided
```

```
arm throttle
```

```
takeoff 10
```

```
mode LAND
```

### Open third terminal (Ctrl + Alt + T) for qGroundControl

> wait for connections to establish

```
./QGroundControl.AppImage
```
