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

# ChallengeSymbols Class Reference

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

`#include <ChallengeSymbols.h>`

Inheritance diagram for ChallengeSymbols:

[legend]
Collaboration diagram for ChallengeSymbols:

[legend]
List of all members.

## Public Member Functions
| ChallengeSymbols (const BehaviorControlInterfaces &interfaces)
void | registerSymbols (Xabsl2Engine &engine)
| registers the symbols at an engine
void | update ()
| updates the symbols
void | challenge2Swap (Pose2D *p, int i, int j)
void | challenge2ShortestPermutation (Pose2D *p, int n, double &minLength)
void | challenge2ShortestPath ()
void | challenge2OptimalRotation (Pose2D &pose)
double | _challenge2TargetPositionX ()
| Returns x coordinate of target position with current index.
double | _challenge2TargetPositionY ()
| Returns y coordinate of target position with current index.
double | _challenge2TargetPositionRotation ()
| Returns rotation of target position with current index.
double | challenge2TargetPositionX (double index)
| Returns x coordinate of target position with current index.
double | challenge2TargetPositionY (double index)
| Returns y coordinate of target position with current index.
double | challenge2TargetPositionRotation (double index)
| Returns rotation of target position with current index.
double | imageCharacteristicsAvgY ()
double | imageCharacteristicsAvgU ()
double | imageCharacteristicsAvgV ()
double | getProbableOrientation ()
double | getTimeSinceCenterCircleVisible ()
## Private Attributes
Pose2D | targetPositions [5]
| The 5 target positions for the localization challenge.
double | index
| the index for targetPosition? functions
double | lastIndex
| The index of the previous call.
unsigned long | lastSeenCenterCircle
double | timeSinceLastCenterCircle

## Detailed Description

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

Author:
  Thomas Röfer

Definition at line 20 of file ChallengeSymbols.h.

## Constructor & Destructor Documentation

ChallengeSymbols::ChallengeSymbols | ( | const BehaviorControlInterfaces & | interfaces | ) |

| Definition at line 17 of file ChallengeSymbols.cpp. References challenge2OptimalRotation(), InFile::exists(), getPlayer(), Player::getTeamColor(), targetPositions, Pose2D::translation, and Vector2< double >::x.

Here is the call graph for this function:

## Member Function Documentation

void ChallengeSymbols::registerSymbols | ( | Xabsl2Engine & | engine | ) |

| registers the symbols at an engine Definition at line 40 of file ChallengeSymbols.cpp. References _challenge2TargetPositionRotation(), _challenge2TargetPositionX(), _challenge2TargetPositionY(), SystemCall::getCurrentSystemTime(), getProbableOrientation(), getXmlString(), lastSeenCenterCircle, Xabsl2Symbols::registerBooleanInputSymbol(), Xabsl2Symbols::registerDecimalInputFunction(), Xabsl2Symbols::registerDecimalInputFunctionParameter(), Xabsl2Symbols::registerDecimalInputSymbol(), Xabsl2Symbols::registerEnumeratedOutputSymbol(), Xabsl2Symbols::registerEnumeratedOutputSymbolEnumElement(), SpecialPercept::slamData, and slamPercept. Referenced by GT2005BehaviorControl::registerSymbolsAndBasicBehaviors().

Here is the call graph for this function:

void ChallengeSymbols::update | ( |  | ) |

| updates the symbols Definition at line 114 of file ChallengeSymbols.cpp.

void ChallengeSymbols::challenge2Swap | ( | Pose2D * | p,
|  | int | i,
|  | int | j
| ) |

| Definition at line 222 of file ChallengeSymbols.cpp. Referenced by challenge2ShortestPermutation().

void ChallengeSymbols::challenge2ShortestPermutation | ( | Pose2D * | p,
|  | int | n,
|  | double & | minLength
| ) |

| Definition at line 200 of file ChallengeSymbols.cpp. References challenge2Swap(), targetPositions, and Pose2D::translation. Referenced by challenge2ShortestPath().

Here is the call graph for this function:

void ChallengeSymbols::challenge2ShortestPath | ( |  | ) |

| Definition at line 186 of file ChallengeSymbols.cpp. References challenge2ShortestPermutation(), and targetPositions. Referenced by challenge2TargetPositionRotation(), challenge2TargetPositionX(), and challenge2TargetPositionY().

Here is the call graph for this function:

