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, angleToOpponentGoal,
  angleToLeftOpponentGoalPost, angleToRightOpponentGoalPost, angleToLeftOpponentGoalCorner,
  angleToRightOpponentGoalCorner, angleToPointBehindOpponentGoal, angleToFreePartOfOpponentGoal,
  bestAngleToOpponentGoal, bestAngleToOpponentGoalNoObstacles, bestAngleAwayFromOwnGoal,
  bestAngleAwayFromOwnGoalNoObstacles, goalieGoalKickAngle, 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 ()
Input symbols
double getAngleToCenterOfField ()
double getAngleToOpponentGoal ()
double getAngleToPointBehindOpponentGoal ()
double getBestAngleToOpponentGoal ()
double getBestAngleToOpponentGoalNoObstacles ()
double getBestAngleAwayFromOwnGoal ()
double getBestAngleAwayFromOwnGoalNoObstacles ()
double getGoalieGoalKickAngle ()

Static Public Member Functions

const char * getAngleName (Angles id)

Public Attributes

Angles angleShownByLEDs

Private Member Functions

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

Private Attributes

double angles [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 
angleToOpponentGoal 
angleToLeftOpponentGoalPost 
angleToRightOpponentGoalPost 
angleToLeftOpponentGoalCorner 
angleToRightOpponentGoalCorner 
angleToPointBehindOpponentGoal 
angleToFreePartOfOpponentGoal 
bestAngleToOpponentGoal 
bestAngleToOpponentGoalNoObstacles 
bestAngleAwayFromOwnGoal 
bestAngleAwayFromOwnGoalNoObstacles 
goalieGoalKickAngle 
numberOfAngles 

Definition at line 55 of file AngleSymbols.h.

Referenced by registerSymbols().


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(), getAngleToCenterOfField(), getAngleToOpponentGoal(), getAngleToPointBehindOpponentGoal(), getBestAngleAwayFromOwnGoal(), getBestAngleAwayFromOwnGoalNoObstacles(), getBestAngleToOpponentGoal(), getBestAngleToOpponentGoalNoObstacles(), getGoalieGoalKickAngle(), getXmlString(), numberOfAngles, Xabsl2Symbols::registerDecimalInputSymbol(), Xabsl2Symbols::registerEnumeratedOutputSymbol(), and Xabsl2Symbols::registerEnumeratedOutputSymbolEnumElement().

Referenced by GT2004BehaviorControl::registerSymbolsAndBasicBehaviors().

Here is the call graph for this function:

void AngleSymbols::update  ) 
 

updates the symbols

Definition at line 70 of file AngleSymbols.cpp.

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

Referenced by GT2004BehaviorControl::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 79 of file AngleSymbols.cpp.

References angleToCenterOfField, 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 80 of file AngleSymbols.cpp.

References 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 81 of file AngleSymbols.cpp.

References angleToPointBehindOpponentGoal, normalize(), 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 84 of file AngleSymbols.cpp.

References 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 85 of file AngleSymbols.cpp.

References bestAngleToOpponentGoalNoObstacles, 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 86 of file AngleSymbols.cpp.

References 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 87 of file AngleSymbols.cpp.

References 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 88 of file AngleSymbols.cpp.

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

Referenced by registerSymbols().

Here is the call graph for this function:

double AngleSymbols::getAngle Angles  id  ) 
 

Definition at line 337 of file AngleSymbols.cpp.

Referenced by GT2004BehaviorControl::postExecute().

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

Definition at line 81 of file AngleSymbols.h.

References angleToCenterOfField, angleToFreePartOfOpponentGoal, angleToLeftOpponentGoalCorner, angleToLeftOpponentGoalPost, angleToOpponentGoal, angleToPointBehindOpponentGoal, angleToRightOpponentGoalCorner, angleToRightOpponentGoalPost, bestAngleAwayFromOwnGoal, bestAngleAwayFromOwnGoalNoObstacles, bestAngleToOpponentGoal, bestAngleToOpponentGoalNoObstacles, and goalieGoalKickAngle.

Referenced by registerSymbols().

void AngleSymbols::drawAngleShownByLeds  ) 
 

Definition at line 342 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::calculateVisionBasedAngles  )  [private]
 

Definition at line 111 of file AngleSymbols.cpp.

References ObstaclesModel::angleToFreePartOfGoal, and angleToFreePartOfOpponentGoal.

Referenced by update().

void AngleSymbols::calculateLocalisationBasedAngles  )  [private]
 

Definition at line 90 of file AngleSymbols.cpp.

References Geometry::angleTo(), angleToCenterOfField, 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 116 of file AngleSymbols.cpp.

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

Referenced by update().

Here is the call graph for this function:


Member Data Documentation

Angles AngleSymbols::angleShownByLEDs
 

Definition at line 108 of file AngleSymbols.h.

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

double AngleSymbols::angles[numberOfAngles] [private]
 

Definition at line 115 of file AngleSymbols.h.


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