Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

KickSelectionTable Class Reference

#include <KickSelectionTable.h>

List of all members.

Public Types

enum  ActionID {
  nothing = 0, headLeft, headRight,
  anyLeft, anyRight, hookLeft,
  hookRight, leftPaw, rightPaw,
  armLeft, armRight, pushSoft,
  pushStrong, chestSoft, chestStrong,
  putRight, putLeft, forwardKickFast,
  forwardKickHard, slapRight, slapLeft,
  headLeftSoft, headRightSoft, numberOfActions
}
 Ids for all possible actions. More...

enum  KickSelectionTableID {
  inCenterOfField, atLeftBorder, atRightBorder,
  atLeftOpponentBorder, atRightOpponentBorder, nearOwnGoal,
  goalie, whenStuck, numberOfKickSelectionTableIDs
}
 IDs for different kick selection tables. More...

enum  { xRange = 20 }
enum  { yRange = 40 }
enum  { numberOfSectors = 12 }

Public Member Functions

 KickSelectionTable ()
 Constructor.

 ~KickSelectionTable ()
 Destructor.

ActionID retrieveKick (double ballOffsetX, double ballOffsetY, double destinationAngle, KickSelectionTableID kickSelectionTableID) const
 Calculates the best kick based on the position of the ball relative to the robot and a target angle.

void load (const char *fileName)
 Loads a kick selection table from a file.


Static Public Member Functions

const char * getActionName (ActionID id)
 returns names for action ids

const char * getShortActionName (ActionID id)
 returns short names for action ids (used by streaming operator)

const char * getKickSelectionTableIDName (KickSelectionTableID id)
 returns a name for an action table id

const ActionID getActionIDFromSpecialActionID (SpecialActionRequest::SpecialActionID id)
 Returns an action id for a special action id.

KickSelectionTableID getTableIDFromName (const char *name)
 Returns a table id for a name.

ActionID getActionIDFromShortName (const char *name)
 Returns an action id for a short name.


Public Attributes

ActionID action [xRange][yRange][numberOfSectors][numberOfKickSelectionTableIDs]
 The action tables.


Detailed Description

Author:
Matthias Jüngel

Martin Lötzsch

Provides for a set of tables which provides a kick selection depending on a desired kick angle and ball position.

Definition at line 61 of file KickSelectionTable.h.


Member Enumeration Documentation

enum KickSelectionTable::ActionID
 

Ids for all possible actions.

Enumeration values:
nothing 
headLeft 
headRight 
anyLeft 
anyRight 
hookLeft 
hookRight 
leftPaw 
rightPaw 
armLeft 
armRight 
pushSoft 
pushStrong 
chestSoft 
chestStrong 
putRight 
putLeft 
forwardKickFast 
forwardKickHard 
slapRight 
slapLeft 
headLeftSoft 
headRightSoft 
numberOfActions 

Definition at line 71 of file KickSelectionTable.h.

Referenced by getActionIDFromShortName(), and getActionIDFromSpecialActionID().

enum KickSelectionTable::KickSelectionTableID
 

IDs for different kick selection tables.

Enumeration values:
inCenterOfField 
atLeftBorder 
atRightBorder 
atLeftOpponentBorder 
atRightOpponentBorder 
nearOwnGoal 
goalie 
whenStuck 
numberOfKickSelectionTableIDs 

Definition at line 167 of file KickSelectionTable.h.

Referenced by getTableIDFromName().

anonymous enum
 

Enumeration values:
xRange 

Definition at line 230 of file KickSelectionTable.h.

anonymous enum
 

Enumeration values:
yRange 

Definition at line 233 of file KickSelectionTable.h.

anonymous enum
 

Enumeration values:
numberOfSectors 

Definition at line 236 of file KickSelectionTable.h.


Constructor & Destructor Documentation

KickSelectionTable::KickSelectionTable  ) 
 

Constructor.

Definition at line 16 of file KickSelectionTable.cpp.

References action.

KickSelectionTable::~KickSelectionTable  ) 
 

Destructor.

Definition at line 21 of file KickSelectionTable.cpp.


Member Function Documentation

const char* KickSelectionTable::getActionName ActionID  id  )  [inline, static]
 

returns names for action ids

Definition at line 99 of file KickSelectionTable.h.

References anyLeft, anyRight, armLeft, armRight, chestSoft, chestStrong, forwardKickFast, forwardKickHard, headLeft, headLeftSoft, headRight, headRightSoft, hookLeft, hookRight, leftPaw, nothing, pushSoft, pushStrong, putLeft, putRight, rightPaw, slapLeft, and slapRight.

