Contents
Dependencies
This package depends on the following message definitions:
The following library packages of the swarm behaviors library are required:
The following packages of the swarm functions library are required:
The following packages of the sensing and actuation library are required:
- area_provider
Further required packages are:
Execution
There are two launch files, one for coverage and one for tracking. Run the launch file
roslaunch uav_flocking uav_flocking_coverage.launch
to launch the uav_flocking_coverage node. Run the launch file
roslaunch uav_flocking uav_flocking_tracking.launch
to launch the uav_flocking_tracking node.
The launch files can be configured with following parameters:
id (integer, default: 1)
- The identifier (ID) of the CPS used for name spacing in simulation.
output (string, default: screen)
Whether to show the program output (screen) or to write it to a log file (log).
In the param subdirectory there is the parameter file uav_flocking.yaml that allows to configure the behavior of both nodes.
Nodes
uav_flocking_coverage
The uav_flocking_coverage performs coverage with a swarm of UAVs. The UAVs stay in a flock while sweeping the area using simple back and forth (boustrophedon) motion. Once the region has been sweeped completely, the UAVs abort the coverage. When the parameter single_target is set to true, a UAV succeeds once a target has been found and returns the target ID and position. The coverage path generation is provided by the swarm_functions library.Action Goal
uav_coverage/goal (cpswarm_msgs/CoverageGoal)- An empty goal that starts the optimal coverage behavior.
Action Result
uav_coverage/result (cpswarm_msgs/CoverageResult)- ID and position of the target that has been found.
Subscribed Topics
target_found (cpswarm_msgs/TargetPositionEvent)- Position and ID of a target detected by the target monitor. Only subscribed when single_target is set to true.
- Relative positions of the other swarm members.
- Relative velocities of the other swarm members.
Services Called
coverage_path/waypoint (cpswarm_msgs/GetWaypoint)- Get the current waypoint to navigate to.
- Get the area boundaries.
- Get the center of the area.
Parameters
~loop_rate (real, default: 5)- The frequency in Hz at which to run the control loops.
- The size of the message queue used for publishing and subscribing to topics.
- Whether the algorithm will succeed / terminate once a target has been found.
- Equilibrium distance between CPSs in meter.
- Target velocity of the flock in meter per second.
- Maximum velocity during formation flight in meter per second.
- Repulsion spring constant of half-spring per square second.
- Maximum repulsion between CPSs in meter in order to avoid over excitation.
- Velocity alignment viscous friction coefficient in square meter per second. Higher values result in slower but more stable flocks.
- Constant slope around equilibrium distance in meter.
- Minimum alignment between CPS in meter in order to avoid over excitation.
- Bounding area viscous friction coefficient in square meter per second.
- Softness of wall as decay width in meter.
- Strength of the shape forming velocity component in formation flight.
- Strength of the tracking velocity component in formation flight.
- Characteristic time needed by the CPS to reach the target velocity in seconds.
uav_flocking_tracking
The uav_flocking_tracking performs tracking with a swarm of UAVs. The UAVs stay in a formation while tracking a target. The position of the target is updated by the target monitor from the swarm_functions library When the target is lost, i.e., the target is not in the camera field of view anymore, the tracking aborts. When the target is done, i.e., handled by another CPS, the tracking succeeds.Action Goal
uav_tracking/goal (cpswarm_msgs/TrackingGoal)- A goal that starts the tracking behavior. It contains the ID of the target to track.
Subscribed Topics
target_update (cpswarm_msgs/TargetPositionEvent)- Position updates of the target being tracked.
- Whether the target being tracked has been lost.
- Whether the target being tracked has been handled by another CPS.
- Relative positions of the other swarm members.
- Relative velocities of the other swarm members.
Services Called
area/get_area (cpswarm_msgs/GetPoints)- Get the area boundaries.
- Get the center of the area.
Parameters
~loop_rate (real, default: 5)- The frequency in Hz at which to run the control loops.
- The size of the message queue used for publishing and subscribing to topics.
- Equilibrium distance between CPSs in meter.
- Target velocity of the flock in meter per second.
- Maximum velocity during formation flight in meter per second.
- Repulsion spring constant of half-spring per square second.
- Maximum repulsion between CPSs in meter in order to avoid over excitation.
- Velocity alignment viscous friction coefficient in square meter per second. Higher values result in slower but more stable flocks.
- Constant slope around equilibrium distance in meter.
- Minimum alignment between CPS in meter in order to avoid over excitation.
- Bounding area viscous friction coefficient in square meter per second.
- Softness of wall as decay width in meter.
- Strength of the shape forming velocity component in formation flight.
- Strength of the tracking velocity component in formation flight.
- Characteristic time needed by the CPS to reach the target velocity in seconds.
Acknowledgements
This work is supported by the European Commission through the CPSwarm H2020 project under grant no. 731946.