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 #include "Tools/Module/Module.h"
00018 
00019 #include "Representations/Behavior/BallHandling.h"
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/PlayersModel.h"
00025 #include "Representations/Cognition/RobotState.h"
00026 #include "Representations/Cognition/SampleSet.h"
00027 #include "Representations/Cognition/GTCamWorldState.h" 
00028 #include "Representations/Cognition/PassCorridorCollection.h" 
00029 #include "Representations/Motion/MotionInfo.h"
00030 #include "Representations/Motion/LEDRequest.h"
00031 #include "Representations/Motion/HeadControlMode.h"
00032 #include "Representations/Motion/OdometryData.h"
00033 #include "Representations/Sound/SoundRequest.h"
00034 #include "Representations/Perception/SpecialPercept.h"
00035 #include "Representations/Perception/SpecialVisionRequest.h"
00036 #include "Representations/Perception/CalibrationRequest.h"
00037 #include "Representations/Perception/SensorDataBuffer.h"
00038 #include "Representations/RoboCup/GameControlData.h"
00039 #include "Representations/WLan/TeamMessageCollection.h"
00040 #include "Representations/JoystickData.h"
00041 #include "Tools/MessageQueue/InMessage.h"
00042 #include "Modules/WalkingEngine/InvKinWalkingParameters.h"
00043 #include "Modules/WalkingEngine/GT2004ParameterSet.h"
00044 #include "Representations/Perception/PSDPercept.h"
00045 
00046 #include "Modules/WalkingEngine/GT2005Parameters.h"
00047 #include "Modules/WalkingEngine/GT2005DebugData.h"
00048 #include "Representations/Perception/CameraMatrix.h"
00049 
00050 
00051 /**
00052 * @class BehaviorControlInterfaces
00053 * 
00054 * The interfaces of the BehaviorControl module.
00055 */
00056 class BehaviorControlInterfaces
00057 {
00058 public:
00059   /** Constructor.*/
00060   BehaviorControlInterfaces(
00061     const RobotPose& robotPose,
00062     const BallModel& ballModel,
00063     const PlayerPoseCollection& playerPoseCollection,
00064     const ObstaclesModel& obstaclesModel,
00065     const RobotState& robotState,
00066     const MotionInfo& motionInfo,
00067     const SpecialPercept& specialPercept,
00068     const TeamMessageCollection& teamMessageCollection,
00069     const JoystickData& joystickData,
00070     const OdometryData& odometryData,
00071     const SampleSetProxy<PoseSample>& selfLocatorSamples,
00072     const SensorDataBuffer& sensorDataBuffer,
00073     const PSDPercept& psdPercept,
00074     const GTCamWorldState& gtCamWorldState,
00075     const PassCorridorCollection &passCorridorCollection,
00076     const PlayersModel &playersModel,
00077 
00078     const GameControlData& gameControlData,
00079     MotionRequest& motionRequest,
00080     LEDRequest& ledRequest,
00081     HeadControlMode& headControlMode,
00082     SoundRequest& soundRequest,
00083     InvKinWalkingParameters& invKinWalkingParameters,
00084     GT2004Parameters& gt2004Parameters,
00085     unsigned long& walkParameterTimeStamp,
00086     SpecialVisionRequest& specialVisionRequest,
00087     CalibrationRequest& calibrationRequest,
00088     BehaviorTeamMessage& outgoingBehaviorTeamMessage,
00089     //****for GT2005WalkingEngine****
00090     GTWalkParametersIndividual& gt2005Parameters,
00091     GT2005DebugData& gt2005DebugData,
00092     const CameraMatrix& cameraMatrix,
00093     BallHandling& ballHandling)
00094   : robotPose(robotPose),
00095     ballModel(ballModel),
00096     playerPoseCollection(playerPoseCollection),
00097     obstaclesModel(obstaclesModel),
00098     robotState(robotState),
00099     motionInfo(motionInfo),
00100     specialPercept(specialPercept),
00101     teamMessageCollection(teamMessageCollection),
00102     joystickData(joystickData),
00103     odometryData(odometryData),
00104     selfLocatorSamples(selfLocatorSamples),
00105     sensorDataBuffer(sensorDataBuffer),
00106     psdPercept(psdPercept),
00107     gtCamWorldState(gtCamWorldState), 
00108     passCorridorCollection(passCorridorCollection),
00109     playersModel(playersModel),
00110     gameControlData(gameControlData),
00111     motionRequest(motionRequest),
00112     ledRequest(ledRequest),
00113     headControlMode(headControlMode),
00114     soundRequest(soundRequest),
00115     invKinWalkingParameters(invKinWalkingParameters),
00116     gt2004Parameters(gt2004Parameters),
00117     walkParameterTimeStamp(walkParameterTimeStamp),
00118     specialVisionRequest(specialVisionRequest),
00119     calibrationRequest(calibrationRequest),
00120     outgoingBehaviorTeamMessage(outgoingBehaviorTeamMessage),
00121     //****for GT2005WalkingEngine****
00122     gt2005Parameters(gt2005Parameters),
00123     gt2005DebugData(gt2005DebugData),
00124     cameraMatrix(cameraMatrix),
00125     ballHandling(ballHandling)
00126   {}
00127   
00128 protected:
00129   /** The robots position and orientation */
00130   const RobotPose& robotPose;
00131   
00132   /** The position and the speed of the ball */
00133   const BallModel& ballModel;
00134   
00135   /** The positions of the own and opponent players */
00136   const PlayerPoseCollection& playerPoseCollection;
00137 
00138   /** The positions of the obstacles */
00139   const ObstaclesModel& obstaclesModel;
00140   
00141   /** Pressed switches and fall downs */
00142   const RobotState& robotState;
00143 
00144   /** The motions that are currently executed by the MotionControl */
00145   const MotionInfo& motionInfo;
00146   
00147   /** Special percepts for challenges */
00148   const SpecialPercept& specialPercept;
00149   
00150   /** Messages from teammates */
00151   const TeamMessageCollection& teamMessageCollection;
00152   
00153   /** Data produced by an extern sensor called joystick */
00154   const JoystickData& joystickData;
00155   
00156   /** Odomety Data */
00157   const OdometryData& odometryData;
00158 
00159   /**  The sample set proxy linked to the sample set of the active locator */
00160   const SampleSetProxy<PoseSample>& selfLocatorSamples;
00161 
00162   /** The sensor data */
00163   const SensorDataBuffer& sensorDataBuffer;
00164 
00165   /** The PSDPercept*/
00166   const PSDPercept& psdPercept;
00167 
00168   /** The worldstate generated by the GTCam */
00169   const GTCamWorldState& gtCamWorldState;
00170 
00171   /** The pass corridors created by the player model */
00172   const PassCorridorCollection& passCorridorCollection;
00173 
00174   /** The players model created by the players model */
00175   const PlayersModel& playersModel;
00176 
00177   /** Messages that are sent by the referee */ 
00178   const GameControlData& gameControlData;
00179   
00180   /** The motion request to be set by the behavior */
00181   MotionRequest& motionRequest;
00182   
00183   /** The led request to be set by the behavior */
00184   LEDRequest& ledRequest;
00185   
00186   /** The head control mode to be set by the behavior */
00187   HeadControlMode& headControlMode;
00188   
00189   /** The acoustic message to be set by the behavior */
00190   SoundRequest& soundRequest;
00191 
00192   /** walking parameter sets to be used by the WalkingEngine, eg calculated by evolution behavior */
00193   InvKinWalkingParameters& invKinWalkingParameters;
00194   GT2004Parameters& gt2004Parameters;
00195   unsigned long& walkParameterTimeStamp;
00196   
00197   /** A request for special vision modules for challenges */
00198   SpecialVisionRequest& specialVisionRequest;
00199   
00200   /** A request for calibration */
00201   CalibrationRequest& calibrationRequest;
00202   
00203   /** Messages to teammates */
00204   BehaviorTeamMessage& outgoingBehaviorTeamMessage;
00205 
00206   //****for GT2005WalkingEngine****
00207   GTWalkParametersIndividual& gt2005Parameters;
00208   GT2005DebugData& gt2005DebugData;
00209 
00210   const CameraMatrix& cameraMatrix;
00211 
00212   /** Behavior feedback to other modules about the handling of the ball */
00213   BallHandling& ballHandling;
00214 };
00215 
00216 /**
00217 * @class BehaviorControl 
00218 *
00219 * The Base class for behavior controls
00220 */
00221 class BehaviorControl : public Module, public BehaviorControlInterfaces
00222 {
00223 public:
00224 /*
00225 * Constructor.
00226 * @param interfaces The paramters of the BehaviorControl module.
00227   */
00228   BehaviorControl(const BehaviorControlInterfaces& interfaces)
00229     : BehaviorControlInterfaces(interfaces)
00230   {}
00231   
00232   /** Destructor */
00233   virtual ~BehaviorControl() {}
00234 };
00235 
00236 #endif //__BehaviorControl_h_

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