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

GT2005BehaviorControl Class Reference

A Behavior based on the Xabsl2Engine that is used by GermanTeam for the RoboCup 2005. More...

#include <GT2005BehaviorControl.h>

Inheritance diagram for GT2005BehaviorControl:

Inheritance graph
[legend]
Collaboration diagram for GT2005BehaviorControl:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 GT2005BehaviorControl (BehaviorControlInterfaces &interfaces)
 Constructor.

 ~GT2005BehaviorControl ()
 destructor

virtual void registerSymbolsAndBasicBehaviors ()
 Registers symbols and basic behaviors at the engine.

void preExecute ()
 Sets some varibles for leds and sound before the execution of the engine.

virtual void execute ()
 Executes the module.

void postExecute ()
 Sets some variables for head motion and sound after the execution of the engine.

void drawOptions ()
 paints some debug drawings that visualize the current option activation path

void declareDrawingsForBasicBehaviors ()
 declares all debug drawings for basic behaviors

virtual bool handleMessage (InMessage &message)
 Is called for every incoming debug message.


Private Attributes

KickLogger kickLogger
bool quickStop
 If quickStop is true, the robot just stands.

bool timeSync
 If timeSync is true, the robot stands and waits for sync with remote cam.

bool syncTimestampSent
 timestamp sent

unsigned char initialBrightness
 estimated Brightness on timeSync reset

int faceInfo
 information to show on face during timesync

bool backFrontWasPressed
 true if backFront was pressed during timesync

int timeSyncHeadControlMode
 HeadControlMode during timesync.

bool backBackWasPressed
 true if backBack was pressed during timesync

HeadControlMode debugHeadControlMode
 Indicates which HeadControlMode is set, when the robot is demobilized (quick stop).

unsigned char IP
 the last part of the own IP

Symbols
CalibrationSymbols calibrationSymbols
AngleSymbols angleSymbols
BallSymbols ballSymbols
GT2005ConfigurationSymbols configurationSymbols
HeadAndTailSymbols headAndTailSymbols
JoystickSymbols joystickSymbols
LEDAndSoundSymbols ledAndSoundSymbols
KickSelectionSymbols kickSelectionSymbols
MathFunctions mathFunctions
MotionRequestSymbols motionRequestSymbols
ObstaclesSymbols obstaclesSymbols
RoboCupGameManagerSymbols roboCupGameManagerSymbols
RobotPoseSymbols robotPoseSymbols
RobotStateSymbols robotStateSymbols
SpecialVisionSymbols specialVisionSymbols
GT2005StrategySymbols strategySymbols
ChallengeSymbols challengeSymbols
OpenChallengeSymbols openchallengeSymbols
GTCamSymbols gtCamSymbols
FieldSymbols fieldSymbols
KickLoggerSymbols kickLoggerSymbols
PassSymbols passSymbols
PlayersSymbols playersSymbols
TestSymbols testSymbols
Basic Behaviors
GT2005SimpleBasicBehaviors simpleBasicBehaviors
GT2005PotentialFieldBasicBehaviors potentialFieldBasicBehaviors
CommonBasicBehaviors commonBasicBehaviors
GT2005WalkCalibrationBasicBehaviors gt2005WalkCalibrationBasicBehaviors

Detailed Description

A Behavior based on the Xabsl2Engine that is used by GermanTeam for the RoboCup 2005.

Author:
Martin Lötzsch

Matthias Jüngel

Definition at line 56 of file GT2005BehaviorControl.h.


Constructor & Destructor Documentation

GT2005BehaviorControl::GT2005BehaviorControl BehaviorControlInterfaces interfaces  ) 
 

Constructor.

Parameters:
interfaces The paramters of the BehaviorControl module.

Definition at line 15 of file GT2005BehaviorControl.cpp.

References ASSERT, backBackWasPressed, backFrontWasPressed, InFile::exists(), faceInfo, GTXabsl2EngineExecutor::init(), initialBrightness, IP, quickStop, syncTimestampSent, timeSync, and timeSyncHeadControlMode.

Here is the call graph for this function:

GT2005BehaviorControl::~GT2005BehaviorControl  ) 
 

destructor

Definition at line 78 of file GT2005BehaviorControl.cpp.


