Autonomous Waypoint Mission for UAV Swarm with Dynamic Configurations

../_images/snap_wp.png

With the same leader-follower fashion, the tutorial gives another demonstration on UAV swarm for autonomous waypoint missions. The difference with the previous is that a more sophisticated mission management layer is constructed to support dynamic configurations, such as formation shape change and collision avoidance. The modularity of the mission management layer enables even complex swarm behaviors for developers.

1. Mission Description

The waypoint mission is defined with waypoint coordinates of the leader, wherein the leader will lead the swarm team to pass through these waypoints in the DASA frame. Those coordinates are predefined in yaml files, located in the launch folder of the statemachine package. For instance, the default waypoint mission for indoor case is set in wp_mission_indoor.yaml. Note that these coordinates are defined with respect to the indoor DASA frame. Users should be careful with the setting, and a minimal 6m*6m field size is recommended for this mission.

# waypoint mission
- [ 4.0,       2.5,      1.5,    0.0]
- [ 4.0,       5.5,      1.5,    90.0]
- [ 2.5,       5.5,      1.5,    180.0]
- [ 2.5,       2.5,      1.5,    -90.0]

The default waypoint mission involves these action sequences: the team will first takeoff, and then form a two-row shape. After the formation shape is formed, the leader will lead the team to pass through several waypoints.

2. Key Components

First, the statemachine package publishes the requested actions for swarm tasks with desired configurations. For example, to form a swarm formation with a specific shape, the requested action is set with a predefined shape string, and the leader position for the whole team.

_cur_action.config = "FORMATION_CONFIG_TWO_ROW";//config option that supported by swarm mission pkg
_cur_action.waypoint_index = _current_wp_index;
_cur_action.params.clear();

_cur_action.params.push_back(_mission_waypoints.at(_current_wp_index).pose.position.x);//x,y,z coordinates
_cur_action.params.push_back(_mission_waypoints.at(_current_wp_index).pose.position.y);
_cur_action.params.push_back(_mission_waypoints.at(_current_wp_index).pose.position.z);

Second, the swarm_mission package will respond to the requested action command. A standalone class for formation maneuvering will handle the formation configuration, and output the desired position triplet for each step. The control law is designed to be distributed, namely an agent will only utilize the information from a neighbourhood agent to achieve the desired swarm shape.

Third, collision protection mechanism is activated simultaneously with the control scheme, which enables dynamic formation shape changing.

3. How to Run

Hint

📌 The DASA code base is under rapid development, so users are suggested to refer to the latest user manual delivered with our product.

3.1 SITL Simulation

We provide scripts to launch swarm simulation with 3 uavs in the directory ~/DASA_space/catkinws_swarmdemo/scripts. The SITL nodes have to be launched first with the Gazebo engine:

cd  ~/DASA_space/catkinws_swarmdemo/scripts/sitl
bash start_sitl_nodes_3uavs.sh

Users can only start other swarm nodes after the Gazebo interface is shown up,

cd  ~/DASA_space/catkinws_swarmdemo/scripts/sitl
bash start_wp_mission_swarm_nodes_3uavs.sh

Note that the SITL simulation is conducted in the outdoor GPS environment as the DASA frame is not activated in this case.

3.2 Flight Test

The localization setup shall be finished prior to flight tests (see Start Localization Process in Indoor DASA System). Users can start the waypoint mission nodes for 3 uavs with the scripts below after remotely logging into these vehicles:

cd  ~/DASA_space/catkinws_swarmdemo/scripts/test
bash start_indoor_wp_mission_3uavs.sh

The mission can then be launched by setting these vehicles in offboard and armed modes.

4. Video Demonstration

The video demonstration for the SITL and flight tests is shown in: