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

Modules/SelfLocator/SelfLocator.h

Go to the documentation of this file.
00001 /** 
00002 * @file SelfLocator.h
00003 * 
00004 * This file contains a generic class for Self-Localization.
00005 */
00006 
00007 #ifndef __SelfLocator_h_
00008 #define __SelfLocator_h_
00009 
00010 #include "Tools/Module/Module.h"
00011 
00012 #include "Representations/Perception/LandmarksPercept.h"
00013 #include "Representations/Perception/LinesPercept.h"
00014 #include "Representations/Perception/EdgesPercept.h"
00015 #include "Representations/Perception/SpecialPercept.h"
00016 #include "Representations/Perception/PSDPercept.h"
00017 #include "Representations/Perception/ObstaclesPercept.h"
00018 #include "Representations/Perception/CollisionPercept.h"
00019 #include "Representations/Perception/CameraInfo.h"
00020 #include "Representations/Cognition/RobotPose.h"
00021 #include "Representations/Cognition/SampleSet.h"
00022 #include "Representations/Cognition/GTCamWorldState.h"
00023 #include "Representations/Motion/OdometryData.h"
00024 #include "Representations/Perception/CameraMatrix.h"
00025 #include "Representations/Cognition/LandmarksState.h"
00026 #include "Representations/Cognition/RobotState.h"
00027 #include "Representations/Cognition/RobotPoseCollection.h"
00028 #include "Representations/RoboCup/GameControlData.h"
00029 
00030 /**
00031 * @class SelfLocatorInterfaces
00032 * 
00033 * The interfaces of the SelfLocator module.
00034 */
00035 class SelfLocatorInterfaces
00036 {
00037 public:
00038   /** Constructor.*/
00039   SelfLocatorInterfaces(
00040     const LandmarksPercept& landmarksPercept,
00041     const LinesPercept& linesPercept,
00042     const EdgesPercept& edgesPercept,
00043     const SpecialPercept& specialPercept,
00044     const PSDPercept& psdPercept,
00045     const ObstaclesPercept& obstaclesPercept,
00046     const CollisionPercept& collisionPercept,
00047     const OdometryData& odometryData,
00048     const CameraMatrix& cameraMatrix,
00049     const RobotState& robotState,
00050     const GTCamWorldState& gtCamWorldState,
00051     const GameControlData& gameControlData,
00052     RobotPose& robotPose,
00053     SampleSetProxy<PoseSample>& selfLocatorSamples,
00054     LandmarksState& landmarksState,
00055     RobotPoseCollection& robotPoseCollection)
00056     : landmarksPercept(landmarksPercept),
00057     linesPercept(linesPercept),
00058     edgesPercept(edgesPercept),
00059     specialPercept(specialPercept),
00060     psdPercept(psdPercept),
00061     obstaclesPercept(obstaclesPercept),
00062     collisionPercept(collisionPercept),
00063     odometryData(odometryData),
00064     cameraMatrix(cameraMatrix),
00065     robotState(robotState),
00066     gtCamWorldState(gtCamWorldState),
00067     gameControlData(gameControlData),
00068     robotPose(robotPose),
00069     selfLocatorSamples(selfLocatorSamples),
00070     landmarksState(landmarksState),
00071     robotPoseCollection(robotPoseCollection)
00072   {}
00073 
00074 protected:
00075   /** The landmarks detected in the last image */
00076   const LandmarksPercept& landmarksPercept;
00077   
00078   /** The lines detected in the last image */
00079   const LinesPercept& linesPercept;
00080   
00081   /** The edges detected in the last image */
00082   const EdgesPercept& edgesPercept;
00083   
00084   /** The special percepts detected in the last image */
00085   const SpecialPercept& specialPercept;
00086   
00087   /** The psd percepts detected with the PSD sensor */
00088   const PSDPercept& psdPercept;
00089   
00090   /** The obstables percept detected in the last image/with the PSD sensor */
00091   const ObstaclesPercept& obstaclesPercept;
00092 
00093   /** Currently detected collisions */
00094   const CollisionPercept& collisionPercept;
00095 
00096   /** The odometry that was estimated by the motion modules */
00097   const OdometryData& odometryData;
00098 
00099   /** The camera matrix describing the camera's position */
00100   const CameraMatrix& cameraMatrix;
00101   
00102   /** The robot state */
00103   const RobotState& robotState;
00104 
00105   /** The worldstate generated by the GTCam */
00106   const GTCamWorldState& gtCamWorldState;
00107 
00108   /** Messages that are sent by the referee */ 
00109   const GameControlData& gameControlData;
00110 
00111   /** The robots position to be generated */
00112   RobotPose& robotPose;
00113 
00114   /** The sample set proxy linked to the sample set of the active locator */
00115   SampleSetProxy<PoseSample>& selfLocatorSamples;
00116 
00117   /** the currently seen landmarks */
00118   LandmarksState& landmarksState;
00119 
00120   /** the collection of candidate poses, set by the self locator */
00121   RobotPoseCollection& robotPoseCollection;
00122 
00123 
00124 };
00125 
00126 /**
00127 * @class SelfLocator 
00128 *
00129 * The Base class for self locators
00130 */
00131 class SelfLocator : public Module, public SelfLocatorInterfaces
00132 {
00133 public:
00134 /*
00135 * Constructor.
00136 * @param interfaces The paramters of the SelfLocator module.
00137   */
00138   SelfLocator(const SelfLocatorInterfaces& interfaces)
00139     : SelfLocatorInterfaces(interfaces)
00140   {}
00141   
00142   /** Destructor */
00143   virtual ~SelfLocator() {}
00144 };
00145 
00146 #endif //__SelfLocator_h_

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