Member Function Documentation

void GT2005BehaviorControl::registerSymbolsAndBasicBehaviors  )  [virtual]
 

Registers symbols and basic behaviors at the engine.

Implements GTXabsl2EngineExecutor.

Definition at line 82 of file GT2005BehaviorControl.cpp.

References angleSymbols, ballSymbols, calibrationSymbols, challengeSymbols, commonBasicBehaviors, configurationSymbols, fieldSymbols, gt2005WalkCalibrationBasicBehaviors, gtCamSymbols, headAndTailSymbols, joystickSymbols, kickLoggerSymbols, kickSelectionSymbols, ledAndSoundSymbols, mathFunctions, motionRequestSymbols, obstaclesSymbols, openchallengeSymbols, passSymbols, playersSymbols, potentialFieldBasicBehaviors, GT2005WalkCalibrationBasicBehaviors::registerBasicBehaviors(), CommonBasicBehaviors::registerBasicBehaviors(), GT2005PotentialFieldBasicBehaviors::registerBasicBehaviors(), GT2005SimpleBasicBehaviors::registerBasicBehaviors(), TestSymbols::registerSymbols(), PassSymbols::registerSymbols(), PlayersSymbols::registerSymbols(), KickLoggerSymbols::registerSymbols(), FieldSymbols::registerSymbols(), ChallengeSymbols::registerSymbols(), OpenChallengeSymbols::registerSymbols(), GT2005StrategySymbols::registerSymbols(), SpecialVisionSymbols::registerSymbols(), RobotStateSymbols::registerSymbols(), RobotPoseSymbols::registerSymbols(), RoboCupGameManagerSymbols::registerSymbols(), ObstaclesSymbols::registerSymbols(), MotionRequestSymbols::registerSymbols(), MathFunctions::registerSymbols(), KickSelectionSymbols::registerSymbols(), LEDAndSoundSymbols::registerSymbols(), JoystickSymbols::registerSymbols(), HeadAndTailSymbols::registerSymbols(), GT2005ConfigurationSymbols::registerSymbols(), GTCamSymbols::registerSymbols(), BallSymbols::registerSymbols(), AngleSymbols::registerSymbols(), CalibrationSymbols::registerSymbols(), roboCupGameManagerSymbols, robotPoseSymbols, robotStateSymbols, simpleBasicBehaviors, specialVisionSymbols, strategySymbols, and testSymbols.

Here is the call graph for this function:

void GT2005BehaviorControl::preExecute  ) 
 

Sets some varibles for leds and sound before the execution of the engine.

Definition at line 114 of file GT2005BehaviorControl.cpp.

References AngleSymbols::angleShownByLEDs, angleSymbols, LEDRequest::backFrontWhiteLED, LEDRequest::backMiddleOrangeLED, LEDRequest::backMiddleWhiteLED, LEDRequest::backRearWhiteLED, BallModel::ballWasSeen, BallModel::communicated, LEDRequest::faceLED, SystemCall::getTimeSince(), HeadControlMode::headControlMode, LEDRequest::headOrangeLED, LEDRequest::headWhiteLED, BehaviorTeamMessage::message, BallModel::seen, SoundRequest::soundID, MotionRequest::tailRequest, TailRequest::tailRequestID, CommunicatedBallState::timeWhenLastObserved, and SeenBallState::timeWhenLastSeen.

Referenced by execute().

Here is the call graph for this function:

void GT2005BehaviorControl::execute  )  [virtual]
 

Executes the module.

Reimplemented from Module.

Definition at line 156 of file GT2005BehaviorControl.cpp.

References angleSymbols, ballSymbols, configurationSymbols, declareDrawingsForBasicBehaviors(), drawOptions(), KickLogger::execute(), GTXabsl2EngineExecutor::executeEngine(), kickLogger, kickLoggerSymbols, obstaclesSymbols, openchallengeSymbols, postExecute(), potentialFieldBasicBehaviors, preExecute(), roboCupGameManagerSymbols, robotPoseSymbols, strategySymbols, testSymbols, KickLoggerSymbols::update(), GT2005PotentialFieldBasicBehaviors::update(), TestSymbols::update(), OpenChallengeSymbols::update(), GT2005StrategySymbols::update(), RobotPoseSymbols::update(), RoboCupGameManagerSymbols::update(), ObstaclesSymbols::update(), GT2005ConfigurationSymbols::update(), BallSymbols::update(), and AngleSymbols::update().

