Launch modes

Initially, it was developed three basic modes to fit the user’s needs and ensure a better experience. They are:

Planning Mode

The Planning Mode has as its main goal to allow the user to check the drone's layout, save and load formations, before starting the simulator or using real clovers. In order to need less computational power and avoid possible errors during the simulation, one of its main features is the Swarm Preview, which will be explained in more detail ahead.

The planning.launch initializes the blocks programming back-end, allowing the use of Swarm Clover Blocks platform. To launch the planning mode, run this command on terminal:

roslaunch swarm_in_blocks planning.launch

Simulation Mode

The second mode developed is the Simulation, in which happens the simulation indeed, using the Gazebo. It allows organizing the clovers in 2D formations, such as some geometries, letters and words, it's also possible to make canonical 3D geometries and generate formations based on loaded meshes or point clouds. We can also apply LED effects in the swarm, all connected and in real-time.

The simulation.launch initializes the simulation environment. Gazebo with the Gazebo ROS API, blocks back-end, swarm checker node and the simulated clovers start with the following command:

roslaunch swarm_in_blocks simulation.launch num:=2 formation:=line led:=true camera:=false 

Parameters:

num:=(1,2,3...) - Number of drones that will be launched on gazebo.

formation:=(line, empty_square, full_square, circle) - Initial formation of the swarm.

led:=(true, false) - Launch clovers with leds or not.

camera:=(true, false) - Launch clovers with camera or not. Obs: camera takes much processing and might cause fps dropping in gazebo when launched for all the swarm.

rangefinder:=(true, false) - Launch clovers with rangefinder.

flashlight

The Navigation Mode allows applying in real clovers everything developed so that it's possible to control a swarm with block programming. To accomplish this, a launch file named realClover.launch was created to launch all necessary system components to enable the autonomous flight of a Clover, with its topics and services published in an individualized manner through the implementation of different namespaces based on the ID provided to the drone as an argument for the launch file. This file is an adaptation and fusion of various launch files in the COEX documentation originally executed when launching a single Clover.

However, you first need to stop / disable clovers default daemon service. To simply stop it for once you need to run (through ssh):

sudo systemctl stop clover

In case you want to disable the default services at all:

sudo systemctl disable clover

Now you can run on each drone with the chosen ID:

roslaunch rasp_pkg realClover.launch ID:=0

Local positioning system

It is worth noting that the swarm launch file is configured to use ArUcos to assist in the odometry of the drone. If you plan to use ArUco map navigation system, then you have to make your own marker map and insert it to ~/catkin_ws/src/clover/clover/launch/aruco.launch on the line:

<arg name="map" default="ArUco_map_name.txt"/> <!-- markers map file name -->

To disable this feature, you must change the following parameters within the realClover.launch file:

 <!-- General args -->
<arg name="aruco" default="false"/>

 <!-- Aruco's args -->
<arg name="aruco_detect" default="false"/>
<arg name="aruco_map" default="false"/>
<arg name="aruco_vpe" default="false"/>

Lastly, the biggest obstacle yet in using the navigation mode was adapting the launch responsible for using ArUcos so that its components are launched with the proper namespaces.

Last updated