21 #ifndef _ROS_ARIAC_SCORER_HH_    22 #define _ROS_ARIAC_SCORER_HH_    31 #include <osrf_gear/Goal.h>    32 #include <osrf_gear/KitTray.h>    33 #include "osrf_gear/VacuumGripperState.h"    45   public: 
void Update(
double timeStep = 0.0);
    88   public: 
void OnGoalReceived(
const osrf_gear::Goal::ConstPtr & goalMsg);
    97   protected: std::map<ariac::TrayID_t, ariac::KitTray> 
kitTrays;
 Class to store information about a goal. 
void AssignGoal(const ariac::Goal &goal)
Assign a goal to process. 
bool isPartTravelling
Whether or not there is a travelling part in the gripper. 
void ScoreCurrentState()
Calculate the score for the trays given the objects in them. 
bool newGoalReceived
Flag for signalling new goal to process. 
std::map< ariac::TrayID_t, ariac::KitTray > kitTrays
The trays to monitor the score of. 
void Update(double timeStep=0.0)
Update the scorer. 
void OnGripperStateReceived(const osrf_gear::VacuumGripperState &stateMsg)
Callback for receiving gripper state message. 
static void FillKitFromMsg(const osrf_gear::Kit &kitMsg, ariac::Kit &kit)
Helper function for filling a Kit from a kit ROS message. 
ariac::GoalScore UnassignCurrentGoal(double timeTaken=0.0)
Stop processing the current goal. 
ariac::Goal newGoal
Goal receivd from goal messages. 
bool newTrayInfoReceived
Flag for signalling new tray info to process. 
ariac::GoalScore * goalScore
Pointer to the score of the current goal. 
void OnTrayInfoReceived(const osrf_gear::KitTray::ConstPtr &trayMsg)
Callback for receiving tray state message. 
The parameters used for scoring the competition. 
ariac::ScoringParameters scoringParameters
Parameters to use for calculating scores. 
bool IsCurrentGoalComplete()
Get the score of the current goal. 
The score of a competition run. 
ariac::GameScore gameScore
The score of the run. 
void OnGoalReceived(const osrf_gear::Goal::ConstPtr &goalMsg)
Callback for receiving goal message. 
ariac::TrayScore SubmitTray(const ariac::KitTray &tray)
Submit tray for scoring and store the result in the goal score. 
virtual ~AriacScorer()
Destructor. 
A scorer for the ARIAC game. 
ariac::GoalScore GetCurrentGoalScore()
Get the score of the current goal. 
bool GetTrayById(const ariac::TrayID_t &trayID, ariac::KitTray &kitTray)
Get the kit tray with the specified ID. 
Class to store information about a kit. 
ariac::TrayScore ScoreTray(const ariac::KitTray &tray)
Calculate the score for a tray given the type of kit being built. 
boost::mutex kitTraysMutex
Mutex for protecting the kit trays being monitored. 
AriacScorer()
Constructor. 
ariac::Goal currentGoal
Current goal being monitored. 
ariac::GameScore GetGameScore()
Get the current score. 
Class to store information about a kit tray.