Skip to content

Commit 84c4f92

Browse files
authored
Merge pull request #1 from miferco97/TB2_simulation
First TB2 simulation environment tutorial
2 parents bfd0aff + e84933f commit 84c4f92

File tree

7 files changed

+122
-0
lines changed

7 files changed

+122
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.vscode/
2+
_build/

index.rst

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ CoreSense Project (CoreSense in short) is a project... TBD
2121
build_instructions/index.rst
2222
design/index.rst
2323
tutorials/index.rst
24+
testbeds/index.rst
2425
demos/index.rst
2526
about/index.rst
27+
28+
2629

testbeds/docs/inspection_testbed.rst

+106
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
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

testbeds/images/GazeboView.png

1.56 MB
Loading

testbeds/images/GazeboView2.png

1.54 MB
Loading

testbeds/images/PanelImage.png

727 KB
Loading

testbeds/index.rst

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.. _testbeds:
2+
3+
Testbeds
4+
#########
5+
6+
CoreSense Testbeds
7+
8+
.. toctree::
9+
:maxdepth: 1
10+
11+
docs/inspection_testbed.rst

0 commit comments

Comments
 (0)