### PX4 firmware installation
* navigate to the home directory
```bash
cd ~
```
* clone px4 firmware repository
```bash
git clone --recursive https://github.com/PX4/PX4-Autopilot.git
```
### Build Gazebo Simulation Examples
* navigate to the px4-autopilot directory
```bash
cd PX4-Autopilot
DONT_RUN=1 make px4_sitl_default gazebo
source ~/catkin_ws/devel/setup.bash # (optional)
source Tools/setup_gazebo.bash $(pwd) $(pwd)/build/px4_sitl_default
```
### Install QGroundControl software
* install gstreamer plugins
```bash
sudo usermod -a -G dialout $USER
sudo apt-get remove modemmanager -y
sudo apt install gstreamer1.0-plugins-bad gstreamer1.0-libav gstreamer1.0-gl -y
Logout and login again to enable the change to user permissions.
```
* Download [QGroundControl.AppImage](https://d176tv9ibo4jno.cloudfront.net/latest/QGroundControl.AppImage)
* Install (and run) using the terminal commands:
```bash
chmod +x ./QGroundControl.AppImage
./QGroundControl.AppImage #(or double click)
```
### Add UNO Quadcopter model to the px4 gazebo sitl models
1. Copy the uno_quadcopter directory from models to the PX4-Autopilot/Tools/sitl_gazebo/models (make symbolic link between directories to reflect changes made in this repository into the px4-autopilot directory)
```bash
ln -s ~/Octo_copter/src/uno_gazebo_sitl/models/uno_quadcopter ~/PX4-Autopilot/Tools/sitl_gazebo/models/
```
2. Copy the 31415_uno_quadcopter file ```to PX4_Autopilot/ROMFS/px4fmu_common/init.d-posix/airframes``` and ```PX4-Autopilot/build/px4_sitl_default/etc/init.d-posix/airframes```
```bash
ln -s ~/Octo_copter/src/uno_gazebo_sitl/models/uno_quadcopter/3141_uno_quadcopter ~/PX4-Autopilot/ROMFS/px4fmu_common/init.d-posix/airframes/
ln -s ~/Octo_copter/src/uno_gazebo_sitl/models/uno_quadcopter/3141_uno_quadcopter ~/PX4-Autopilot/build/px4_sitl_default/etc/init.d-posix/airframes/
```
3. Add the model ```uno_quadcopter``` to the file ```PX4_Autopilot/platforms/posix/cmake/sitl_target.cmake``` in the command ```set(models …)```
### Source the PX4 sitl setup script
```bash
source ~/Octo_copter/src/uno_gazebo_sitl/sitl_setup.bash
```