#include <AngleSymbols.h>
Inheritance diagram for AngleSymbols:
Definition at line 22 of file AngleSymbols.h.
enum AngleSymbols::Angles |
The angle that is shown by the top white LEDs
Definition at line 55 of file AngleSymbols.h.
AngleSymbols::AngleSymbols | ( | const BehaviorControlInterfaces & | interfaces | ) |
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().
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().
Definition at line 108 of file AngleSymbols.h.
Referenced by AngleSymbols(), drawAngleShownByLeds(), GT2004BehaviorControl::postExecute(), and registerSymbols().