Typedefs | Functions | Variables
auction_action.cpp File Reference
#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>
Include dependency graph for auction_action.cpp:

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 Documentation

◆ Server

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.

Function Documentation

◆ auction_callback()

void auction_callback ( const cpswarm_msgs::TaskAllocationGoal::ConstPtr &  goal,
Server as 
)

Callback function to start a task allocation auction.

Parameters
goalThe action goal.
asReference to the action server object.

Definition at line 73 of file auction_action.cpp.

◆ bid_callback()

void bid_callback ( const cpswarm_msgs::TaskAllocationEvent::ConstPtr &  msg)

Callback function to receive auction bids.

Parameters
msgThe bid received.

Definition at line 55 of file auction_action.cpp.

◆ main()

int main ( int  argc,
char **  argv 
)

A ROS node that exchanges relative kinematics between CPSs in a swarm.

Parameters
argcNumber of command line arguments.
argvArray of command line arguments.
Returns
Success.

Definition at line 137 of file auction_action.cpp.

Variable Documentation

◆ auction_open

bool auction_open

Whether the auction is currently open for bidding.

Definition at line 34 of file auction_action.cpp.

◆ highest_bid

double highest_bid

The highest current bid.

Definition at line 44 of file auction_action.cpp.

◆ publisher

Publisher publisher

Publisher to announce the winner of the auction.

Definition at line 19 of file auction_action.cpp.

◆ task_id

int task_id

ID of the task that is auctioned.

Definition at line 24 of file auction_action.cpp.

◆ task_pose

geometry_msgs::Pose task_pose

Location of the task that is auctioned.

Definition at line 29 of file auction_action.cpp.

◆ timeout

double timeout

The auction duration.

Definition at line 39 of file auction_action.cpp.

◆ winner

string winner

The UUID of the CPS that is the current highest bidder.

Definition at line 49 of file auction_action.cpp.



task_allocation
Author(s):
autogenerated on Thu Oct 31 2019 16:22:51