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

AngleSymbols Class Reference

The Xabsl2 symbols that are defined in "angle-symbols.xml". More...

#include <AngleSymbols.h>

Inheritance diagram for AngleSymbols:

Inheritance graph
[legend]
Collaboration diagram for AngleSymbols:

Collaboration graph
[legend]
List of all members.

Public Types

enum  Angles {
  undefined, angleToCenterOfField, angleToBbSupporter,
  angleToOpponentGoal, angleToLeftOpponentGoalPost, angleToRightOpponentGoalPost,
  angleToLeftOpponentGoalCorner, angleToRightOpponentGoalCorner, angleToPointBehindOpponentGoal,
  angleToCenterOfOpponentPenaltyArea, angleToFreePartOfOpponentGoalLeft, angleToFreePartOfOpponentGoalRight,
  angleToFreePartOfOpponentGoal, widthOfFreePartOfOpponentGoal, perfectAngleToOpponentGoal,
  bestAngleToOpponentGoal, bestWidthOfOpponentGoal, bestAngleToOpponentGoalNoObstacles,
  bestWidthOfOpponentGoalNoObstacles, bestAngleAwayFromOwnGoal, bestAngleAwayFromOwnGoalNoObstacles,
  goalieGoalKickAngle, seenAngleToOpponentGoal, testAngle,
  numberOfAngles
}
 The angle that is shown by the top white LEDs. More...


Public Member Functions

 AngleSymbols (const BehaviorControlInterfaces &interfaces)
void registerSymbols (Xabsl2Engine &engine)
 registers the symbols at an engine

void update ()
 updates the symbols

double getAngle (Angles id)
void drawAngleShownByLeds ()
void drawAngles ()
Input symbols
double getAngleToCenterOfField ()
double getAngleToBbSupporter ()
double getAngleToOpponentGoal ()
double getAngleToPointBehindOpponentGoal ()
double getAngleToCenterOfOpponentPenaltyArea ()
double getPerfectAngleToOpponentGoal ()
double getBestAngleToOpponentGoal ()
double getBestAngleToOpponentGoalNoObstacles ()
double getBestWidthOfOpponentGoal ()
double getBestWidthOfOpponentGoalNoObstacles ()
double getBestAngleAwayFromOwnGoal ()
double getBestAngleAwayFromOwnGoalNoObstacles ()
double getGoalieGoalKickAngle ()
double getTimeSinceOpponentGoalDetection ()
double getSeenAngleToOpponentGoal ()
double getTimeSinceLastSeenOpponentGoal ()
bool getTrustOfSeenAngleToOpponentGoal ()
double getTestAngle ()

Static Public Member Functions

const char * getAngleName (Angles id)

Public Attributes

Angles angleShownByLEDs
Angles angleUsedForPerfectAngle

Private Member Functions

void setTestAngle ()
void calculateVisionBasedAngles ()
void calculateLocalisationBasedAngles ()
void calculateCombinedAngles ()

Private Attributes

double angles [numberOfAngles]
bool angleIsUsedByTheCurrentBehavior [numberOfAngles]

Detailed Description

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

Author:
Matthias Jüngel

Definition at line 22 of file AngleSymbols.h.


Member Enumeration Documentation

enum AngleSymbols::Angles
 

The angle that is shown by the top white LEDs.

Enumeration values:
undefined 
angleToCenterOfField 
angleToBbSupporter 
angleToOpponentGoal 
angleToLeftOpponentGoalPost 
angleToRightOpponentGoalPost 
angleToLeftOpponentGoalCorner 
angleToRightOpponentGoalCorner 
angleToPointBehindOpponentGoal 
angleToCenterOfOpponentPenaltyArea 
angleToFreePartOfOpponentGoalLeft 
angleToFreePartOfOpponentGoalRight 
angleToFreePartOfOpponentGoal 
widthOfFreePartOfOpponentGoal 
perfectAngleToOpponentGoal 
bestAngleToOpponentGoal 
bestWidthOfOpponentGoal 
bestAngleToOpponentGoalNoObstacles 
bestWidthOfOpponentGoalNoObstacles 
bestAngleAwayFromOwnGoal 
bestAngleAwayFromOwnGoalNoObstacles 
goalieGoalKickAngle 
seenAngleToOpponentGoal 
testAngle 
numberOfAngles 

Definition at line 72 of file AngleSymbols.h.

Referenced by drawAngles(), registerSymbols(), and setTestAngle().


Constructor & Destructor Documentation

AngleSymbols::AngleSymbols const BehaviorControlInterfaces interfaces  ) 
 

Definition at line 16 of file AngleSymbols.cpp.

References angleShownByLEDs.


Member Function Documentation

void AngleSymbols::registerSymbols Xabsl2Engine engine  ) 
 

registers the symbols at an engine

Definition at line 24 of file AngleSymbols.cpp.

References Angles, angleShownByLEDs, getAngleName(), getAngleToBbSupporter(), getAngleToCenterOfField(), getAngleToCenterOfOpponentPenaltyArea(), getAngleToOpponentGoal(), getAngleToPointBehindOpponentGoal(), getBestAngleAwayFromOwnGoal(), getBestAngleAwayFromOwnGoalNoObstacles(), getBestAngleToOpponentGoal(), getBestAngleToOpponentGoalNoObstacles(), getBestWidthOfOpponentGoal(), getBestWidthOfOpponentGoalNoObstacles(), getGoalieGoalKickAngle(), getPerfectAngleToOpponentGoal(), getSeenAngleToOpponentGoal(), getTestAngle(), getTimeSinceLastSeenOpponentGoal(), getTimeSinceOpponentGoalDetection(), getTrustOfSeenAngleToOpponentGoal(), getXmlString(), numberOfAngles, Xabsl2Symbols::registerBooleanInputSymbol(), Xabsl2Symbols::registerDecimalInputSymbol(), Xabsl2Symbols::registerEnumeratedOutputSymbol(), and Xabsl2Symbols::registerEnumeratedOutputSymbolEnumElement().

Referenced by GT2005BehaviorControl::registerSymbolsAndBasicBehaviors().

Here is the call graph for this function:

void AngleSymbols::update  ) 
 

updates the symbols

Definition at line 99 of file AngleSymbols.cpp.

References calculateCombinedAngles(), calculateLocalisationBasedAngles(), calculateVisionBasedAngles(), drawAngles(), drawAngleShownByLeds(), and setTestAngle().

Referenced by GT2005BehaviorControl::execute().

Here is the call graph for this function:

double AngleSymbols::getAngleToCenterOfField  ) 
 

calculates the value for the symbol "robot-pose.best-angle-away-from-own-goal"

Definition at line 110 of file AngleSymbols.cpp.

References angleIsUsedByTheCurrentBehavior, angleToCenterOfField, normalize(), and toDegrees().

Referenced by registerSymbols().

Here is the call graph for this function:

double AngleSymbols::getAngleToBbSupporter  ) 
 

calculates the value for the symbol "robot-pose.best-angle-away-from-own-goal"

Definition at line 111 of file AngleSymbols.cpp.

References angleIsUsedByTheCurrentBehavior, angleToBbSupporter, normalize(), and toDegrees().

Referenced by registerSymbols().

Here is the call graph for this function:

double AngleSymbols::getAngleToOpponentGoal  ) 
 

A function for the symbol "robot-pose.angle-to-opponent-goal"

Definition at line 112 of file AngleSymbols.cpp.

References angleIsUsedByTheCurrentBehavior, angleToOpponentGoal, normalize(), and toDegrees().

Referenced by registerSymbols().

Here is the call graph for this function:

double AngleSymbols::getAngleToPointBehindOpponentGoal  ) 
 

calculates the value for the symbol "robot-pose.angle-to-point-behind-opponent-goal"

Definition at line 113 of file AngleSymbols.cpp.

References angleIsUsedByTheCurrentBehavior, angleToPointBehindOpponentGoal, normalize(), and toDegrees().

Referenced by registerSymbols().

Here is the call graph for this function:

double AngleSymbols::getAngleToCenterOfOpponentPenaltyArea  ) 
 

calculates the value for the symbol "robot-pose.angle-to-center-of-opponent-penalty-area"

Definition at line 114 of file AngleSymbols.cpp.

References angleIsUsedByTheCurrentBehavior, angleToCenterOfOpponentPenaltyArea, normalize(), and toDegrees().

Referenced by registerSymbols().

Here is the call graph for this function:

double AngleSymbols::getPerfectAngleToOpponentGoal  ) 
 

calculates the value for the symbol "robot-pose.best-angle-to-opponent-goal"

Definition at line 117 of file AngleSymbols.cpp.

References angleIsUsedByTheCurrentBehavior, normalize(), perfectAngleToOpponentGoal, and toDegrees().

Referenced by registerSymbols().

Here is the call graph for this function:

double AngleSymbols::getBestAngleToOpponentGoal  ) 
 

calculates the value for the symbol "robot-pose.best-angle-to-opponent-goal"

Definition at line 119 of file AngleSymbols.cpp.

References angleIsUsedByTheCurrentBehavior, bestAngleToOpponentGoal, normalize(), and toDegrees().

Referenced by registerSymbols().

Here is the call graph for this function:

double AngleSymbols::getBestAngleToOpponentGoalNoObstacles  ) 
 

calculates the value for the symbol "robot-pose.best-angle-to-opponent-goal-no-obstacles"

Definition at line 120 of file AngleSymbols.cpp.

References angleIsUsedByTheCurrentBehavior, bestAngleToOpponentGoalNoObstacles, normalize(), and toDegrees().

Referenced by registerSymbols().

Here is the call graph for this function:

double AngleSymbols::getBestWidthOfOpponentGoal  ) 
 

calculates the value for the symbol "robot-pose.best-width-of-opponent-goal"

Definition at line 121 of file AngleSymbols.cpp.

References angleIsUsedByTheCurrentBehavior, bestWidthOfOpponentGoal, normalize(), and toDegrees().

Referenced by registerSymbols().

Here is the call graph for this function:

double AngleSymbols::getBestWidthOfOpponentGoalNoObstacles  ) 
 

calculates the value for the symbol "robot-pose.best-width-of-opponent-goal-no-obstacles"

Definition at line 122 of file AngleSymbols.cpp.

References angleIsUsedByTheCurrentBehavior, bestWidthOfOpponentGoalNoObstacles, normalize(), and toDegrees().

Referenced by registerSymbols().

Here is the call graph for this function:

double AngleSymbols::getBestAngleAwayFromOwnGoal  ) 
 

calculates the value for the symbol "robot-pose.best-angle-away-from-own-goal"

Definition at line 123 of file AngleSymbols.cpp.

References angleIsUsedByTheCurrentBehavior, bestAngleAwayFromOwnGoal, normalize(), and toDegrees().

Referenced by registerSymbols().

Here is the call graph for this function:

double AngleSymbols::getBestAngleAwayFromOwnGoalNoObstacles  ) 
 

calculates the value for the symbol "robot-pose.best-angle-away-from-own-goal-no-obstacles"

Definition at line 124 of file AngleSymbols.cpp.

References angleIsUsedByTheCurrentBehavior, bestAngleAwayFromOwnGoalNoObstacles, normalize(), and toDegrees().

Referenced by registerSymbols().

Here is the call graph for this function:

double AngleSymbols::getGoalieGoalKickAngle  ) 
 

calculates the value for the symbol "goalie.goal-kick-angle"

Definition at line 125 of file AngleSymbols.cpp.

References angleIsUsedByTheCurrentBehavior, goalieGoalKickAngle, normalize(), and toDegrees().

Referenced by registerSymbols().

Here is the call graph for this function:

double AngleSymbols::getTimeSinceOpponentGoalDetection  ) 
 

calculates the value for the symbol "angle.time-since-opponent-goal-detected" />

Definition at line 168 of file AngleSymbols.cpp.

References SystemCall::getTimeSince(), and ObstaclesModel::lastTimeFreePartOfGoalWasDetermined.

Referenced by registerSymbols().

Here is the call graph for this function:

double AngleSymbols::getSeenAngleToOpponentGoal  ) 
 

calculates the value for the symbol "angle.seen-angle-to-opponent-goal"

Definition at line 128 of file AngleSymbols.cpp.

References angleIsUsedByTheCurrentBehavior, normalize(), seenAngleToOpponentGoal, and toDegrees().

Referenced by registerSymbols().

Here is the call graph for this function:

double AngleSymbols::getTimeSinceLastSeenOpponentGoal  ) 
 

calculates the value for the symbol "angle.time-since-last-seen-opponent-goal" />

Definition at line 163 of file AngleSymbols.cpp.

References SystemCall::getTimeSince(), and ObstaclesModel::timeOfSeenGoal.

Referenced by registerSymbols().

Here is the call graph for this function:

bool AngleSymbols::getTrustOfSeenAngleToOpponentGoal  ) 
 

calculates the value for the symbol "robot-pose.best-angle-away-from-own-goal"

Definition at line 173 of file AngleSymbols.cpp.

References ObstaclesModel::trustSeenGoal.

Referenced by registerSymbols().

double AngleSymbols::getTestAngle  ) 
 

calculates the value for the symbol "robot-pose.best-angle-away-from-own-goal"

Definition at line 127 of file AngleSymbols.cpp.

References angleIsUsedByTheCurrentBehavior, normalize(), testAngle, and toDegrees().

Referenced by registerSymbols().

Here is the call graph for this function:

double AngleSymbols::getAngle Angles  id  ) 
 

Definition at line 322 of file AngleSymbols.cpp.

Referenced by GT2005BehaviorControl::postExecute().

const char* AngleSymbols::getAngleName Angles  id  )  [inline, static]
 

Definition at line 111 of file AngleSymbols.h.

References angleToBbSupporter, angleToCenterOfField, angleToCenterOfOpponentPenaltyArea, angleToFreePartOfOpponentGoal, angleToFreePartOfOpponentGoalLeft, angleToFreePartOfOpponentGoalRight, angleToLeftOpponentGoalCorner, angleToLeftOpponentGoalPost, angleToOpponentGoal, angleToPointBehindOpponentGoal, angleToRightOpponentGoalCorner, angleToRightOpponentGoalPost, bestAngleAwayFromOwnGoal, bestAngleAwayFromOwnGoalNoObstacles, bestAngleToOpponentGoal, bestAngleToOpponentGoalNoObstacles, bestWidthOfOpponentGoal, bestWidthOfOpponentGoalNoObstacles, goalieGoalKickAngle, perfectAngleToOpponentGoal, seenAngleToOpponentGoal, testAngle, and widthOfFreePartOfOpponentGoal.

Referenced by drawAngles(), and registerSymbols().

void AngleSymbols::drawAngleShownByLeds  ) 
 

Definition at line 327 of file AngleSymbols.cpp.

References angleShownByLEDs, DEBUG_DRAWING_FINISHED, Pose2D::getAngle(), RobotPose::getPose(), LINE, Pose2D::translation, Vector2< double >::x, and Vector2< double >::y.

Referenced by update().

Here is the call graph for this function:

void AngleSymbols::drawAngles  ) 
 

Definition at line 350 of file AngleSymbols.cpp.

References ANGLEDRAWING, angleIsUsedByTheCurrentBehavior, Angles, angleToCenterOfField, angleToCenterOfOpponentPenaltyArea, angleToOpponentGoal, angleToPointBehindOpponentGoal, bestAngleAwayFromOwnGoal, bestAngleAwayFromOwnGoalNoObstacles, bestAngleToOpponentGoal, bestAngleToOpponentGoalNoObstacles, bestWidthOfOpponentGoal, bestWidthOfOpponentGoalNoObstacles, DEBUG_RESPONSE, Pose2D::getAngle(), getAngleName(), RobotPose::getPose(), goalieGoalKickAngle, idText, NDECLARE_DEBUGDRAWING, NLINE, numberOfAngles, OUTPUT, perfectAngleToOpponentGoal, seenAngleToOpponentGoal, testAngle, Pose2D::translation, Vector2< double >::x, and Vector2< double >::y.

Referenced by update().

Here is the call graph for this function:

void AngleSymbols::setTestAngle  )  [private]
 

Definition at line 396 of file AngleSymbols.cpp.

References Angles, bestAngleAwayFromOwnGoal, bestAngleToOpponentGoal, bestAngleToOpponentGoalNoObstacles, DEBUG_RESPONSE, MODIFY, seenAngleToOpponentGoal, and testAngle.

Referenced by update().

void AngleSymbols::calculateVisionBasedAngles  )  [private]
 

Definition at line 153 of file AngleSymbols.cpp.

References ObstaclesModel::angleToFreePartOfGoal, angleToFreePartOfOpponentGoal, angleToFreePartOfOpponentGoalLeft, angleToFreePartOfOpponentGoalRight, ObstaclesModel::angleToSeenGoal, seenAngleToOpponentGoal, ObstaclesModel::widthOfFreePartOfGoal, and widthOfFreePartOfOpponentGoal.

Referenced by update().

void AngleSymbols::calculateLocalisationBasedAngles  )  [private]
 

Definition at line 130 of file AngleSymbols.cpp.

References Geometry::angleTo(), angleToBbSupporter, angleToCenterOfField, angleToCenterOfOpponentPenaltyArea, angleToLeftOpponentGoalCorner, angleToLeftOpponentGoalPost, angleToOpponentGoal, angleToPointBehindOpponentGoal, angleToRightOpponentGoalCorner, angleToRightOpponentGoalPost, and pi2.

Referenced by update().

Here is the call graph for this function:

void AngleSymbols::calculateCombinedAngles  )  [private]
 

Definition at line 177 of file AngleSymbols.cpp.

References Geometry::angleTo(), ObstaclesModel::angleToFreePartOfGoal, ObstaclesModel::angleToFreePartOfGoalWasDetermined, angleToFreePartOfOpponentGoal, angleToOpponentGoal, angleUsedForPerfectAngle, bestAngleAwayFromOwnGoal, bestAngleAwayFromOwnGoalNoObstacles, bestAngleToOpponentGoal, bestAngleToOpponentGoalNoObstacles, bestWidthOfOpponentGoal, bestWidthOfOpponentGoalNoObstacles, FieldDimensions::distanceToOpponentPenaltyArea(), fromDegrees(), Pose2D::getAngle(), ObstaclesModel::getAngleOfNextFreeSectorLeft(), ObstaclesModel::getAngleOfNextFreeSectorRight(), SystemCall::getCurrentSystemTime(), PlayerPoseCollection::getOwnPlayerPose(), PlayerPose::getPose(), goalieGoalKickAngle, normalize(), PlayerPoseCollection::numberOfOwnPlayers, perfectAngleToOpponentGoal, pi, pi2, seenAngleToOpponentGoal, ObstaclesModel::timeOfSeenGoal, Pose2D::translation, ObstaclesModel::trustSeenGoal, widthOfFreePartOfOpponentGoal, and Vector2< double >::y.

Referenced by update().

Here is the call graph for this function:


Member Data Documentation

Angles AngleSymbols::angleShownByLEDs
 

Definition at line 152 of file AngleSymbols.h.

Referenced by AngleSymbols(), drawAngleShownByLeds(), GT2005BehaviorControl::postExecute(), GT2005BehaviorControl::preExecute(), and registerSymbols().

Angles AngleSymbols::angleUsedForPerfectAngle
 

Definition at line 155 of file AngleSymbols.h.

Referenced by calculateCombinedAngles(), and GT2005BehaviorControl::postExecute().

double AngleSymbols::angles[numberOfAngles] [private]
 

Definition at line 162 of file AngleSymbols.h.

bool AngleSymbols::angleIsUsedByTheCurrentBehavior[numberOfAngles] [private]
 

Definition at line 163 of file AngleSymbols.h.

Referenced by drawAngles(), getAngleToBbSupporter(), getAngleToCenterOfField(), getAngleToCenterOfOpponentPenaltyArea(), getAngleToOpponentGoal(), getAngleToPointBehindOpponentGoal(), getBestAngleAwayFromOwnGoal(), getBestAngleAwayFromOwnGoalNoObstacles(), getBestAngleToOpponentGoal(), getBestAngleToOpponentGoalNoObstacles(), getBestWidthOfOpponentGoal(), getBestWidthOfOpponentGoalNoObstacles(), getGoalieGoalKickAngle(), getPerfectAngleToOpponentGoal(), getSeenAngleToOpponentGoal(), and getTestAngle().


The documentation for this class was generated from the following files:
Generated on Mon Mar 20 22:10:52 2006 for GT2005 by doxygen 1.3.6