Here is the call graph for this function:

void GT2005BehaviorControl::postExecute  ) 
 

Sets some variables for head motion and sound after the execution of the engine.

Definition at line 187 of file GT2005BehaviorControl.cpp.

References Vector2< double >::abs(), AngleSymbols::angleShownByLEDs, angleSymbols, AngleSymbols::angleUsedForPerfectAngle, backBackWasPressed, LEDRequest::backFrontBlueLED, backFrontWasPressed, LEDRequest::backFrontWhiteLED, LEDRequest::backMiddleOrangeLED, LEDRequest::backMiddleWhiteLED, LEDRequest::backRearRedLED, LEDRequest::backRearWhiteLED, BallState::ballRollsByLeft, BallState::ballRollsByRight, BallState::ballRollsFast, BallState::ballRollsTowardsRobot, BallModel::ballWasSeen, SensorData::data, DEBUG_RESPONSE, debugHeadControlMode, SpecialPercept::estimatedImageBrightness, MotionInfo::executedMotionRequest, faceInfo, LEDRequest::faceLED, SensorDataBuffer::frame, BehaviorTeamMessage::gameState, AngleSymbols::getAngle(), RobotState::getButtonDuration(), RobotState::getButtonPressed(), SystemCall::getCurrentSystemTime(), getPlayer(), Player::getPlayerNumber(), SystemCall::getRemainingPower(), RobotState::getState(), Player::getTeamColor(), RobotPose::getValidity(), HeadControlMode::headControlMode, idSyncTimestampRobot, initialBrightness, IP, SensorDataBuffer::lastFrame(), min, MotionRequest::motionType, normalize(), OUTPUT, BallState::positionField, GTXabsl2Profiler::profilerCollectMode, GTXabsl2Profiler::profilerWriteMode, quickStop, GT2005StrategySymbols::role, BallModel::seen, SoundRequest::soundID, SpecialVisionRequest::specialVisionRequest, strategySymbols, syncTimestampSent, timeSync, timeSyncHeadControlMode, toDegrees(), MotionRequest::walkRequest, and WalkRequest::walkType.

Referenced by execute().

Here is the call graph for this function:

void GT2005BehaviorControl::drawOptions  ) 
 

paints some debug drawings that visualize the current option activation path

Definition at line 818 of file GT2005BehaviorControl.cpp.

References Xabsl2Option::activeState, ChallengeSymbols::challenge2TargetPositionX(), ChallengeSymbols::challenge2TargetPositionY(), challengeSymbols, RobotPose::getPose(), Xabsl2Engine::getRootOption(), Xabsl2NamedItem::n, NCIRCLE, NCOMPLEX_DRAWING, NDECLARE_DEBUGDRAWING, NLINE, NRECTANGLE, Xabsl2State::subsequentOption, Pose2D::translation, Vector2< double >::x, and Vector2< double >::y.

Referenced by execute().

Here is the call graph for this function:

void GT2005BehaviorControl::declareDrawingsForBasicBehaviors  ) 
 

declares all debug drawings for basic behaviors

Definition at line 909 of file GT2005BehaviorControl.cpp.

References NDECLARE_DEBUGDRAWING.

Referenced by execute().

bool GT2005BehaviorControl::handleMessage InMessage message  )  [virtual]
 

Is called for every incoming debug message.

Parameters:
message An interface to read the message from the queue
Returns:
if the messag was read

Reimplemented from Xabsl2BehaviorControl.

Definition at line 916 of file GT2005BehaviorControl.cpp.

References KickSelectionSymbols::handleMessage(), Xabsl2BehaviorControl::handleMessage(), and kickSelectionSymbols.

Here is the call graph for this function:


Member Data Documentation

CalibrationSymbols GT2005BehaviorControl::calibrationSymbols [private]
 

Definition at line 96 of file GT2005BehaviorControl.h.

Referenced by registerSymbolsAndBasicBehaviors().

AngleSymbols GT2005BehaviorControl::angleSymbols [private]
 

