task_allocation package from swarm_functions repoarea_division coverage_path kinematics_exchanger state_exchanger swarm_functions target_monitor task_allocation |
|
Package Summary
Tags | No category tags. |
Version | 1.1.0 |
License | Apache License 2.0 |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/cpswarm/swarm_functions.git |
VCS Type | git |
VCS Version | kinetic-devel |
Last Updated | 2021-01-19 |
Dev Status | DEVELOPED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Micha Sende
- Gianluca Prato
- Micha Sende
Authors
task_allocation
This package offers action servers for assigning tasks between cyber physical system (CPS). It uses a market-inspired approach by running a single-round, single-item auction. The package offers two action servers that perform the auction, one that acts as auctioneer and one that acts as bidder. The auctioneer opens the auction for a specific duration in which interested bidders can place a single bid. After the timeout the winner, i.e., the bidder with the highest bid is announced.
Dependencies
This package depends on the following message definitions:
The communication between CPSs is based on the CPSwarm Communication Library.
The following packages of the sensing and actuation library are required:
- *_pos_provider
Further required packages are:
Execution
To start the action servers, run the launch file
roslaunch task_allocation task_allocation.launch
which launches both action servers which listen for incoming requests.
The launch file can be configured with following parameters:
-
id
(integer, default:1
) The identifier (ID) of the CPS that is running the servers. -
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 task_allocation.yaml
that allows to configure the behavior of the auction process.
Nodes
auction_action
The auction_action
node offers the task_allocation_auction
action server that acts as auctioneer in the task allocation auction. When the action is called, it opens an auction and announces the task with ID and location. It then waits a specific time for the bids of other CPS. Once the auction timeout expires, it broadcasts the ID of the winning CPS, i.e., the one with the highest bid, to which the task is assigned. If no CPS participated in the auction, the action server aborts the auction goal.
Action Goal
-
cmd/task_allocation_auction/goal
(cpswarm_msgs/TaskAllocationGoal) A goal to start an auction containing the universally unique ID (UUID) of the auctioneer together with the ID and the position of the task that is auctioned.
Action Result
-
cmd/task_allocation_auction/result
(cpswarm_msgs/TaskAllocationResult) The result of the auction contains the UUID of the winning CPS, together with ID and position of the task that has been auctioned.
Subscribed Topics
-
bridge/events/cps_selection
(cpswarm_msgs/TaskAllocationEvent) The the bids of the auction from other CPSs. Messages are exchanged between CPSs using the CPSwarm Communication Library.
Published Topics
-
cps_selected
(cpswarm_msgs/TaskAllocatedEvent) The UUID of the CPS that won the auction to the other CPSs. Messages are exchanged between CPSs using the CPSwarm Communication Library.
Parameters
-
~loop_rate
(real, default:5.0
) The frequency in Hz at which to run the control loops. -
~queue_size
(integer, default:10
) The size of the message queue used for publishing and subscribing to topics. -
~timeout
(real, default:10.0
) The time in seconds to listen for incoming bids from other CPSs after the auction has been opened, i.e., auction duration.
bid_action
The bid_action
node offers the task_allocation_bid
action server that acts as bidder in the task allocation auction opened by another CPS. When the action is called, it computes a bid for the task based on its location. The bid value is inversely proportional to the distance between the CPS and the task. It publishes the bid and waits until the auction ends. If the CPS has won the auction, the action server goal succeeds, otherwise it is aborted.
Action API
The bid_action
node provides an implementation of the SimpleActionServer to provide the task allocation auction process. It takes in goals containing cpswarm_msgs/TaskAllocation messages.
Action Subscribed Topics
-
cmd/task_allocation_bid/goal
(cpswarm_msgs/TaskAllocationActionGoal) A goal to compute a bid containing the universally unique ID (UUID) of the auctioneer together with the ID and the position of the task that is auctioned. -
cmd/task_allocation_bid/cancel
(actionlib_msgs/GoalID) A request to cancel a specific bidding goal.
Action Published Topics
-
cmd/task_allocation_bid/feedback
(cpswarm_msgs/TaskAllocationActionFeedback) The feedback is empty for thetask_allocation_bid
action. -
cmd/task_allocation_bid/status
(actionlib_msgs/GoalStatusArray) Provides status information on the goals that are sent to thetask_allocation_bid
action. -
cmd/task_allocation_bid/result
(cpswarm_msgs/TaskAllocationActionResult) The result of the auction contains ID and position of the task that has been auctioned.
Subscribed Topics
-
pos_provider/pose
(geometry_msgs/PoseStamped) The current position of the CPS. -
bridge/uuid
(swarmros/String) The UUID of this CPS. It is published by the CPSwarm Communication Library. -
bridge/events/cps_selected
(cpswarm_msgs/TaskAllocatedEvent) The UUID of the CPS that won the auction. Messages are exchanged between CPSs using the CPSwarm Communication Library.
Published Topics
-
cps_selection
(cpswarm_msgs/TaskAllocationEvent) The auction bid submitted to the auctioneer CPS. Messages are exchanged between CPSs using the CPSwarm Communication Library.
Parameters
-
~loop_rate
(real, default:5.0
) The frequency in Hz at which to run the control loops. -
~queue_size
(integer, default:10
) The size of the message queue used for publishing and subscribing to topics.
Code API
Changelog for package task_allocation
1.1.0 (2019-10-31)
- Fixed: Use frame ID in messages
- Changed: Use latched topics
- Contributors: Micha Sende
1.0.0 (2019-09-11)
- Initial release of task_allocation
- Contributors: Micha Sende
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
catkin | |
roscpp | |
actionlib | |
cpswarm_msgs | |
actionlib_msgs |
System Dependencies
Dependant Packages
Name | Deps |
---|---|
swarm_functions |
Launch files
- launch/task_allocation.launch
-
- id [default: 1]
- output [default: screen]