AngleSymbols Class Reference

#include <AngleSymbols.h>

Inheritance diagram for AngleSymbols:

Xabsl2FunctionProvider BehaviorControlInterfaces List of all members.

Public Types

 undefined
 angleToCenterOfField
 angleToOpponentGoal
 angleToLeftOpponentGoalPost
 angleToRightOpponentGoalPost
 angleToLeftOpponentGoalCorner
 angleToRightOpponentGoalCorner
 angleToPointBehindOpponentGoal
 angleToFreePartOfOpponentGoal
 bestAngleToOpponentGoal
 bestAngleToOpponentGoalNoObstacles
 bestAngleAwayFromOwnGoal
 bestAngleAwayFromOwnGoalNoObstacles
 goalieGoalKickAngle
 numberOfAngles
enum  Angles {
  undefined, angleToCenterOfField, angleToOpponentGoal, angleToLeftOpponentGoalPost,
  angleToRightOpponentGoalPost, angleToLeftOpponentGoalCorner, angleToRightOpponentGoalCorner, angleToPointBehindOpponentGoal,
  angleToFreePartOfOpponentGoal, bestAngleToOpponentGoal, bestAngleToOpponentGoalNoObstacles, bestAngleAwayFromOwnGoal,
  bestAngleAwayFromOwnGoalNoObstacles, goalieGoalKickAngle, numberOfAngles
}

Public Member Functions

 AngleSymbols (const BehaviorControlInterfaces &interfaces)
void registerSymbols (Xabsl2Engine &engine)
void update ()
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

static 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

Enumerator:
undefined 
angleToCenterOfField 
angleToOpponentGoal 
angleToLeftOpponentGoalPost 
angleToRightOpponentGoalPost 
angleToLeftOpponentGoalCorner 
angleToRightOpponentGoalCorner 
angleToPointBehindOpponentGoal 
angleToFreePartOfOpponentGoal 
bestAngleToOpponentGoal 
bestAngleToOpponentGoalNoObstacles 
bestAngleAwayFromOwnGoal 
bestAngleAwayFromOwnGoalNoObstacles 
goalieGoalKickAngle 
numberOfAngles 

Definition at line 55 of file AngleSymbols.h.


Constructor & Destructor Documentation

AngleSymbols::AngleSymbols ( const BehaviorControlInterfaces interfaces  ) 

Definition at line 23 of file AngleSymbols.cpp.

References angles, angleShownByLEDs, and undefined.


Member Function Documentation

void AngleSymbols::calculateCombinedAngles (  )  [private]

Definition at line 123 of file AngleSymbols.cpp.

References abs(), angles, Geometry::angleTo(), ObstaclesModel::angleToFreePartOfGoal, ObstaclesModel::angleToFreePartOfGoalWasDetermined, angleToFreePartOfOpponentGoal, angleToOpponentGoal, bestAngleAwayFromOwnGoal, bestAngleAwayFromOwnGoalNoObstacles, bestAngleToOpponentGoal, bestAngleToOpponentGoalNoObstacles, FieldDimensions::distanceToOpponentPenaltyArea(), fromDegrees(), Pose2D::getAngle(), ObstaclesModel::getAngleOfNextFreeSectorLeft(), ObstaclesModel::getAngleOfNextFreeSectorRight(), PlayerPoseCollection::getOwnPlayerPose(), RobotPose::getPose(), goalieGoalKickAngle, int(), normalize(), PlayerPoseCollection::numberOfOwnPlayers, BehaviorControlInterfaces::obstaclesModel, ObstaclesModel::opponentGoal, ObstaclesModel::ownGoal, pi, pi2, BehaviorControlInterfaces::playerPoseCollection, BehaviorControlInterfaces::robotPose, Pose2D::translation, and Vector2< V >::y.

Referenced by update().

void AngleSymbols::calculateLocalisationBasedAngles (  )  [private]

Definition at line 97 of file AngleSymbols.cpp.

References angles, Geometry::angleTo(), angleToCenterOfField, angleToLeftOpponentGoalCorner, angleToLeftOpponentGoalPost, angleToOpponentGoal, angleToPointBehindOpponentGoal, angleToRightOpponentGoalCorner, angleToRightOpponentGoalPost, pi2, and BehaviorControlInterfaces::robotPose.

Referenced by update().

void AngleSymbols::calculateVisionBasedAngles (  )  [private]

