GT2004StrategySymbols Class Reference

#include <GT2004StrategySymbols.h>

Inheritance diagram for GT2004StrategySymbols:

Xabsl2FunctionProvider BehaviorControlInterfaces List of all members.

Input symbols

double getRobotNumber ()
double getAngleToTeammate ()
bool getAnotherPlayerIsInReadyState ()
bool getAnotherPlayerIsInInitialState ()
bool getAnotherTeammateIsPerformingAKick ()
bool getTheStrikerIsPlayingNearTheOpponentGoal ()
bool getTheStrikerIsNotPlayingNearTheOpponentGoal ()
bool getTheStrikerIsPlayingNearTheOwnGoal ()
bool getTheStrikerIsNotPlayingNearTheOwnGoal ()
double getGoalieMaxPositionSpeed ()
double getSearchBallX ()
double angleToTeammateIndex

Public Types

 doProfiling
 dontDoProfiling
 writeProfiles
 writeCompleteProfiles
 dontWriteProfiles
enum  { doProfiling, dontDoProfiling }
enum  { writeProfiles, writeCompleteProfiles, dontWriteProfiles }

Public Member Functions

 GT2004StrategySymbols (BehaviorControlInterfaces &interfaces)
void registerSymbols (Xabsl2Engine &engine)
void update ()
void estimateTimeToReachBall ()
void computeRole ()

Public Attributes

double estimatedTimeToReachBall
BehaviorTeamMessage::DynamicRole role
enum GT2004StrategySymbols:: { ... }  doProfile
enum GT2004StrategySymbols:: { ... }  writeProfile

Detailed Description

The Xabsl2 symbols that are defined in "strategy-symbols.xml"

Author:
Martin Lötzsch

Definition at line 22 of file GT2004StrategySymbols.h.


Member Enumeration Documentation

anonymous enum

Output-Symbols for Profiler

Enumerator:
doProfiling 
dontDoProfiling 

Definition at line 92 of file GT2004StrategySymbols.h.

anonymous enum

Enumerator:
writeProfiles 
writeCompleteProfiles 
dontWriteProfiles 

Definition at line 93 of file GT2004StrategySymbols.h.


Constructor & Destructor Documentation

GT2004StrategySymbols::GT2004StrategySymbols ( BehaviorControlInterfaces interfaces  ) 

Definition at line 26 of file GT2004StrategySymbols.cpp.

References estimatedTimeToReachBall, BehaviorTeamMessage::goalie, and role.


Member Function Documentation

void GT2004StrategySymbols::computeRole (  ) 

computes the current role

Dynamic Role switching policy

BTW: LED policy: defensive supporter: no blue LEDs offensive supporter: blue LED13 on striker: blue LED13 and LED12 fast blinking alterningly

1. Without WLAN: Player 1: Goalie Player 2: default: defensive supporter Ball within 1.5m: striker Player 3: default: offensive supporter Ball within own half: ball within 1m: striker otherwise defensive supporter Ball within 2m: striker Player 4: default: offensive supporter Ball within 2.5m: striker

2. With WLAN (no team messages for 5 secs): Player 1: Goalie Player 2,3,4: When ball seen by one of the field players (last 2sec) or by current player (last 5 sec): Closest player to ball: Striker Foremost player: offensive supporter Hindmost player: defensive supporter

When ball not seen: 2 foremost players: offensive supporter Hindmost player: defensive supporter

Definition at line 116 of file GT2004StrategySymbols.cpp.

References SeenBallPosition::ballInFrontOfOpponentGoal, BehaviorControlInterfaces::ballModel, BehaviorTeamMessage::defensiveSupporter, Geometry::distance(), FieldDimensions::distanceToOpponentPenaltyArea(), Geometry::fieldCoord2Relative(), Player::four, getPlayer(), SystemCall::getTimeSince(), BehaviorTeamMessage::goalie, TeamMessageCollection::numberOfTeamMessages, BehaviorTeamMessage::offensiveSupporter, Player::one, BehaviorTeamMessage::playing, BehaviorControlInterfaces::robotPose, role, BallModel::seen, BehaviorTeamMessage::striker, BehaviorControlInterfaces::teamMessageCollection, Player::three, SeenBallPosition::timeWhenLastSeen, Pose2D::translation, Player::two, and Vector2< V >::x.

