#include <ros/ros.h>#include <actionlib/server/simple_action_server.h>#include <geometry_msgs/Pose.h>#include <cpswarm_msgs/TaskAllocationEvent.h>#include <cpswarm_msgs/TaskAllocatedEvent.h>#include <cpswarm_msgs/TaskAllocationAction.h>
Go to the source code of this file.
Typedefs | |
| typedef actionlib::SimpleActionServer< cpswarm_msgs::TaskAllocationAction > | Server |
| The server object that offers the task allocation auction as action server. More... | |
Functions | |
| void | auction_callback (const cpswarm_msgs::TaskAllocationGoal::ConstPtr &goal, Server *as) |
| Callback function to start a task allocation auction. More... | |
| void | bid_callback (const cpswarm_msgs::TaskAllocationEvent::ConstPtr &msg) |
| Callback function to receive auction bids. More... | |
| int | main (int argc, char **argv) |
| A ROS node that exchanges relative kinematics between CPSs in a swarm. More... | |
Variables | |
| bool | auction_open |
| Whether the auction is currently open for bidding. More... | |
| double | highest_bid |
| The highest current bid. More... | |
| Publisher | publisher |
| Publisher to announce the winner of the auction. More... | |
| int | task_id |
| ID of the task that is auctioned. More... | |
| geometry_msgs::Pose | task_pose |
| Location of the task that is auctioned. More... | |
| double | timeout |
| The auction duration. More... | |
| string | winner |
| The UUID of the CPS that is the current highest bidder. More... | |
| typedef actionlib::SimpleActionServer<cpswarm_msgs::TaskAllocationAction> Server |
The server object that offers the task allocation auction as action server.
Definition at line 14 of file auction_action.cpp.
| void auction_callback | ( | const cpswarm_msgs::TaskAllocationGoal::ConstPtr & | goal, |
| Server * | as | ||
| ) |
Callback function to start a task allocation auction.
| goal | The action goal. |
| as | Reference to the action server object. |
Definition at line 73 of file auction_action.cpp.
| void bid_callback | ( | const cpswarm_msgs::TaskAllocationEvent::ConstPtr & | msg | ) |
Callback function to receive auction bids.
| msg | The bid received. |
Definition at line 55 of file auction_action.cpp.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
A ROS node that exchanges relative kinematics between CPSs in a swarm.
| argc | Number of command line arguments. |
| argv | Array of command line arguments. |
Definition at line 137 of file auction_action.cpp.
| bool auction_open |
Whether the auction is currently open for bidding.
Definition at line 34 of file auction_action.cpp.
| double highest_bid |
The highest current bid.
Definition at line 44 of file auction_action.cpp.
| Publisher publisher |
Publisher to announce the winner of the auction.
Definition at line 19 of file auction_action.cpp.
| int task_id |
ID of the task that is auctioned.
Definition at line 24 of file auction_action.cpp.
| geometry_msgs::Pose task_pose |
Location of the task that is auctioned.
Definition at line 29 of file auction_action.cpp.
| double timeout |
The auction duration.
Definition at line 39 of file auction_action.cpp.
| string winner |
The UUID of the CPS that is the current highest bidder.
Definition at line 49 of file auction_action.cpp.