#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, backKickLeft, backKickRight, kickAlongArmLeft, kickAlongArmRight, bbHeadLeftSoft, bbHeadLeftStrong, bbHeadRightSoft, bbHeadRightStrong, kickWithBackLegLeft, kickWithBackLegRight, numberOfActions } |
| Ids for all possible actions. More... | |
| enum | KickSelectionTableID { inCenterOfField, atLeftBorder, atRightBorder, atLeftOpponentBorder, atRightOpponentBorder, nearOwnGoal, goalie, whenStuck, passing, intentionalKick, hardKicks, numberOfKickSelectionTableIDs } |
| IDs for different kick selection tables. More... | |
| enum | { xRange = 20 } |
| enum | { yRange = 40 } |
| enum | { maxNumberOfSectors = 24 } |
Public Member Functions | |
| KickSelectionTable () | |
| Constructor. | |
| ~KickSelectionTable () | |
| Destructor. | |
| ActionID | retrieveKick (double ballOffsetX, double ballOffsetY, double destinationAngle, double destinationAngleWidth, KickSelectionTableID kickSelectionTableID) const |
| Calculates the best kick based on the position of the ball relative to the robot and a target angle. | |
| Vector2< double > | searchKickInNeighbourhood (double ballOffsetX, double ballOffsetY, double destinationAngle, KickSelectionTableID kickSelectionTableID, RobotPose robotPose, double maxDistance, double &kick) const |
| 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][maxNumberOfSectors][numberOfKickSelectionTableIDs] |
| The action tables. | |
| int | numberOfSectors |
| The number of sectors. | |
Private Member Functions | |
| int | getSectorFromAngle (double destinationAngle) const |
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(), getActionIDFromSpecialActionID(), and retrieveKick(). |
|
|
IDs for different kick selection tables.
Definition at line 195 of file KickSelectionTable.h. Referenced by getTableIDFromName(). |
|
|
Definition at line 274 of file KickSelectionTable.h. |
|
|
Definition at line 277 of file KickSelectionTable.h. |
|
|
Definition at line 280 of file KickSelectionTable.h. |
|
|
Constructor.
Definition at line 23 of file KickSelectionTable.cpp. References action. |
|
|
Destructor.
Definition at line 28 of file KickSelectionTable.cpp. |
|
|
returns names for action ids
Definition at line 109 of file KickSelectionTable.h. References anyLeft, anyRight, armLeft, armRight, backKickLeft, backKickRight, bbHeadLeftSoft, bbHeadLeftStrong, bbHeadRightSoft, bbHeadRightStrong, chestSoft, chestStrong, forwardKickFast, forwardKickHard, headLeft, headLeftSoft, headRight, headRightSoft, hookLeft, hookRight, kickAlongArmLeft, kickAlongArmRight, kickWithBackLegLeft, kickWithBackLegRight, leftPaw, nothing, pushSoft, pushStrong, putLeft, putRight, rightPaw, slapLeft, and slapRight. |
|
|
returns short names for action ids (used by streaming operator)
Definition at line 151 of file KickSelectionTable.h. References anyLeft, anyRight, armLeft, armRight, ASSERT, backKickLeft, backKickRight, bbHeadLeftSoft, bbHeadLeftStrong, bbHeadRightSoft, bbHeadRightStrong, chestSoft, chestStrong, forwardKickFast, forwardKickHard, headLeft, headLeftSoft, headRight, headRightSoft, hookLeft, hookRight, kickAlongArmLeft, kickAlongArmRight, kickWithBackLegLeft, kickWithBackLegRight, 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 212 of file KickSelectionTable.h. References ASSERT, atLeftBorder, atLeftOpponentBorder, atRightBorder, atRightOpponentBorder, goalie, hardKicks, inCenterOfField, intentionalKick, nearOwnGoal, passing, 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 136 of file KickSelectionTable.cpp. References ActionID, fromDegrees(), normalize(), pi, xRange, and yRange. Referenced by KickSelectionSymbols::retrieveKick(). |
Here is the call graph for this function:

|
||||||||||||||||||||||||||||||||
|
Definition at line 72 of file KickSelectionTable.cpp. References Vector2< V >::abs(), action, CIRCLE, CROSS, DEBUG_DRAWING_FINISHED, getSectorFromAngle(), nothing, Geometry::relative2FieldCoord(), Vector2< V >::x, Vector2< V >::y, and yRange. Referenced by KickSelectionSymbols::intentionalKickPossible(). |
Here is the call graph for this function:

|
|
Returns a table id for a name.
Definition at line 32 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 45 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 58 of file KickSelectionTable.cpp. References InFile::exists(), and getLocation(). Referenced by KickSelectionSymbols::KickSelectionSymbols(). |
Here is the call graph for this function:

|
|
Definition at line 68 of file KickSelectionTable.cpp. References fromDegrees(), normalize(), numberOfSectors, pi, and pi2. Referenced by searchKickInNeighbourhood(). |
Here is the call graph for this function:

|
|
The action tables.
Definition at line 302 of file KickSelectionTable.h. Referenced by KickSelectionTable(), operator<<(), operator>>(), and searchKickInNeighbourhood(). |
|
|
The number of sectors.
Definition at line 305 of file KickSelectionTable.h. Referenced by getSectorFromAngle(), operator<<(), and operator>>(). |
1.3.6