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

Modules/BehaviorControl/GT2004BehaviorControl/GT2004BehaviorControl.h

Go to the documentation of this file.
00001 /**
00002 * @file GT2004BehaviorControl.h
00003 * 
00004 * Implementation of class GT2004BehaviorControl.
00005 *
00006 * @author Martin Lötzsch
00007 * @author Matthias Jüngel
00008 */
00009 
00010 #ifndef __GT2004BehaviorControl_h_
00011 #define __GT2004BehaviorControl_h_
00012 
00013 #include "../Xabsl2BehaviorControl.h"
00014 
00015 #include "GT2004BasicBehaviors/GT2004SimpleBasicBehaviors.h"
00016 #include "GT2004BasicBehaviors/GT2004EvolutionBasicBehaviors.h"
00017 #include "GT2004BasicBehaviors/GT2004PotentialFieldBasicBehaviors.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/HeadAndTailSymbols.h"
00024 #include "../CommonXabsl2Symbols/JoystickSymbols.h"
00025 #include "../CommonXabsl2Symbols/LEDAndSoundSymbols.h"
00026 #include "../CommonXabsl2Symbols/KickSelectionSymbols.h"
00027 #include "../CommonXabsl2Symbols/MathFunctions.h"
00028 #include "../CommonXabsl2Symbols/MotionRequestSymbols.h"
00029 #include "../CommonXabsl2Symbols/ObstaclesSymbols.h"
00030 #include "../CommonXabsl2Symbols/RoboCupGameManagerSymbols.h"
00031 #include "../CommonXabsl2Symbols/RobotPoseSymbols.h"
00032 #include "../CommonXabsl2Symbols/RobotStateSymbols.h"
00033 #include "../CommonXabsl2Symbols/SpecialVisionSymbols.h"
00034 #include "../CommonXabsl2Symbols/ChallengeSymbols.h"
00035 #include "GT2004Symbols/GT2004StrategySymbols.h"
00036 #include "GT2004Symbols/GT2004ConfigurationSymbols.h"
00037 #include "GT2004Symbols/EvolutionSymbols.h"
00038 #include "GT2004Symbols/OpenChallengeSymbols.h"
00039 
00040 #include "../KickLogger.h"
00041 
00042 
00043 // Includes for DynamicTeamTactic
00044 #include "Tools/DynamicTeamTactic/CollectedBeliefs.h"
00045 #include "Tools/DynamicTeamTactic/OptionRating.h"
00046 #include "Tools/DynamicTeamTactic/TacticChooser.h"
00047 #include "Tools/DynamicTeamTactic/RateableOptions.h"
00048 #include "GT2004Symbols/GT2004DTTSymbols.h"
00049 #include "Tools/DynamicTeamTactic/ChooserRaterInterfaces.h"
00050 #include "GT2004DTT/DefaultOptionRating.h"
00051 #include "GT2004DTT/DefaultTacticChooser.h"
00052 
00053 
00054 /**
00055 * @class GT2004BehaviorControl
00056 *
00057 * A Behavior based on the Xabsl2Engine that is used by GermanTeam
00058 * for the RoboCup 2004.
00059 *
00060 * @author Martin Lötzsch
00061 * @author Matthias Jüngel
00062 */ 
00063 class GT2004BehaviorControl : public Xabsl2BehaviorControl
00064 {
00065 public:
00066   /** 
00067   * Constructor.
00068   * @param interfaces The paramters of the BehaviorControl module.
00069   */
00070   GT2004BehaviorControl(BehaviorControlInterfaces& interfaces);
00071 
00072   /** destructor */
00073   ~GT2004BehaviorControl();
00074 
00075   /** Registers symbols and basic behaviors at the engine */
00076   virtual void registerSymbolsAndBasicBehaviors();
00077   
00078   /** Sets some varibles for leds and sound before the execution of the engine */
00079   void preExecute();
00080 
00081   /** Executes the module */
00082   virtual void execute();
00083 
00084   /** Sets some variables for head motion and sound after the execution of the engine */
00085   void postExecute();
00086 
00087   /** 
00088   * Is called for every incoming debug message.
00089   * @param message An interface to read the message from the queue
00090   * @return if the messag was read
00091   */
00092   virtual bool handleMessage(InMessage& message);
00093 
00094 private:
00095   //!@name Symbols
00096   //!@{
00097   CalibrationSymbols calibrationSymbols;
00098   AngleSymbols angleSymbols;
00099   BallSymbols ballSymbols;
00100   GT2004ConfigurationSymbols configurationSymbols;
00101   HeadAndTailSymbols headAndTailSymbols;
00102   JoystickSymbols joystickSymbols;
00103   LEDAndSoundSymbols ledAndSoundSymbols;
00104   KickSelectionSymbols kickSelectionSymbols;
00105   MathFunctions mathFunctions;
00106   MotionRequestSymbols motionRequestSymbols;
00107   ObstaclesSymbols obstaclesSymbols;
00108   RoboCupGameManagerSymbols roboCupGameManagerSymbols;
00109   RobotPoseSymbols robotPoseSymbols;
00110   RobotStateSymbols robotStateSymbols;
00111   SpecialVisionSymbols specialVisionSymbols;
00112   GT2004StrategySymbols strategySymbols;
00113   EvolutionSymbols evolutionSymbols;
00114   ChallengeSymbols challengeSymbols;
00115   OpenChallengeSymbols openchallengeSymbols;
00116   GT2004DTTSymbols dttSymbols;
00117   //!@}
00118 
00119   //!@name Basic Behaviors
00120   //!@{
00121   GT2004SimpleBasicBehaviors simpleBasicBehaviors;
00122   GT2004EvolutionBasicBehaviors evolutionBasicBehaviors;
00123   GT2004PotentialFieldBasicBehaviors potentialFieldBasicBehaviors;
00124   CommonBasicBehaviors commonBasicBehaviors;
00125   //!@}
00126 
00127   //!@name GT2004 Evolution stuff
00128   //!@{
00129   GT2004ParametersSet gt2004ParametersSet;
00130   GT2004Parameters gt2004ExtraParameters;
00131   Pose2D gt2004ParametersCalibration[128];
00132   Pose2D measurementRequest;
00133   int evolutionMode;
00134   int gt2004CurrentIndex;
00135   //!@}
00136 
00137   /*
00138   * Runs in parallel to the behavior control and logs the preconditions
00139   * and results of each kick.
00140   */
00141   KickLogger kickLogger;
00142 
00143   /** If quickStop is true, the robot just stands */
00144   bool quickStop;
00145 
00146   /** Indicates which HeadControlMode is set, when the robot is demobilized (quick stop)*/
00147   HeadControlMode debugHeadControlMode;
00148 
00149   // DynamicTeamTactic Section
00150   ChooserRaterInterfaces chooserRaterInterfaces;
00151   
00152   // CollectedBeliefs Structure
00153   CollectedBeliefs collectedBeliefs;
00154 
00155   // OptionRating engine(s)
00156   OptionRating* optionRating[RateableOptions::numOfOptionRatings];
00157   // The actual choosen OptionRating
00158   OptionRating* actualOptionRating;
00159 
00160   // TacticChooser engine(s)
00161   TacticChooser* tacticChooser[RateableOptions::numOfTacticChoosers];
00162   // The actual choosen OptionRating
00163   TacticChooser* actualTacticChooser;
00164 
00165 };
00166 
00167 #endif// __GT2004BehaviorControl_h_
00168 
00169 /* * Change log :
00170  * 
00171  * $Log: GT2004BehaviorControl.h,v $
00172  * Revision 1.14  2004/07/22 22:38:19  kerdels
00173  * added DTT used by Open Challenge, RIP and Xabsl-Options will follow
00174  *
00175  * Revision 1.13  2004/07/14 20:34:17  spranger
00176  * removed continous-basic-behaviors
00177  *
00178  * Revision 1.12  2004/07/10 00:13:59  spranger
00179  * renaming for coderelease and preparations for gt2005
00180  *
00181  * Revision 1.11  2004/06/22 18:48:56  juengel
00182  * kickAngles clean up
00183  *
00184  * Revision 1.10  2004/06/16 14:43:51  risler
00185  * added obstacles symbols
00186  * added symbol obstacles.opponent-close-to-ball
00187  *
00188  * Revision 1.9  2004/06/08 18:36:12  juengel
00189  * Added  "debugHeadControlMode".
00190  *
00191  * Revision 1.8  2004/06/02 10:56:25  juengel
00192  * quickStop added
00193  *
00194  * Revision 1.7  2004/05/29 18:18:19  dueffert
00195  * walk parameter evolution, measurement and calibration stuff ported to GT2004_WM
00196  *
00197  * Revision 1.6  2004/05/27 16:48:08  loetzsch
00198  * added the kick logger
00199  *
00200  * Revision 1.5  2004/05/25 12:58:17  tim
00201  * added missing potential field files and example behavior
00202  *
00203  * Revision 1.4  2004/05/24 16:35:20  spranger
00204  * removed doProfiling
00205  *
00206  * Revision 1.3  2004/05/22 21:33:33  loetzsch
00207  * adopted kick selection table to GT2004
00208  *
00209  * Revision 1.2  2004/05/22 21:31:04  loetzsch
00210  * adopted kick selection table to GT2004
00211  *
00212  * Revision 1.1.1.1  2004/05/22 17:17:59  cvsadm
00213  * created new repository GT2004_WM
00214  *
00215  * Revision 1.3  2004/05/08 16:18:13  hamerla
00216  * Open Challenge
00217  *
00218  * Revision 1.2  2004/05/04 10:48:58  loetzsch
00219  * replaced all enums
00220  * xxxBehaviorControlTimeAfterWhichCommunicatedBallsAreAccepted
00221  * by
00222  * behaviorControlTimeAfterWhichCommunicatedBallsAreAccepted
00223  * (this mechanism was neither fully implemented nor used)
00224  *
00225  * Revision 1.1  2004/05/02 13:26:42  juengel
00226  * Added GT2004BehaviorControl.
00227  *
00228  */

Generated on Thu Sep 23 19:57:26 2004 for GT2004 by doxygen 1.3.6