#include <KickSelectionTable.h>
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. |
Martin Lötzsch
Definition at line 61 of file KickSelectionTable.h.
|
Ids for all possible actions.
Definition at line 71 of file KickSelectionTable.h. Referenced by getActionIDFromShortName(), and getActionIDFromSpecialActionID(). |
|
IDs for different kick selection tables.
Definition at line 167 of file KickSelectionTable.h. Referenced by getTableIDFromName(). |
|
Definition at line 230 of file KickSelectionTable.h. |
|
Definition at line 233 of file KickSelectionTable.h. |
|
Definition at line 236 of file KickSelectionTable.h. |
|
Constructor.
Definition at line 16 of file KickSelectionTable.cpp. References action. |
|
Destructor.
Definition at line 21 of file KickSelectionTable.cpp. |
|
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. |
|
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<<(). |
|
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<<(). |
|
|
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:
|
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:
|
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:
|
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:
|
The action tables.
Definition at line 249 of file KickSelectionTable.h. Referenced by KickSelectionTable(), operator<<(), and operator>>(). |