Referenced by update().

void GT2004StrategySymbols::estimateTimeToReachBall (  ) 

computes the estimated time to reach the ball

Definition at line 475 of file GT2004StrategySymbols.cpp.

References Geometry::angleTo(), BehaviorControlInterfaces::ballModel, Geometry::distanceTo(), estimatedTimeToReachBall, SystemCall::getTimeSince(), normalize(), pi2, BallModel::seen, and SeenBallPosition::timeWhenLastSeen.

Referenced by update().

double GT2004StrategySymbols::getAngleToTeammate (  ) 

calculates the value for the input function get-angle-to-teammate with parameter index the Parameter "robot-pose.get-angle-to-teammate.index" for the decimal input function "robot-pose.get-angle-to-teammate"

Definition at line 510 of file GT2004StrategySymbols.cpp.

References Geometry::angleTo(), angleToTeammateIndex, PlayerPoseCollection::getOwnPlayerPose(), PlayerPose::getPose(), PlayerPoseCollection::numberOfOwnPlayers, BehaviorControlInterfaces::playerPoseCollection, toDegrees(), and Pose2D::translation.

Referenced by registerSymbols().

bool GT2004StrategySymbols::getAnotherPlayerIsInInitialState (  ) 

A function for the symbol "another-player-is-in-initial-state".

Definition at line 543 of file GT2004StrategySymbols.cpp.

References BehaviorTeamMessage::initial.

Referenced by registerSymbols().

bool GT2004StrategySymbols::getAnotherPlayerIsInReadyState (  ) 

A function for the symbol "another-player-is-in-ready-state".

Definition at line 527 of file GT2004StrategySymbols.cpp.

References BehaviorTeamMessage::ready.

Referenced by registerSymbols().

bool GT2004StrategySymbols::getAnotherTeammateIsPerformingAKick (  ) 

A function for the symbol "another-teammate-is-performing-a-kick"

Definition at line 559 of file GT2004StrategySymbols.cpp.

References BehaviorTeamMessage::performingAKick.

Referenced by registerSymbols().

double GT2004StrategySymbols::getGoalieMaxPositionSpeed (  ) 

A function for the symbol "goalie-max-position-speed"

Definition at line 457 of file GT2004StrategySymbols.cpp.

References BehaviorControlInterfaces::ballModel, Geometry::distanceTo(), max, min, and BallModel::seen.

Referenced by registerSymbols().

double GT2004StrategySymbols::getRobotNumber (  )  [inline]

Definition at line 55 of file GT2004StrategySymbols.h.

References getPlayer(), and Player::getPlayerNumber().

Referenced by registerSymbols().

double GT2004StrategySymbols::getSearchBallX (  ) 

A function for the symbol "search-ball.x"

Definition at line 639 of file GT2004StrategySymbols.cpp.

References BehaviorTeamMessage::defensiveSupporter, Player::four, getPlayer(), SystemCall::getTimeSince(), BehaviorTeamMessage::offensiveSupporter, role, BehaviorTeamMessage::striker, Player::three, and Player::two.

Referenced by registerSymbols().

bool GT2004StrategySymbols::getTheStrikerIsNotPlayingNearTheOpponentGoal (  ) 

A function for the symbol "the-striker-is-not-playing-near-the-opponent-goal"

Definition at line 591 of file GT2004StrategySymbols.cpp.

References BehaviorTeamMessage::striker.

Referenced by registerSymbols().

bool GT2004StrategySymbols::getTheStrikerIsNotPlayingNearTheOwnGoal (  ) 

A function for the symbol "the-striker-is-not-playing-near-the-own-goal"

Definition at line 623 of file GT2004StrategySymbols.cpp.

References BehaviorTeamMessage::striker.

Referenced by registerSymbols().

bool GT2004StrategySymbols::getTheStrikerIsPlayingNearTheOpponentGoal (  ) 

A function for the symbol "the-striker-is-playing-near-the-opponent-goal"