Definition at line 97 of file GT2005BehaviorControl.h.

Referenced by execute(), postExecute(), preExecute(), and registerSymbolsAndBasicBehaviors().

BallSymbols GT2005BehaviorControl::ballSymbols [private]
 

Definition at line 98 of file GT2005BehaviorControl.h.

Referenced by execute(), and registerSymbolsAndBasicBehaviors().

GT2005ConfigurationSymbols GT2005BehaviorControl::configurationSymbols [private]
 

Definition at line 99 of file GT2005BehaviorControl.h.

Referenced by execute(), and registerSymbolsAndBasicBehaviors().

HeadAndTailSymbols GT2005BehaviorControl::headAndTailSymbols [private]
 

Definition at line 100 of file GT2005BehaviorControl.h.

Referenced by registerSymbolsAndBasicBehaviors().

JoystickSymbols GT2005BehaviorControl::joystickSymbols [private]
 

Definition at line 101 of file GT2005BehaviorControl.h.

Referenced by registerSymbolsAndBasicBehaviors().

LEDAndSoundSymbols GT2005BehaviorControl::ledAndSoundSymbols [private]
 

Definition at line 102 of file GT2005BehaviorControl.h.

Referenced by registerSymbolsAndBasicBehaviors().

KickSelectionSymbols GT2005BehaviorControl::kickSelectionSymbols [private]
 

Definition at line 103 of file GT2005BehaviorControl.h.

Referenced by handleMessage(), and registerSymbolsAndBasicBehaviors().

MathFunctions GT2005BehaviorControl::mathFunctions [private]
 

Definition at line 104 of file GT2005BehaviorControl.h.

Referenced by registerSymbolsAndBasicBehaviors().

MotionRequestSymbols GT2005BehaviorControl::motionRequestSymbols [private]
 

Definition at line 105 of file GT2005BehaviorControl.h.

Referenced by registerSymbolsAndBasicBehaviors().

ObstaclesSymbols GT2005BehaviorControl::obstaclesSymbols [private]
 

Definition at line 106 of file GT2005BehaviorControl.h.

Referenced by execute(), and registerSymbolsAndBasicBehaviors().

RoboCupGameManagerSymbols GT2005BehaviorControl::roboCupGameManagerSymbols [private]
 

Definition at line 107 of file GT2005BehaviorControl.h.

Referenced by execute(), and registerSymbolsAndBasicBehaviors().

RobotPoseSymbols GT2005BehaviorControl::robotPoseSymbols [private]
 

Definition at line 108 of file GT2005BehaviorControl.h.

Referenced by execute(), and registerSymbolsAndBasicBehaviors().

RobotStateSymbols GT2005BehaviorControl::robotStateSymbols [private]
 

Definition at line 109 of file GT2005BehaviorControl.h.

Referenced by registerSymbolsAndBasicBehaviors().

SpecialVisionSymbols GT2005BehaviorControl::specialVisionSymbols [private]
 

Definition at line 110 of file GT2005BehaviorControl.h.

Referenced by registerSymbolsAndBasicBehaviors().

GT2005StrategySymbols GT2005BehaviorControl::strategySymbols [private]
 

Definition at line 111 of file GT2005BehaviorControl.h.

Referenced by execute(), postExecute(), and registerSymbolsAndBasicBehaviors().

ChallengeSymbols GT2005BehaviorControl::challengeSymbols [private]
 

Definition at line 112 of file GT2005BehaviorControl.h.

Referenced by drawOptions(), and registerSymbolsAndBasicBehaviors().

OpenChallengeSymbols GT2005BehaviorControl::openchallengeSymbols [private]
 

Definition at line 113 of file GT2005BehaviorControl.h.

Referenced by execute(), and registerSymbolsAndBasicBehaviors().

GTCamSymbols GT2005BehaviorControl::gtCamSymbols [private]
 

Definition at line 114 of file GT2005BehaviorControl.h.

Referenced by registerSymbolsAndBasicBehaviors().

FieldSymbols GT2005BehaviorControl::fieldSymbols [private]
 

Definition at line 115 of file GT2005BehaviorControl.h.

Referenced by registerSymbolsAndBasicBehaviors().

KickLoggerSymbols GT2005BehaviorControl::kickLoggerSymbols [private]
 

