aerostack2 / project_mavlink

BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Project Mavlink

Installation

You need to clone and build as2_platform_mavlink.

To install this project, clone the repository:

git clone https://github.com/aerostack2/project_mavlink.git

To start using this project, please go to the root folder of the project.

Execution

0. Pre-requisites

For this drones, aerostack2 nodes must be launched in the onboard computer of each drone, and the ground station can be launched in both the onboard computer of the drone or in an external computer.

For simulation, we use a docker image for launch Gazebo Garden with the Pixhawk SITL. You need to build it with the following command:

cd sitl_config/docker && ./docker_build.bash

Then, configure the simulation in the sitl_config/world.yaml file. You can change the world, the number of drones, the initial position, etc.

Finally, you need to launch the simulation with the following command:

./launch_sitl.bash

At the execution ends, close tmux sessions with the following command:

./stop_tmuxinator_sitl.bash

1. Launch aerostack2 nodes for each drone

To launch aerostack2 nodes for each drone, execute once the following command:

./launch_as2.bash -n drone0

Re-launch the command for each drone you want to launch, changing the drone namespace with the flag -n.

The flags for the components launcher are:

2. Launch aerostack2 nodes for the ground station

To launch aerostack2 nodes for the ground station, execute once the following command:

./launch_ground_station.bash -n drone0

The flags for the components launcher are:

3. Launch a mission

There are several missions that can be executed:

4. End the execution

If you are using tmux, you can end the execution with the following command:

You can force the end of all tmux sessions with the command:

tmux kill-server

If you are using gnome-terminal, you can end the execution by closing the terminal.

Developers guide

All projects in aerostack2 are structured in the same way. The project is divided into the following directories:

Both python and bash scripts have a help message that can be displayed by running the script with the -h option. For example, ./launch_as2.bash -h will display the help message for the launch_as2.bash script.

Note: For knowing all parameters for each launch, you can execute the following command:

ros2 launch my_package my_launch.py -s

Also, you can see them in the default config file of the package, in the config folder. If you want to modify the default parameters, you can add the parameter to the config file.