Definition at line 575 of file GT2004StrategySymbols.cpp.

References BehaviorTeamMessage::striker.

Referenced by registerSymbols().

bool GT2004StrategySymbols::getTheStrikerIsPlayingNearTheOwnGoal (  ) 

A function for the symbol "the-striker-is-playing-near-the-own-goal"

Definition at line 607 of file GT2004StrategySymbols.cpp.

References BehaviorTeamMessage::striker.

Referenced by registerSymbols().

void GT2004StrategySymbols::registerSymbols ( Xabsl2Engine engine  ) 

registers the symbols at an engine

Definition at line 34 of file GT2004StrategySymbols.cpp.

References angleToTeammateIndex, BehaviorTeamMessage::defensiveSupporter, estimatedTimeToReachBall, BehaviorTeamMessage::finished, BehaviorTeamMessage::gameState, getAngleToTeammate(), getAnotherPlayerIsInInitialState(), getAnotherPlayerIsInReadyState(), getAnotherTeammateIsPerformingAKick(), getGoalieMaxPositionSpeed(), getRobotNumber(), getSearchBallX(), getTheStrikerIsNotPlayingNearTheOpponentGoal(), getTheStrikerIsNotPlayingNearTheOwnGoal(), getTheStrikerIsPlayingNearTheOpponentGoal(), getTheStrikerIsPlayingNearTheOwnGoal(), BehaviorTeamMessage::goalie, BehaviorTeamMessage::initial, BehaviorTeamMessage::message, BehaviorTeamMessage::none, BehaviorTeamMessage::offensiveSupporter, BehaviorControlInterfaces::outgoingBehaviorTeamMessage, BehaviorTeamMessage::penalized, BehaviorTeamMessage::performingAKick, BehaviorTeamMessage::playing, BehaviorTeamMessage::ready, Xabsl2Symbols::registerBooleanInputSymbol(), Xabsl2Symbols::registerDecimalInputFunction(), Xabsl2Symbols::registerDecimalInputFunctionParameter(), Xabsl2Symbols::registerDecimalInputSymbol(), Xabsl2Symbols::registerEnumeratedInputSymbol(), Xabsl2Symbols::registerEnumeratedInputSymbolEnumElement(), Xabsl2Symbols::registerEnumeratedOutputSymbol(), Xabsl2Symbols::registerEnumeratedOutputSymbolEnumElement(), role, BehaviorTeamMessage::set, BehaviorTeamMessage::sleep, and BehaviorTeamMessage::striker.

Referenced by GT2004BehaviorControl::registerSymbolsAndBasicBehaviors().

void GT2004StrategySymbols::update (  ) 

updates the symbols

Definition at line 107 of file GT2004StrategySymbols.cpp.

References computeRole(), BehaviorTeamMessage::dynamicRole, estimatedTimeToReachBall, BehaviorTeamMessage::estimatedTimeToReachBall, estimateTimeToReachBall(), BehaviorControlInterfaces::outgoingBehaviorTeamMessage, and role.

Referenced by GT2004BehaviorControl::execute().


Member Data Documentation

double GT2004StrategySymbols::angleToTeammateIndex

Definition at line 60 of file GT2004StrategySymbols.h.

Referenced by getAngleToTeammate(), and registerSymbols().

enum { ... } GT2004StrategySymbols::doProfile

Output-Symbols for Profiler

double GT2004StrategySymbols::estimatedTimeToReachBall

current estimated time to reach the ball

Definition at line 38 of file GT2004StrategySymbols.h.

Referenced by estimateTimeToReachBall(), GT2004StrategySymbols(), registerSymbols(), and update().

BehaviorTeamMessage::DynamicRole GT2004StrategySymbols::role

current role

Definition at line 44 of file GT2004StrategySymbols.h.

Referenced by computeRole(), getSearchBallX(), GT2004StrategySymbols(), GT2004BehaviorControl::postExecute(), registerSymbols(), and update().

enum { ... } GT2004StrategySymbols::writeProfile


The documentation for this class was generated from the following files:
Generated on Thu Dec 7 01:36:16 2006 for DT2005.panorama by  doxygen 1.4.7