|
| 1 | +.. _project_tello: |
| 2 | + |
| 3 | +===================== |
| 4 | +Simple Tello Example |
| 5 | +===================== |
| 6 | + |
| 7 | +To install this project, clone the repository: |
| 8 | + |
| 9 | +.. code-block:: bash |
| 10 | +
|
| 11 | + git clone https://github.com/aerostack2/project_tello |
| 12 | +
|
| 13 | +To start using this project, please go to the root folder of the project. |
| 14 | + |
| 15 | + |
| 16 | +.. _project_tello_launching: |
| 17 | + |
| 18 | +--------- |
| 19 | +Launching |
| 20 | +--------- |
| 21 | + |
| 22 | +The execution on the project is split into two parts: Aerostack2 components and ground station. |
| 23 | + |
| 24 | +Launching Aerostack2 |
| 25 | +==================== |
| 26 | + |
| 27 | +To launch the Aerostack2 components, execute the following command: |
| 28 | + |
| 29 | +.. code-block:: bash |
| 30 | +
|
| 31 | + ./launch_as2.bash |
| 32 | +
|
| 33 | +
|
| 34 | +This will open a tmux session with an Aerostack2 instance for each drone launched. |
| 35 | + |
| 36 | +Launcher offers a few options to customize the execution. ``./launch_as2.bash -h`` will show option list. Options can be set with the following flags: |
| 37 | + |
| 38 | +- ``-n``: select drones namespace to launch, values are comma separated. By default, it launches all drones from world description file. |
| 39 | +- ``-g``: launch using gnome-terminal. By default not set, uses tmux. |
| 40 | + |
| 41 | +Launching Ground Station |
| 42 | +======================== |
| 43 | + |
| 44 | +To launch the ground station, execute the following command: |
| 45 | + |
| 46 | +.. code-block:: bash |
| 47 | +
|
| 48 | + ./launch_ground_station.bash |
| 49 | +
|
| 50 | +Launcher offers a different pool of options to customize the execution. ``./launch_ground_station.bash -h`` will show option list. Options can be set with the following flags: |
| 51 | + |
| 52 | +- ``-m``: disable launch mocap4ros2. By default set. |
| 53 | +- ``-t``: launch keyboard teleoperation. By default not set. |
| 54 | +- ``-v``: launch rviz. By default not set. |
| 55 | +- ``-r``: record rosbag. By default not set. |
| 56 | +- ``-n``: select drones namespace to launch, values are comma separated. By default, it launches all drones from world description file. |
| 57 | +- ``-g``: launch using gnome-terminal. By default not set, uses tmux. |
| 58 | + |
| 59 | +Closing |
| 60 | +======= |
| 61 | + |
| 62 | +Close all nodes (aerostack2 and ground_station) with the following command: |
| 63 | + |
| 64 | +.. code-block:: bash |
| 65 | +
|
| 66 | + ./stop_tmuxinator.bash |
| 67 | +
|
| 68 | +.. note:: |
| 69 | + |
| 70 | + The command ``tmux kill-server`` will have a similar effect but closing all tmux sessions, so be careful if you have other tmux sessions running. |
| 71 | + |
| 72 | + If launcher was executed with the flag ``-g``, closing should be done manually exiting all gnome-terminal tabs. |
| 73 | + |
| 74 | +Close **only** the Aerostack2 nodes with the following command: |
| 75 | + |
| 76 | +.. code-block:: bash |
| 77 | +
|
| 78 | + ./stop_tmuxinator_as2.bash |
| 79 | +
|
| 80 | +Close **only** the ground station nodes with the following command: |
| 81 | + |
| 82 | +.. code-block:: bash |
| 83 | +
|
| 84 | + ./stop_tmuxinator_ground_station.bash |
| 85 | +
|
| 86 | +
|
| 87 | +.. _project_tello_mission: |
| 88 | + |
| 89 | +----------------- |
| 90 | +Mission execution |
| 91 | +----------------- |
| 92 | + |
| 93 | +The project offers a few examples of mission execution. |
| 94 | + |
| 95 | +- **Keyboard Teleoperation control**: Using reactive teleoperation control. For both single and multiagent swarms. |
| 96 | +- **Python API missions**: Using Aerostack2 python API for mission definition. For single drone, using GPS and multiple drones. |
| 97 | +- **Behavior Tree missions**: Using Behavior Tree as the mission planner. For single drone only. |
| 98 | +- **Mission Interpreter**: Using Aerostack2 mission interpreter. For single drone only. |
| 99 | + |
| 100 | + |
| 101 | +.. _project_tello_keyboard_teleoperation: |
| 102 | + |
| 103 | +Keyboard Teleoperation control |
| 104 | +============================== |
| 105 | + |
| 106 | +In order to launch the components for a **single drone**, Aerostack2 launcher does not need any additional flags. Just execute ``./launch_as2.bash``. |
| 107 | + |
| 108 | +Ground station should be launched with ``-t`` flag to enable keyboard teleoperation. Take a look at the :ref:`keyboard teleoperation user guide <user_interfaces_keyboard_teleoperation>` for more information. |
| 109 | +A window containing the teleoperation widget should pop up: |
| 110 | + |
| 111 | +.. figure:: images/keyboard_teleop_view.png |
| 112 | + :scale: 50 |
| 113 | + :class: with-shadow |
| 114 | + |
| 115 | + Keyboard teleoperation |
| 116 | + |
| 117 | + |
| 118 | +.. _project_tello_python_api: |
| 119 | + |
| 120 | +Python API missions |
| 121 | +=================== |
| 122 | + |
| 123 | +In order to launch the components for **multiple drones**, both launchers require the flag ``-n`` indicating drone namespaces to use. |
| 124 | + |
| 125 | +There are three python scripts available for mission execution in the project. For single drone missions, use ``python3 mission.py`` for flying a square. |
| 126 | + |
| 127 | +For multi drone missions, use ``python3 mission_swarm.py`` where a group of drones will fly a swarm coreography. Here it is what the execution looks like: |
| 128 | + |
| 129 | +.. raw:: html |
| 130 | + |
| 131 | + <div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; height: auto;"> |
| 132 | + <iframe src="https://www.youtube.com/embed/BlF6rU9R8Nk" frameborder="0" allowfullscreen style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></iframe> |
| 133 | + </div> |
| 134 | + |
| 135 | +.. note:: |
| 136 | + |
| 137 | + To understand how missions are built using the Aerostack2 python API, take a look at the :ref:`development_guide_api_python_api` reference guide. |
| 138 | + |
| 139 | + |
| 140 | +.. _project_tello_mission_interpreter: |
| 141 | + |
| 142 | +Mission Interpreter |
| 143 | +=================== |
| 144 | + |
| 145 | +Previous missions were defined using python syntaxis. Aerostask2 offers a mission interpreter that allows mission definition using a JSON format. |
| 146 | +Currently, the mission interpreter script at the project is only available for single drone missions. |
| 147 | +To launch the mission interpreter, execute ``python3 mission_interpreter.py``. |
| 148 | +The execution is similar to the python API mission where the drone will fly a square. |
| 149 | + |
| 150 | + |
| 151 | +.. _project_tello_behavior_tree: |
| 152 | + |
| 153 | +Behavior Tree |
| 154 | +============= |
| 155 | + |
| 156 | +Missions can also be defined using a behavior tree. The project offers a mission example using a behavior tree for a single drone. |
| 157 | +To launch the behavior tree mission, execute ``python3 mission_behavior_tree.py``. |
| 158 | +The execution is similar to the python API mission where the drone will fly a square. |
| 159 | + |
| 160 | +.. note:: |
| 161 | + |
| 162 | + Trees can be defined using GUIs like :ref:`Groot <https://www.behaviortree.dev/groot/>`. |
0 commit comments