> For the complete documentation index, see [llms.txt](https://gi-ata.gitbook.io/ros-arducopter/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gi-ata.gitbook.io/ros-arducopter/user-manual.md).

# User Manual

Brief description about how to launch the main simulation nodes

Once all required dependencies and packages were installed the user is ready to test the dummy fly with the iris quad-rotor, which model is already loaded in the gazebo models. The demo flight is executed with the following lines in order:

1. Launch the gazebo simulation node

<pre class="language-bash" data-overflow="wrap" data-line-numbers><code class="lang-bash"><strong>cd catkin_ws
</strong><strong>source devel/setup.bash
</strong>roslaunch iq_sim runway.launch
</code></pre>

The demo environment looks like:

<figure><img src="https://2867039450-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJdPbzf92pXsjh7LrH1if%2Fuploads%2Fk9iEgtYCfhZAlYpmrbvR%2FScreenshot%20from%202023-11-30%2014-01-48.png?alt=media&amp;token=90911538-d638-4c8e-866f-3e2725a5e609" alt="" width="563"><figcaption><p>Gazebo environment for iris quadrotor</p></figcaption></figure>

2. Launch the arducopter communication protocol

{% code overflow="wrap" lineNumbers="true" %}

```bash
cd ~/ardupilot/ArduCopter/
sim_vehicle.py -v ArduCopter -f gazebo-iris --console
```

{% endcode %}

If the quad-rotor us successfully linked, you will see green messages as follows:

<figure><img src="https://2867039450-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJdPbzf92pXsjh7LrH1if%2Fuploads%2FMYSYQoiMVEhzNt3twWFl%2FScreenshot%20from%202023-11-30%2014-21-03.png?alt=media&amp;token=1b1d257c-96a5-4cac-b587-33a96fc77bbc" alt="" width="563"><figcaption><p>Successful communication</p></figcaption></figure>

3. Execute the QGroundControl App

{% code overflow="wrap" lineNumbers="true" %}

```bash
cd ~/path/to/QGroundControl
./QGroundControl.AppImage
```

{% endcode %}

The command will open the QGroundControl interface to prepare and plan the navigation.

<figure><img src="https://2867039450-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJdPbzf92pXsjh7LrH1if%2Fuploads%2FZLz2FDIQX5PmW2yRigGD%2FScreenshot%20from%202023-11-24%2010-23-07.png?alt=media&amp;token=47a082c6-e4fc-4c04-8ade-df6bf4ea607c" alt=""><figcaption><p>QGround Control app</p></figcaption></figure>

## Testing the quad-rotor

Is it possible to test all quad-rotor components like motors, sensors, etc. To this end, in QGroundControl clic on the **top-left Q icon** and select **Vehicle Setup.**

<figure><img src="https://2867039450-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJdPbzf92pXsjh7LrH1if%2Fuploads%2F3lDqKTlPaXPAHpx6b6g6%2FScreenshot%20from%202023-11-30%2014-53-47.png?alt=media&amp;token=b8987141-6746-45a9-8cba-c2733bb3b19f" alt=""><figcaption><p>Vehicle setup</p></figcaption></figure>

Afterwards you will all testing options, for instance, we can test each motor by clicing the "Motors" option. The app allows testing each individual motor, and as in real life, the propellers will move in the gazebo simulation as well.

<figure><img src="https://2867039450-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJdPbzf92pXsjh7LrH1if%2Fuploads%2F9Zm8Cx6rsL68kuQAvKiX%2FScreenshot%20from%202023-11-24%2010-26-59.png?alt=media&amp;token=f7aec9ec-d813-4c68-bd09-7582a8cb5dff" alt=""><figcaption></figcaption></figure>

## Create a flight plan

By clicking in the **Plan** option in the top-left side we can edit the navigation route.

<figure><img src="https://2867039450-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJdPbzf92pXsjh7LrH1if%2Fuploads%2FBiM8S8OMgNHKhxAZPCrp%2FScreenshot%20from%202023-11-30%2015-00-50.png?alt=media&amp;token=5f328571-ef74-4dae-981c-ea28be0aaa1f" alt=""><figcaption><p>Planning mode</p></figcaption></figure>

The first point we must set is the **take off,** were we set the attitude for all the trajectory. Afterwards we will be able to set the waypoints to trace the quad-rotor trajectory.

<figure><img src="https://2867039450-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJdPbzf92pXsjh7LrH1if%2Fuploads%2F0XP4TvW3OMtxZJXFWCML%2FScreenshot%20from%202023-11-30%2015-01-27.png?alt=media&amp;token=2f892faf-4095-4bb3-8bad-906c5bbfd8b6" alt=""><figcaption><p>Waypoints creation</p></figcaption></figure>

The final waypoint can be configured as a **landing** or r**eturn to the initial position**  by clicking the downside arrow next to the Waypoint indicator in the right side.

<figure><img src="https://2867039450-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJdPbzf92pXsjh7LrH1if%2Fuploads%2F79lcXEUmAJdVXQp3YF1s%2FScreenshot%20from%202023-11-30%2015-01-51.png?alt=media&amp;token=c3d6c0e5-f618-47f7-a9af-de10901b560a" alt=""><figcaption><p>Final action</p></figcaption></figure>

Furthermore, we should return to the main window and arm the quad-rotor by clicking the **Ready to flight** option and pressing arm.

<figure><img src="https://2867039450-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJdPbzf92pXsjh7LrH1if%2Fuploads%2FHdktVBIjBBr2lCnUgbgy%2FScreenshot%20from%202023-11-30%2015-02-51.png?alt=media&amp;token=065d0be2-4485-4c2c-a4a1-a8603ac4551e" alt=""><figcaption><p>Arm the quadrotor</p></figcaption></figure>

The arm confirmation should be done in the slide that appear in the bottom section. Now the quad-rotor is ready to flight, so we can select the **take off** option and confirming the slider.

<figure><img src="https://2867039450-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJdPbzf92pXsjh7LrH1if%2Fuploads%2F29T6CZYYJTaWGoqGAxBe%2FScreenshot%20from%202023-11-30%2015-03-17.png?alt=media&amp;token=901c7a12-94f9-4d56-a773-4b9c201901d8" alt=""><figcaption><p>Take off</p></figcaption></figure>

The quad-rotor will follow that planned path and we can see it in QGroundControl in 2D and in Gazebo in 3D

{% embed url="<https://youtu.be/MFoilJ2hbqs>" %}

##

***

## Fast execution via bash file

The above mentioned packages could be executed at once by using a bash file. The script could be downloaded below, and adjusted to your needs.

{% file src="/files/iD845g7IBoOCxpNFzbUL" %}

In this file we first should set the **workspace\_path** , **arducopter\_path** and **QGcontrol\_path** according to our configuration.&#x20;

Bash file execution:

{% code overflow="wrap" lineNumbers="true" %}

```bash
cd /path/to/launch_simulation/
chmod +x launch_simulation.sh
./launch_simulation.sh
```

{% endcode %}

***

## Visualize Flight Logs

Ardupilot as an open source tool provides a log viewer to visualize all logging data captured by QGroundControl. The log viewer can be found in the next link.

{% embed url="<https://plot.ardupilot.org/#/>" %}
Ardupilot log viewer
{% endembed %}

The log data can be downloaded from QGroundControl by clicking in the top left Q icon and selecting **Analyze Tools.**

<figure><img src="https://2867039450-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJdPbzf92pXsjh7LrH1if%2Fuploads%2FL52A13zNmo7MX7pnd2KW%2FScreenshot%20from%202023-12-01%2010-33-08.png?alt=media&amp;token=d1c42165-1185-49af-a25b-bf7650c30c72" alt=""><figcaption><p>Downloading log file</p></figcaption></figure>

Once we have the flight log we are able to load and visualize all parameters in ardupilot.org, like the 3D trajectory

<figure><img src="https://2867039450-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJdPbzf92pXsjh7LrH1if%2Fuploads%2F34Dkt0ouBLiTP7Gi5vZa%2FScreenshot%20from%202023-12-01%2014-55-59.png?alt=media&amp;token=15e95076-6d51-4a43-b9f8-c866cd5d1b62" alt=""><figcaption><p>UAV log viewer</p></figcaption></figure>

Plot the GPS position, latitude and longitude

<figure><img src="https://2867039450-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJdPbzf92pXsjh7LrH1if%2Fuploads%2FQh2oOs5gjo8F4w8INpa9%2FScreenshot%20from%202023-12-01%2015-00-32.png?alt=media&amp;token=d2290cfe-5755-4026-b2c7-0aba21590b59" alt=""><figcaption><p>Position plot</p></figcaption></figure>

IMU measurements

<figure><img src="https://2867039450-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJdPbzf92pXsjh7LrH1if%2Fuploads%2FEpN8RP6xMUMIyllwZp7U%2FScreenshot%20from%202023-12-01%2015-14-01.png?alt=media&amp;token=28a67287-0ec4-42ca-929f-fb3154c4f29c" alt=""><figcaption></figcaption></figure>

Attitude among other parameters

<figure><img src="https://2867039450-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJdPbzf92pXsjh7LrH1if%2Fuploads%2F3GA2uDvcNyf96PDymhpX%2FScreenshot%20from%202023-12-01%2015-18-21.png?alt=media&amp;token=b47ee58b-22a1-45ab-a741-fc909d85ca0a" alt=""><figcaption></figcaption></figure>