Definition at line 118 of file AngleSymbols.cpp.

References angles, ObstaclesModel::angleToFreePartOfGoal, angleToFreePartOfOpponentGoal, BehaviorControlInterfaces::obstaclesModel, and ObstaclesModel::opponentGoal.

Referenced by update().

void AngleSymbols::drawAngleShownByLeds (  ) 

Definition at line 351 of file AngleSymbols.cpp.

References angles, angleShownByLEDs, DEBUG_DRAWING_FINISHED, Pose2D::getAngle(), RobotPose::getPose(), Drawings::light_gray, LINE, Drawings::ps_solid, BehaviorControlInterfaces::robotPose, Pose2D::translation, Vector2< V >::x, and Vector2< V >::y.

Referenced by update().

double AngleSymbols::getAngle ( Angles  id  ) 

Definition at line 346 of file AngleSymbols.cpp.

References angles.

Referenced by GT2004BehaviorControl::postExecute().

static 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, goalieGoalKickAngle, and undefined.

Referenced by registerSymbols().

double AngleSymbols::getAngleToCenterOfField (  ) 

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

Definition at line 86 of file AngleSymbols.cpp.

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

Referenced by registerSymbols().

double AngleSymbols::getAngleToOpponentGoal (  ) 

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

Definition at line 87 of file AngleSymbols.cpp.

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

Referenced by registerSymbols().

double AngleSymbols::getAngleToPointBehindOpponentGoal (  ) 

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

Definition at line 88 of file AngleSymbols.cpp.

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

Referenced by registerSymbols().

double AngleSymbols::getBestAngleAwayFromOwnGoal (  ) 

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

Definition at line 93 of file AngleSymbols.cpp.

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

Referenced by registerSymbols().

double AngleSymbols::getBestAngleAwayFromOwnGoalNoObstacles (  ) 

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

Definition at line 94 of file AngleSymbols.cpp.

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

Referenced by registerSymbols().

double AngleSymbols::getBestAngleToOpponentGoal (  ) 

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

Definition at line 91 of file AngleSymbols.cpp.

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

Referenced by registerSymbols().

double AngleSymbols::getBestAngleToOpponentGoalNoObstacles (  ) 

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

Definition at line 92 of file AngleSymbols.cpp.

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

Referenced by registerSymbols().

double AngleSymbols::getGoalieGoalKickAngle (  ) 

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

Definition at line 95 of file AngleSymbols.cpp.

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

Referenced by registerSymbols().

void AngleSymbols::registerSymbols ( Xabsl2Engine engine  ) 

registers the symbols at an engine

Definition at line 31 of file AngleSymbols.cpp.

References angleShownByLEDs, getAngleName(), getAngleToCenterOfField(), getAngleToOpponentGoal(), getAngleToPointBehindOpponentGoal(), getBestAngleAwayFromOwnGoal(), getBestAngleAwayFromOwnGoalNoObstacles(), getBestAngleToOpponentGoal(), getBestAngleToOpponentGoalNoObstacles(), getGoalieGoalKickAngle(), getXmlString(), numberOfAngles, Xabsl2Symbols::registerDecimalInputSymbol(), Xabsl2Symbols::registerEnumeratedOutputSymbol(), and Xabsl2Symbols::registerEnumeratedOutputSymbolEnumElement().

Referenced by GT2004BehaviorControl::registerSymbolsAndBasicBehaviors().

void AngleSymbols::update (  ) 

updates the symbols

Definition at line 77 of file AngleSymbols.cpp.

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

Referenced by GT2004BehaviorControl::execute().


Member Data Documentation

double AngleSymbols::angles[numberOfAngles] [private]

Definition at line 115 of file AngleSymbols.h.

Referenced by AngleSymbols(), calculateCombinedAngles(), calculateLocalisationBasedAngles(), calculateVisionBasedAngles(), drawAngleShownByLeds(), getAngle(), getAngleToCenterOfField(), getAngleToOpponentGoal(), getAngleToPointBehindOpponentGoal(), getBestAngleAwayFromOwnGoal(), getBestAngleAwayFromOwnGoalNoObstacles(), getBestAngleToOpponentGoal(), getBestAngleToOpponentGoalNoObstacles(), and getGoalieGoalKickAngle().

Angles AngleSymbols::angleShownByLEDs

Definition at line 108 of file AngleSymbols.h.

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


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