void ChallengeSymbols::challenge2OptimalRotation | ( | Pose2D & | pose | ) |

| Definition at line 167 of file ChallengeSymbols.cpp. References pi, pi_2, Pose2D::rotation, Pose2D::translation, Vector2< double >::x, and Vector2< double >::y. Referenced by ChallengeSymbols().

double ChallengeSymbols::_challenge2TargetPositionX | ( |  | ) |

| Returns x coordinate of target position with current index. Definition at line 118 of file ChallengeSymbols.cpp. References challenge2TargetPositionX(). Referenced by registerSymbols().

Here is the call graph for this function:

double ChallengeSymbols::_challenge2TargetPositionY | ( |  | ) |

| Returns y coordinate of target position with current index. Definition at line 123 of file ChallengeSymbols.cpp. References challenge2TargetPositionY(). Referenced by registerSymbols().

Here is the call graph for this function:

double ChallengeSymbols::_challenge2TargetPositionRotation | ( |  | ) |

| Returns rotation of target position with current index. Definition at line 128 of file ChallengeSymbols.cpp. References challenge2TargetPositionRotation(). Referenced by registerSymbols().

Here is the call graph for this function:

double ChallengeSymbols::challenge2TargetPositionX | ( | double | index | ) |

| Returns x coordinate of target position with current index. Definition at line 133 of file ChallengeSymbols.cpp. References challenge2ShortestPath(), targetPositions, Pose2D::translation, and Vector2< double >::x. Referenced by _challenge2TargetPositionX(), and GT2005BehaviorControl::drawOptions().

Here is the call graph for this function:

double ChallengeSymbols::challenge2TargetPositionY | ( | double | index | ) |

| Returns y coordinate of target position with current index. Definition at line 139 of file ChallengeSymbols.cpp. References challenge2ShortestPath(), targetPositions, Pose2D::translation, and Vector2< double >::y. Referenced by _challenge2TargetPositionY(), and GT2005BehaviorControl::drawOptions().

Here is the call graph for this function:

double ChallengeSymbols::challenge2TargetPositionRotation | ( | double | index | ) |

| Returns rotation of target position with current index. Definition at line 145 of file ChallengeSymbols.cpp. References challenge2ShortestPath(), targetPositions, and toDegrees(). Referenced by _challenge2TargetPositionRotation().

Here is the call graph for this function:

double ChallengeSymbols::imageCharacteristicsAvgY | ( |  | ) |

| Definition at line 151 of file ChallengeSymbols.cpp. References SpecialPercept::slamData.

double ChallengeSymbols::imageCharacteristicsAvgU | ( |  | ) |

| Definition at line 156 of file ChallengeSymbols.cpp. References SpecialPercept::slamData.

double ChallengeSymbols::imageCharacteristicsAvgV | ( |  | ) |

| Definition at line 161 of file ChallengeSymbols.cpp. References SpecialPercept::slamData.

double ChallengeSymbols::getProbableOrientation | ( |  | ) |

| Definition at line 229 of file ChallengeSymbols.cpp. Referenced by registerSymbols().

double ChallengeSymbols::getTimeSinceCenterCircleVisible | ( |  | ) |

## Member Data Documentation

Pose2D ChallengeSymbols::targetPositions[5]`[private]`

| The 5 target positions for the localization challenge. Definition at line 55 of file ChallengeSymbols.h. Referenced by challenge2ShortestPath(), challenge2ShortestPermutation(), challenge2TargetPositionRotation(), challenge2TargetPositionX(), challenge2TargetPositionY(), and ChallengeSymbols().

double ChallengeSymbols::index`[private]`

| the index for targetPosition? functions Definition at line 56 of file ChallengeSymbols.h.

double ChallengeSymbols::lastIndex`[private]`

| The index of the previous call. Definition at line 56 of file ChallengeSymbols.h.

unsigned long ChallengeSymbols::lastSeenCenterCircle`[private]`

| Definition at line 59 of file ChallengeSymbols.h. Referenced by registerSymbols().

double ChallengeSymbols::timeSinceLastCenterCircle`[private]`

| Definition at line 60 of file ChallengeSymbols.h.

The documentation for this class was generated from the following files:

- Modules/BehaviorControl/CommonXabsl2Symbols/ChallengeSymbols.h
- Modules/BehaviorControl/CommonXabsl2Symbols/ChallengeSymbols.cpp