Definition at line 116 of file GT2005BehaviorControl.h.

Referenced by execute(), and registerSymbolsAndBasicBehaviors().

PassSymbols GT2005BehaviorControl::passSymbols [private]
 

Definition at line 117 of file GT2005BehaviorControl.h.

Referenced by registerSymbolsAndBasicBehaviors().

PlayersSymbols GT2005BehaviorControl::playersSymbols [private]
 

Definition at line 118 of file GT2005BehaviorControl.h.

Referenced by registerSymbolsAndBasicBehaviors().

TestSymbols GT2005BehaviorControl::testSymbols [private]
 

Definition at line 119 of file GT2005BehaviorControl.h.

Referenced by execute(), and registerSymbolsAndBasicBehaviors().

GT2005SimpleBasicBehaviors GT2005BehaviorControl::simpleBasicBehaviors [private]
 

Definition at line 124 of file GT2005BehaviorControl.h.

Referenced by registerSymbolsAndBasicBehaviors().

GT2005PotentialFieldBasicBehaviors GT2005BehaviorControl::potentialFieldBasicBehaviors [private]
 

Definition at line 125 of file GT2005BehaviorControl.h.

Referenced by execute(), and registerSymbolsAndBasicBehaviors().

CommonBasicBehaviors GT2005BehaviorControl::commonBasicBehaviors [private]
 

Definition at line 126 of file GT2005BehaviorControl.h.

Referenced by registerSymbolsAndBasicBehaviors().

GT2005WalkCalibrationBasicBehaviors GT2005BehaviorControl::gt2005WalkCalibrationBasicBehaviors [private]
 

Definition at line 127 of file GT2005BehaviorControl.h.

Referenced by registerSymbolsAndBasicBehaviors().

KickLogger GT2005BehaviorControl::kickLogger [private]
 

Definition at line 135 of file GT2005BehaviorControl.h.

Referenced by execute().

bool GT2005BehaviorControl::quickStop [private]
 

If quickStop is true, the robot just stands.

Definition at line 138 of file GT2005BehaviorControl.h.

Referenced by GT2005BehaviorControl(), and postExecute().

bool GT2005BehaviorControl::timeSync [private]
 

If timeSync is true, the robot stands and waits for sync with remote cam.

Definition at line 141 of file GT2005BehaviorControl.h.

Referenced by GT2005BehaviorControl(), and postExecute().

bool GT2005BehaviorControl::syncTimestampSent [private]
 

timestamp sent

Definition at line 144 of file GT2005BehaviorControl.h.

Referenced by GT2005BehaviorControl(), and postExecute().

unsigned char GT2005BehaviorControl::initialBrightness [private]
 

estimated Brightness on timeSync reset

Definition at line 147 of file GT2005BehaviorControl.h.

Referenced by GT2005BehaviorControl(), and postExecute().

int GT2005BehaviorControl::faceInfo [private]
 

information to show on face during timesync

Definition at line 150 of file GT2005BehaviorControl.h.

Referenced by GT2005BehaviorControl(), and postExecute().

bool GT2005BehaviorControl::backFrontWasPressed [private]
 

true if backFront was pressed during timesync

Definition at line 153 of file GT2005BehaviorControl.h.

Referenced by GT2005BehaviorControl(), and postExecute().

int GT2005BehaviorControl::timeSyncHeadControlMode [private]
 

HeadControlMode during timesync.

Definition at line 156 of file GT2005BehaviorControl.h.

Referenced by GT2005BehaviorControl(), and postExecute().

bool GT2005BehaviorControl::backBackWasPressed [private]
 

true if backBack was pressed during timesync

Definition at line 159 of file GT2005BehaviorControl.h.

Referenced by GT2005BehaviorControl(), and postExecute().

HeadControlMode GT2005BehaviorControl::debugHeadControlMode [private]
 

Indicates which HeadControlMode is set, when the robot is demobilized (quick stop).

Definition at line 162 of file GT2005BehaviorControl.h.

Referenced by postExecute().

unsigned char GT2005BehaviorControl::IP [private]
 

the last part of the own IP

Definition at line 165 of file GT2005BehaviorControl.h.

Referenced by GT2005BehaviorControl(), and postExecute().


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