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

Modules/BehaviorControl/BehaviorControl.h

Go to the documentation of this file.
00001 /**
00002 * @file BehaviorControl.h
00003 * 
00004 * Implementation of class BehaviorControl
00005 */
00006 
00007 #ifndef __BehaviorControl_h_
00008 #define __BehaviorControl_h_
00009 
00010 
00011 #ifdef _WIN32
00012 #pragma warning(disable:4786) 
00013 // the constructor with all it's long parameter type names results in a too
00014 // long debug identifier
00015 #endif
00016 
00017 
00018 #include "Tools/Module/Module.h"
00019 
00020 #include "Representations/Cognition/RobotPose.h"
00021 #include "Representations/Cognition/BallModel.h"
00022 #include "Representations/Cognition/PlayerPoseCollection.h"
00023 #include "Representations/Cognition/ObstaclesModel.h"
00024 #include "Representations/Cognition/RobotState.h"
00025 #include "Representations/Cognition/SampleSet.h"
00026 #include "Representations/Motion/MotionInfo.h"
00027 #include "Representations/Motion/LEDRequest.h"
00028 #include "Representations/Motion/HeadControlMode.h"
00029 #include "Representations/Motion/OdometryData.h"
00030 #include "Representations/Sound/SoundRequest.h"
00031 #include "Representations/Perception/SpecialPercept.h"
00032 #include "Representations/Perception/SpecialVisionRequest.h"
00033 #include "Representations/Perception/CalibrationRequest.h"
00034 #include "Representations/Perception/SensorDataBuffer.h"
00035 #include "Representations/RoboCup/GameControlData.h"
00036 #include "Representations/WLan/TeamMessageCollection.h"
00037 #include "Representations/JoystickData.h"
00038 #include "Tools/MessageQueue/InMessage.h"
00039 #include "Modules/WalkingEngine/InvKinWalkingParameters.h"
00040 #include "Modules/WalkingEngine/GT2004ParameterSet.h"
00041 #include "Representations/Perception/PSDPercept.h"
00042 
00043 
00044 /**
00045 * @class BehaviorControlInterfaces
00046 * 
00047 * The interfaces of the BehaviorControl module.
00048 */
00049 class BehaviorControlInterfaces
00050 {
00051 public:
00052   /** Constructor.*/
00053   BehaviorControlInterfaces(
00054     const RobotPose& robotPose,
00055     const BallModel& ballModel,
00056     const PlayerPoseCollection& playerPoseCollection,
00057     const ObstaclesModel& obstaclesModel,
00058     const RobotState& robotState,
00059     const MotionInfo& motionInfo,
00060     const SpecialPercept& specialPercept,
00061     const TeamMessageCollection& teamMessageCollection,
00062     const JoystickData& joystickData,
00063     const OdometryData& odometryData,
00064     const SampleSetProxy<PoseSample>& selfLocatorSamples,
00065     const SensorDataBuffer& sensorDataBuffer,
00066     const PSDPercept& psdPercept,
00067 
00068     GameControlData& gameControlData,
00069     MotionRequest& motionRequest,
00070     LEDRequest& ledRequest,
00071     HeadControlMode& headControlMode,
00072     SoundRequest& soundRequest,
00073     InvKinWalkingParameters& invKinWalkingParameters,
00074     GT2004Parameters& gt2004Parameters,
00075     unsigned long& walkParameterTimeStamp,
00076     SpecialVisionRequest& specialVisionRequest,
00077     CalibrationRequest& calibrationRequest,
00078     BehaviorTeamMessage& outgoingBehaviorTeamMessage)
00079 
00080     : robotPose(robotPose),
00081     ballModel(ballModel),
00082     playerPoseCollection(playerPoseCollection),
00083     obstaclesModel(obstaclesModel),
00084     robotState(robotState),
00085     motionInfo(motionInfo),
00086     specialPercept(specialPercept),
00087     teamMessageCollection(teamMessageCollection),
00088     joystickData(joystickData),
00089     odometryData(odometryData),
00090     selfLocatorSamples(selfLocatorSamples),
00091     sensorDataBuffer(sensorDataBuffer),
00092     psdPercept(psdPercept),
00093     gameControlData(gameControlData),
00094     motionRequest(motionRequest),
00095     ledRequest(ledRequest),
00096     headControlMode(headControlMode),
00097     soundRequest(soundRequest),
00098     invKinWalkingParameters(invKinWalkingParameters),
00099     gt2004Parameters(gt2004Parameters),
00100     walkParameterTimeStamp(walkParameterTimeStamp),
00101     specialVisionRequest(specialVisionRequest),
00102     calibrationRequest(calibrationRequest),
00103     outgoingBehaviorTeamMessage(outgoingBehaviorTeamMessage)
00104   {}
00105   
00106 protected:
00107   /** The robots position and orientation */
00108   const RobotPose& robotPose;
00109   
00110   /** The position and the speed of the ball */
00111   const BallModel& ballModel;
00112   
00113   /** The positions of the own and opponent players */
00114   const PlayerPoseCollection& playerPoseCollection;
00115 
00116   /** The positions of the obstacles */
00117   const ObstaclesModel& obstaclesModel;
00118   
00119   /** Pressed switches and fall downs */
00120   const RobotState& robotState;
00121 
00122   /** The motions that are currently executed by the MotionControl */
00123   const MotionInfo& motionInfo;
00124   
00125   /** Special percepts for challenges */
00126   const SpecialPercept& specialPercept;
00127   
00128   /** Messages from teammates */
00129   const TeamMessageCollection& teamMessageCollection;
00130   
00131   /** Data produced by an extern sensor called joystick */
00132   const JoystickData& joystickData;
00133   
00134   /** Odomety Data */
00135   const OdometryData& odometryData;
00136 
00137   /**  The sample set proxy linked to the sample set of the active locator */
00138   const SampleSetProxy<PoseSample>& selfLocatorSamples;
00139 
00140   /** The sensor data */
00141   const SensorDataBuffer& sensorDataBuffer;
00142 
00143   /** The PSDPercept*/
00144   const PSDPercept& psdPercept;
00145 
00146   /** Messages that are sent by the referee */ 
00147   GameControlData& gameControlData;
00148   
00149   /** The motion request to be set by the behavior */
00150   MotionRequest& motionRequest;
00151   
00152   /** The led request to be set by the behavior */
00153   LEDRequest& ledRequest;
00154   
00155   /** The head control mode to be set by the behavior */
00156   HeadControlMode& headControlMode;
00157   
00158   /** The acoustic message to be set by the behavior */
00159   SoundRequest& soundRequest;
00160 
00161   /** walking parameter sets to be used by the WalkingEngine, eg calculated by evolution behavior */
00162   InvKinWalkingParameters& invKinWalkingParameters;
00163   GT2004Parameters& gt2004Parameters;
00164   unsigned long& walkParameterTimeStamp;
00165   
00166   /** A request for special vision modules for challenges */
00167   SpecialVisionRequest& specialVisionRequest;
00168   
00169   /** A request for calibration */
00170   CalibrationRequest& calibrationRequest;
00171   
00172   /** Messages to teammates */
00173   BehaviorTeamMessage& outgoingBehaviorTeamMessage;
00174 };
00175 
00176 /**
00177 * @class BehaviorControl 
00178 *
00179 * The Base class for behavior controls
00180 */
00181 class BehaviorControl : public Module, public BehaviorControlInterfaces
00182 {
00183 public:
00184 /*
00185 * Constructor.
00186 * @param interfaces The paramters of the BehaviorControl module.
00187   */
00188   BehaviorControl(const BehaviorControlInterfaces& interfaces)
00189     : BehaviorControlInterfaces(interfaces)
00190   {}
00191   
00192   /** Destructor */
00193   virtual ~BehaviorControl() {}
00194 };
00195 
00196 #endif //__BehaviorControl_h_
00197 
00198 /*
00199 * Change log :
00200 * 
00201 * $Log: BehaviorControl.h,v $
00202 * Revision 1.7  2004/07/10 00:13:58  spranger
00203 * renaming for coderelease and preparations for gt2005
00204 *
00205 * Revision 1.6  2004/05/27 16:48:08  loetzsch
00206 * added the kick logger
00207 *
00208 * Revision 1.5  2004/05/26 19:37:01  loetzsch
00209 * bug fix
00210 *
00211 * Revision 1.4  2004/05/26 18:56:41  loetzsch
00212 * clean up in the behavior control interfaces
00213 *
00214 * Revision 1.3  2004/05/22 22:52:02  juengel
00215 * Renamed ballP_osition to ballModel.
00216 *
00217 * Revision 1.2  2004/05/22 19:02:06  juengel
00218 * Renamed ballP_osition to ballModel.
00219 *
00220 * Revision 1.1.1.1  2004/05/22 17:15:26  cvsadm
00221 * created new repository GT2004_WM
00222 *
00223 * Revision 1.18  2004/04/16 14:56:36  dueffert
00224 * cleanup for Martins data flow graphics
00225 *
00226 * Revision 1.17  2004/04/14 06:37:15  loetzsch
00227 * removed the hack "kickInProgress" from the BehaviorControlInterfaces
00228 *
00229 * Revision 1.16  2004/04/08 15:33:00  wachter
00230 * GT04 checkin of Microsoft-Hellounds
00231 *
00232 * Revision 1.15  2004/03/29 15:30:48  dueffert
00233 * evolution mode idea added
00234 *
00235 * Revision 1.14  2004/03/19 16:36:33  dueffert
00236 * reference bug fixed
00237 *
00238 * Revision 1.13  2004/03/17 16:31:20  kerdels
00239 * added boolean input symbol "robot-pose.something-in-front-of-chest" utilizing the chest distance sensor
00240 *
00241 * Revision 1.12  2004/03/16 16:00:09  tim
00242 * Added SensorDataBuffer to BehaviorControlInterfaces
00243 *
00244 * Revision 1.11  2004/03/15 12:50:31  tim
00245 * Adaptions to new GameController
00246 *
00247 * Revision 1.10  2004/03/15 12:37:15  dueffert
00248 * measurement of free choosen MotionRequest allowed now
00249 *
00250 * Revision 1.9  2004/03/08 00:58:52  roefer
00251 * Interfaces should be const
00252 *
00253 * Revision 1.8  2004/02/23 16:48:27  dueffert
00254 * several improvements for measurement of walking
00255 *
00256 * Revision 1.7  2004/02/18 14:49:19  dueffert
00257 * behavior control can now change walking parameters
00258 *
00259 * Revision 1.6  2004/02/16 17:58:06  dueffert
00260 * packageCognitionMotion extended with invkin parameters
00261 *
00262 * Revision 1.5  2004/02/03 13:19:49  spranger
00263 * renamed all references to  class BallP_osition to BallModel
00264 *
00265 * Revision 1.4  2003/10/12 11:46:30  juengel
00266 * Added CalibrationRequest.
00267 *
00268 * Revision 1.3  2003/09/26 21:23:20  loetzsch
00269 * renamed class JointState to CollisionPercept
00270 *
00271 * Revision 1.2  2003/09/26 15:27:48  juengel
00272 * Renamed DataTypes to representations.
00273 *
00274 * Revision 1.1.1.1  2003/07/02 09:40:23  cvsadm
00275 * created new repository for the competitions in Padova from the 
00276 * tamara CVS (Tuesday 2:00 pm)
00277 *
00278 * removed unused solutions
00279 *
00280 * Revision 1.11  2003/06/10 15:05:02  goehring
00281 * CollisionDetectorInterface extended by JointState
00282 *
00283 * Revision 1.10  2003/05/12 14:08:39  brunn
00284 * renamed selfLocationSampleSetProxy to selfLocatorSamples
00285 * "Ha, glad am I that no one knew that Rumpelstiltskin I am styled"
00286 *
00287 * Revision 1.9  2003/05/12 12:28:08  brunn
00288 * renamed sampleSetProxy to selfLocationSampleSetProxy
00289 * added selfLocationSampleSetProxy to BehaviourControl-Interfaces
00290 *
00291 * Revision 1.8  2003/04/03 17:35:27  dueffert
00292 * free part of goal kick added
00293 *
00294 * Revision 1.7  2003/03/10 13:55:22  juengel
00295 * Added ObstaclesModel to the interfaces.
00296 *
00297 * Revision 1.6  2003/03/06 11:06:38  dueffert
00298 * warning removed
00299 *
00300 * Revision 1.5  2003/02/27 12:02:30  dueffert
00301 * JoystickData added
00302 *
00303 * Revision 1.4  2003/02/07 16:40:50  dueffert
00304 * Bombay stuff added after cleanup
00305 *
00306 * Revision 1.3  2002/09/17 23:55:20  loetzsch
00307 * - unraveled several datatypes
00308 * - changed the WATCH macro
00309 * - completed the process restructuring
00310 *
00311 * Revision 1.2  2002/09/12 12:24:10  juengel
00312 * continued change of module/solution mechanisms
00313 *
00314 * Revision 1.1  2002/09/10 15:36:12  cvsadm
00315 * Created new project GT2003 (M.L.)
00316 * - Cleaned up the /Src/DataTypes directory
00317 * - Removed challenge related source code
00318 * - Removed processing of incoming audio data
00319 * - Renamed AcousticMessage to SoundRequest
00320 *
00321 * Revision 1.6  2002/07/23 13:33:40  loetzsch
00322 * new streaming classes
00323 *
00324 * removed many #include statements
00325 *
00326 * Revision 1.5  2002/06/20 00:40:19  Thomas Röfer
00327 * WLan crash removed
00328 *
00329 * Revision 1.4  2002/06/10 23:43:27  loetzsch
00330 * fixed VC Compiler warnings
00331 *
00332 * Revision 1.3  2002/06/09 15:24:51  loetzsch
00333 * Added TeamMessageCollection and BehaviorTeamMessage to the execute of BehaviorControl
00334 *
00335 * Revision 1.2  2002/05/10 17:29:01  juengel
00336 * Added SpecialVision and SpecialPercept.
00337 *
00338 * Revision 1.7  2002/05/05 18:52:01  loetzsch
00339 * added
00340 * - GameControlData,
00341 * - Receivers for GameControlData
00342 * - access by behavior to GameControlData
00343 *
00344 * Revision 1.6  2002/05/04 12:43:37  loetzsch
00345 * The currently executed MotionRequest is now sent from the MotionControl
00346 * to the BehaviorControl via the OdometryData structure
00347 *
00348 * Revision 1.5  2002/04/28 19:15:14  giese
00349 * SoundPlay added...
00350 *
00351 * Revision 1.4  2002/03/25 09:22:12  rentmeister
00352 * Behavior Dialog
00353 *
00354 * Revision 1.3  2001/12/21 14:09:39  roefer
00355 * Added several destructors
00356 *
00357 * Revision 1.2  2001/12/10 17:47:06  risler
00358 * change log added
00359 *
00360 */

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