|
| 1 | +.. _inspection_testbeds: |
| 2 | + |
| 3 | +TB2: Inspection Testbed |
| 4 | +************** |
| 5 | + |
| 6 | +The objective of this testbed is to validate the CoreSense architecture with a Drone Swarm Autonomous Inspection. In this guide we present a configurable simulation environment that will be used for validate in simulation the architecture developed in this project. |
| 7 | + |
| 8 | +In this testbed we leverage on the `Aerostack2 <https://github.com/aerostack2/aerostack2>`_ framework, a ROS 2 based framework for the development of autonomous aerial systems. |
| 9 | + |
| 10 | +--------- |
| 11 | +Setup |
| 12 | +--------- |
| 13 | + |
| 14 | +Aerostack2 Installation |
| 15 | +======================= |
| 16 | + |
| 17 | +Follow the instructions in `Aerostack2 Getting Started <https://aerostack2.github.io/_00_getting_started/index.html>`_. |
| 18 | + |
| 19 | +An additional ROS2 package shall be installed for this project: |
| 20 | + |
| 21 | +.. attention:: We encourage users to use the github ssh keys for cloning the repo. More information can be found at `github ssh docs <https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-ssh-urls>`_ |
| 22 | + |
| 23 | +.. code-block:: bash |
| 24 | +
|
| 25 | + mkdir ~/aerostack2_ws/src -p # avoid if aerostack2 has been installed from source |
| 26 | + cd ~/aerostack2_ws/src |
| 27 | + git clone [email protected]:CoreSenseEU/TB2_Panel_Inspection_Simulation.git |
| 28 | + cd .. |
| 29 | + rosdep install -y -r -q --from-paths src --ignore-src |
| 30 | + colcon build --symlink-install |
| 31 | +
|
| 32 | +
|
| 33 | +
|
| 34 | +AS2 project requirements |
| 35 | +======================= |
| 36 | + |
| 37 | +Additionally install the project execution dependencies, in `Aerostack2 project prerequisites <https://aerostack2.github.io/_02_examples/index.html#prerequisites>`_. |
| 38 | + |
| 39 | +Inspection Testbed project |
| 40 | +========================== |
| 41 | + |
| 42 | + |
| 43 | +First clone the project repo with: |
| 44 | + |
| 45 | +.. code-block:: bash |
| 46 | +
|
| 47 | + git clone [email protected]:CoreSenseEU/TB2_Panel_Inspection_Simulation.git |
| 48 | +
|
| 49 | +To start using this project, please go to the root folder of the project. |
| 50 | + |
| 51 | +---------------------- |
| 52 | +Simulation Environment |
| 53 | +---------------------- |
| 54 | + |
| 55 | +.. figure:: ../images/GazeboView2.png |
| 56 | + :scale: 50 |
| 57 | + :class: with-shadow |
| 58 | + |
| 59 | +--------- |
| 60 | +Execution |
| 61 | +--------- |
| 62 | + |
| 63 | +The execution will open a simulation in Gazebo and the Aerostack2 components will use simulation time. |
| 64 | + |
| 65 | + |
| 66 | +In order to launch the simulation for the photovoltaic inspection launch: |
| 67 | + |
| 68 | +.. code-block:: bash |
| 69 | +
|
| 70 | + ./launch_as2.bash -n 4 -p 5 -r 4 |
| 71 | +
|
| 72 | +The flags for the launcher are: |
| 73 | + |
| 74 | +- ``-n``: especify the number of drones. |
| 75 | +- ``-p``: the number of pannel per row |
| 76 | +- ``-r``: the number of rows |
| 77 | + |
| 78 | +.. _project_gazebo_simulated_single_drone: |
| 79 | + |
| 80 | +This will open a simulation for **N** drones alongside the Aerostack2 components necessary for the mission execution (one per drone). We use `tmux <https://github.com/tmux/tmux/wiki>`_ for handling the execution of multiple sessions one per drone. |
| 81 | + |
| 82 | +Each drone is equipped with: |
| 83 | + 1. GPS |
| 84 | + 2. RGB Camera |
| 85 | + 3. Gimbal |
| 86 | + |
| 87 | +See `Aerostack2 Common Interfaces Documentation <https://aerostack2.github.io/_08_ros2_common_interfaces/aerial_platform/index.html#topics>`_ for more information about them. |
| 88 | +Below an example of an image retrieved from one drone can be found. |
| 89 | + |
| 90 | +.. figure:: ../images/PanelImage.png |
| 91 | + :scale: 30 |
| 92 | + :class: with-shadow |
| 93 | + |
| 94 | + |
| 95 | +An example mission can be launch for making the drones go to a target panel by launching: |
| 96 | + |
| 97 | +.. code-block:: bash |
| 98 | +
|
| 99 | + python3 mission.py |
| 100 | +
|
| 101 | +
|
| 102 | +To do a clean exit of tmux, execute: |
| 103 | + |
| 104 | +.. code-block:: bash |
| 105 | +
|
| 106 | + ./stop.bash |
0 commit comments