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

Modules/BehaviorControl/GT2005BehaviorControl/GT2005BehaviorControl.h

Go to the documentation of this file.
00001 /**
00002 * @file GT2005BehaviorControl.h
00003 * 
00004 * Implementation of class GT2005BehaviorControl.
00005 *
00006 * @author Martin Lötzsch
00007 * @author Matthias Jüngel
00008 */
00009 
00010 #ifndef __GT2005BehaviorControl_h_
00011 #define __GT2005BehaviorControl_h_
00012 
00013 #include "../Xabsl2BehaviorControl.h"
00014 
00015 #include "GT2005BasicBehaviors/GT2005SimpleBasicBehaviors.h"
00016 #include "GT2005BasicBehaviors/GT2005PotentialFieldBasicBehaviors.h"
00017 #include "GT2005BasicBehaviors/GT2005WalkCalibrationBasicBehaviors.h"
00018 #include "../CommonXabsl2BasicBehaviors/CommonBasicBehaviors.h"
00019 
00020 #include "../CommonXabsl2Symbols/CalibrationSymbols.h"
00021 #include "../CommonXabsl2Symbols/AngleSymbols.h"
00022 #include "../CommonXabsl2Symbols/BallSymbols.h"
00023 #include "../CommonXabsl2Symbols/GtCamSymbols.h"
00024 #include "../CommonXabsl2Symbols/HeadAndTailSymbols.h"
00025 #include "../CommonXabsl2Symbols/JoystickSymbols.h"
00026 #include "../CommonXabsl2Symbols/LEDAndSoundSymbols.h"
00027 #include "../CommonXabsl2Symbols/KickSelectionSymbols.h"
00028 #include "../CommonXabsl2Symbols/MathFunctions.h"
00029 #include "../CommonXabsl2Symbols/MotionRequestSymbols.h"
00030 #include "../CommonXabsl2Symbols/ObstaclesSymbols.h"
00031 #include "../CommonXabsl2Symbols/RoboCupGameManagerSymbols.h"
00032 #include "../CommonXabsl2Symbols/RobotPoseSymbols.h"
00033 #include "../CommonXabsl2Symbols/RobotStateSymbols.h"
00034 #include "../CommonXabsl2Symbols/SpecialVisionSymbols.h"
00035 #include "../CommonXabsl2Symbols/ChallengeSymbols.h"
00036 #include "../CommonXabsl2Symbols/FieldSymbols.h"
00037 #include "../CommonXabsl2Symbols/PlayersSymbols.h"
00038 #include "../CommonXabsl2Symbols/PassSymbols.h"
00039 #include "GT2005Symbols/GT2005StrategySymbols.h"
00040 #include "GT2005Symbols/GT2005ConfigurationSymbols.h"
00041 #include "GT2005Symbols/OpenChallengeSymbols.h"
00042 #include "GT2005Symbols/KickLoggerSymbols.h"
00043 #include "GT2005Symbols/TestSymbols.h"
00044 
00045 #include "../KickLogger.h"
00046 
00047 /**
00048 * @class GT2005BehaviorControl
00049 *
00050 * A Behavior based on the Xabsl2Engine that is used by GermanTeam
00051 * for the RoboCup 2005.
00052 *
00053 * @author Martin Lötzsch
00054 * @author Matthias Jüngel
00055 */ 
00056 class GT2005BehaviorControl : public Xabsl2BehaviorControl
00057 {
00058 public:
00059   /** 
00060   * Constructor.
00061   * @param interfaces The paramters of the BehaviorControl module.
00062   */
00063   GT2005BehaviorControl(BehaviorControlInterfaces& interfaces);
00064 
00065   /** destructor */
00066   ~GT2005BehaviorControl();
00067 
00068   /** Registers symbols and basic behaviors at the engine */
00069   virtual void registerSymbolsAndBasicBehaviors();
00070   
00071   /** Sets some varibles for leds and sound before the execution of the engine */
00072   void preExecute();
00073 
00074   /** Executes the module */
00075   virtual void execute();
00076 
00077   /** Sets some variables for head motion and sound after the execution of the engine */
00078   void postExecute();
00079 
00080   /** paints some debug drawings that visualize the current option activation path */
00081   void drawOptions();
00082 
00083   /** declares all debug drawings for basic behaviors */
00084   void declareDrawingsForBasicBehaviors();
00085 
00086   /** 
00087   * Is called for every incoming debug message.
00088   * @param message An interface to read the message from the queue
00089   * @return if the messag was read
00090   */
00091   virtual bool handleMessage(InMessage& message);
00092 
00093 private:
00094   //!@name Symbols
00095   //!@{
00096   CalibrationSymbols calibrationSymbols;
00097   AngleSymbols angleSymbols;
00098   BallSymbols ballSymbols;
00099   GT2005ConfigurationSymbols configurationSymbols;
00100   HeadAndTailSymbols headAndTailSymbols;
00101   JoystickSymbols joystickSymbols;
00102   LEDAndSoundSymbols ledAndSoundSymbols;
00103   KickSelectionSymbols kickSelectionSymbols;
00104   MathFunctions mathFunctions;
00105   MotionRequestSymbols motionRequestSymbols;
00106   ObstaclesSymbols obstaclesSymbols;
00107   RoboCupGameManagerSymbols roboCupGameManagerSymbols;
00108   RobotPoseSymbols robotPoseSymbols;
00109   RobotStateSymbols robotStateSymbols;
00110   SpecialVisionSymbols specialVisionSymbols;
00111   GT2005StrategySymbols strategySymbols;
00112   ChallengeSymbols challengeSymbols;
00113   OpenChallengeSymbols openchallengeSymbols;
00114   GTCamSymbols gtCamSymbols;
00115   FieldSymbols fieldSymbols;
00116   KickLoggerSymbols kickLoggerSymbols;
00117   PassSymbols passSymbols;
00118   PlayersSymbols playersSymbols;
00119   TestSymbols testSymbols;
00120   //!@}
00121 
00122   //!@name Basic Behaviors
00123   //!@{
00124   GT2005SimpleBasicBehaviors simpleBasicBehaviors;
00125   GT2005PotentialFieldBasicBehaviors potentialFieldBasicBehaviors;
00126   CommonBasicBehaviors commonBasicBehaviors;
00127   GT2005WalkCalibrationBasicBehaviors gt2005WalkCalibrationBasicBehaviors;
00128   //!@}
00129 
00130 
00131   /*
00132   * Runs in parallel to the behavior control and logs the preconditions
00133   * and results of each kick.
00134   */
00135   KickLogger kickLogger;
00136 
00137   /** If quickStop is true, the robot just stands */
00138   bool quickStop;
00139 
00140   /** If timeSync is true, the robot stands and waits for sync with remote cam */
00141   bool timeSync;
00142 
00143   /** timestamp sent */
00144   bool syncTimestampSent;
00145 
00146   /** estimated Brightness on timeSync reset*/
00147   unsigned char initialBrightness;
00148 
00149   /** information to show on face during timesync*/
00150   int faceInfo;
00151 
00152   /** true if backFront was pressed during timesync*/
00153   bool backFrontWasPressed;
00154 
00155   /** HeadControlMode during timesync*/
00156   int timeSyncHeadControlMode;
00157 
00158   /** true if backBack was pressed during timesync*/
00159   bool backBackWasPressed;
00160 
00161   /** Indicates which HeadControlMode is set, when the robot is demobilized (quick stop)*/
00162   HeadControlMode debugHeadControlMode;
00163 
00164   /** the last part of the own IP*/
00165   unsigned char IP;
00166 };
00167 
00168 #endif// __GT2005BehaviorControl_h_

Generated on Mon Mar 20 21:59:43 2006 for GT2005 by doxygen 1.3.6