const char* KickSelectionTable::getShortActionName ActionID  id  )  [inline, static]
 

returns short names for action ids (used by streaming operator)

Definition at line 132 of file KickSelectionTable.h.

References anyLeft, anyRight, armLeft, armRight, ASSERT, chestSoft, chestStrong, forwardKickFast, forwardKickHard, headLeft, headLeftSoft, headRight, headRightSoft, hookLeft, hookRight, leftPaw, nothing, pushSoft, pushStrong, putLeft, putRight, rightPaw, slapLeft, and slapRight.

Referenced by getActionIDFromShortName(), and operator<<().

const char* KickSelectionTable::getKickSelectionTableIDName KickSelectionTableID  id  )  [inline, static]
 

returns a name for an action table id

Definition at line 181 of file KickSelectionTable.h.

References ASSERT, atLeftBorder, atLeftOpponentBorder, atRightBorder, atRightOpponentBorder, goalie, inCenterOfField, nearOwnGoal, and whenStuck.

Referenced by getTableIDFromName(), and operator<<().

const ActionID KickSelectionTable::getActionIDFromSpecialActionID SpecialActionRequest::SpecialActionID  id  )  [inline, static]
 

Returns an action id for a special action id.

Definition at line 200 of file KickSelectionTable.h.

References ActionID, anyLeft, SpecialActionRequest::anyLeft, anyRight, SpecialActionRequest::anyRight, armLeft, SpecialActionRequest::armLeft, armRight, SpecialActionRequest::armRight, chestSoft, SpecialActionRequest::chestSoft, forwardKickFast, SpecialActionRequest::forwardKickFast, forwardKickHard, SpecialActionRequest::forwardKickHard, headLeft, SpecialActionRequest::headLeft, headLeftSoft, SpecialActionRequest::headLeftSoft, headRight, SpecialActionRequest::headRight, headRightSoft, SpecialActionRequest::headRightSoft, hookLeft, SpecialActionRequest::hookLeft, hookRight, SpecialActionRequest::hookRight, leftPaw, SpecialActionRequest::leftPaw, nothing, pushSoft, SpecialActionRequest::pushSoft, pushStrong, SpecialActionRequest::pushStrong, putLeft, SpecialActionRequest::putLeft, putRight, SpecialActionRequest::putRight, rightPaw, SpecialActionRequest::rightPaw, slapLeft, SpecialActionRequest::slapLeft, slapRight, and SpecialActionRequest::slapRight.

KickSelectionTable::ActionID KickSelectionTable::retrieveKick double  ballOffsetX,
double  ballOffsetY,
double  destinationAngle,
KickSelectionTableID  kickSelectionTableID
const
 

Calculates the best kick based on the position of the ball relative to the robot and a target angle.

Definition at line 59 of file KickSelectionTable.cpp.

References fromDegrees(), normalize(), numberOfSectors, pi, pi2, xRange, and yRange.

Referenced by KickSelectionSymbols::retrieveKick().

Here is the call graph for this function:

KickSelectionTable::KickSelectionTableID KickSelectionTable::getTableIDFromName const char *  name  )  [static]
 

Returns a table id for a name.

Definition at line 25 of file KickSelectionTable.cpp.

References getKickSelectionTableIDName(), inCenterOfField, KickSelectionTableID, and numberOfKickSelectionTableIDs.

Referenced by operator>>().

Here is the call graph for this function:

KickSelectionTable::ActionID KickSelectionTable::getActionIDFromShortName const char *  name  )  [static]
 

Returns an action id for a short name.

Definition at line 38 of file KickSelectionTable.cpp.

References ActionID, getShortActionName(), nothing, and numberOfActions.

Referenced by operator>>().

Here is the call graph for this function:

void KickSelectionTable::load const char *  fileName  ) 
 

Loads a kick selection table from a file.

Definition at line 51 of file KickSelectionTable.cpp.

References InFile::exists(), and getLocation().

Referenced by KickSelectionSymbols::KickSelectionSymbols().

Here is the call graph for this function:


Member Data Documentation

ActionID KickSelectionTable::action[xRange][yRange][numberOfSectors][numberOfKickSelectionTableIDs]
 

The action tables.

Definition at line 249 of file KickSelectionTable.h.

Referenced by KickSelectionTable(), operator<<(), and operator>>().


The documentation for this class was generated from the following files:
Generated on Thu Sep 23 20:09:11 2004 for GT2004 by doxygen 1.3.6