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

Modules/BallLocator/BallLocator.h

Go to the documentation of this file.
00001 /**
00002 * @file BallLocator.h
00003 * 
00004 * This file contains a generic class for Ball-Localization.
00005 */
00006 
00007 #ifndef __BallLocator_h_
00008 #define __BallLocator_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/Perception/BallPercept.h"
00021 #include "Representations/Perception/BodyPercept.h"
00022 #include "Representations/Perception/CalibrationRequest.h"
00023 #include "Representations/Perception/CameraMatrix.h"
00024 #include "Representations/Perception/LandmarksPercept.h"
00025 #include "Representations/Perception/ObstaclesPercept.h"
00026 #include "Representations/Perception/SensorDataBuffer.h"
00027 #include "Representations/Cognition/BallModel.h"
00028 #include "Representations/Cognition/RobotPose.h"
00029 #include "Representations/Cognition/SampleSet.h"
00030 #include "Representations/Cognition/GTCamWorldState.h"
00031 #include "Representations/Motion/MotionInfo.h"
00032 #include "Representations/Motion/OdometryData.h"
00033 #include "Representations/RoboCup/GameControlData.h"
00034 #include "Representations/Cognition/RobotPoseCollection.h"
00035 #include "GT2005Particles/GT2005ParticleContainer.h"
00036 
00037 /**
00038 * @class BallLocatorInterfaces
00039 * 
00040 * The interfaces of the BallLocator module.
00041 */
00042 class BallLocatorInterfaces
00043 {
00044 public:
00045   /** Constructor.*/
00046   BallLocatorInterfaces(
00047     const OdometryData& odometryData,
00048     const CameraMatrix& cameraMatrix,
00049     const BallPercept& ballPercept,
00050     const BodyPercept& bodyPercept,
00051     const LandmarksPercept& landmarksPercept,
00052     const MotionInfo& motionInfo,
00053     const ObstaclesPercept& obstaclesPercept,
00054     const RobotPose& robotPose,
00055     const SampleSetProxy<PoseSample>& selfLocatorSamples,
00056     const CalibrationRequest& calibrationRequest,
00057     const SensorDataBuffer& sensorDataBuffer,
00058     const GameControlData& gameControlData,
00059     const GTCamWorldState& gtCamWorldState,
00060     const RobotPoseCollection& robotPoseCollection,
00061     BallModel& ballModel,
00062     GT2005ParticleContainer& ballLocatorSample,
00063     const BallHandling& ballHandling
00064     )
00065     : 
00066     odometryData(odometryData),
00067     cameraMatrix(cameraMatrix),
00068     ballPercept(ballPercept),
00069     bodyPercept(bodyPercept),
00070     landmarksPercept(landmarksPercept),
00071     motionInfo(motionInfo),
00072     obstaclesPercept(obstaclesPercept),
00073     robotPose(robotPose),
00074     selfLocatorSamples(selfLocatorSamples),
00075     calibrationRequest(calibrationRequest),
00076     sensorDataBuffer(sensorDataBuffer),
00077     gameControlData(gameControlData),
00078     gtCamWorldState(gtCamWorldState),
00079     robotPoseCollection(robotPoseCollection),
00080     ballModel(ballModel),
00081     ballLocatorSamples(ballLocatorSample),
00082     ballHandling(ballHandling)
00083   {}
00084   
00085   /** The odometry data provided by the motion modules */
00086   const OdometryData& odometryData;
00087   
00088   /** The offset and the rotation of the camera */
00089   const CameraMatrix& cameraMatrix;
00090   
00091   /** The ball percept that was generated last */
00092   const BallPercept& ballPercept;
00093   
00094   /** The body percept that was generated last */
00095   const BodyPercept& bodyPercept;
00096 
00097   /** The landmarkspercept that was generated last */
00098   const LandmarksPercept& landmarksPercept;
00099 
00100   /** The motion Info of the last performed motion */
00101   const MotionInfo& motionInfo;
00102 
00103   /** The obstaclespercept that was generated last */
00104   const ObstaclesPercept& obstaclesPercept;
00105 
00106   /** The robots position that was calculated last */
00107   const RobotPose& robotPose;
00108   
00109   /** The self locator samples that were calculated last */
00110   const SampleSetProxy<PoseSample>& selfLocatorSamples;
00111 
00112   /** The calibration request */
00113   const CalibrationRequest& calibrationRequest;
00114 
00115   /** The sensor data buffer */
00116   const SensorDataBuffer& sensorDataBuffer;
00117 
00118   /** Messages that are sent by the referee */ 
00119   const GameControlData& gameControlData;
00120 
00121   /** The worldstate generated by the GTCam */
00122   const GTCamWorldState& gtCamWorldState;
00123 
00124   /** collection of candidate robot poses */
00125   const RobotPoseCollection& robotPoseCollection;
00126 
00127   /** The ball position to be changed */
00128   BallModel& ballModel;
00129 
00130   /** The ball locator samples */
00131   GT2005ParticleContainer& ballLocatorSamples;
00132 
00133   /** Behavior feedback about the handling of the ball */
00134   const BallHandling& ballHandling;
00135 };
00136 
00137 /**
00138 * @class BallLocator 
00139 *
00140 * The Base class for ball locators
00141 *
00142 * It is the task of ball modeling to keep track of the location of 
00143 * the ball even if the ball is currently not seen.
00144 */
00145 class BallLocator : public Module, public BallLocatorInterfaces
00146 {
00147 public:
00148 /*
00149 * Constructor.
00150 * @param interfaces The paramters of the BallLocator module.
00151   */
00152   BallLocator(const BallLocatorInterfaces& interfaces)
00153     : BallLocatorInterfaces(interfaces)
00154   {}
00155   
00156   /** Destructor */
00157   virtual ~BallLocator() {}
00158 };
00159 
00160 #endif //__BallLocator_h_

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