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

Modules/SelfLocator/SelfLocatorSelector.h

Go to the documentation of this file.
00001 /**
00002 * @file SelfLocatorSelector.h
00003 * 
00004 * Definition of class SelfLocatorSelector
00005 *
00006 * @author Max Risler
00007 * @author Martin Lötzsch
00008 * @author Matthias Jüngel
00009 */
00010 
00011 #ifndef __SelfLocatorSelector_h_
00012 #define __SelfLocatorSelector_h_
00013 
00014 #include "Tools/Module/ModuleSelector.h"
00015 
00016 #include "GT2004SelfLocator.h"
00017 #include "OdometrySelfLocator.h"
00018 #include "NoOdometrySelfLocator.h"
00019 #include "SpecialPerceptSelfLocator.h"
00020 
00021 /**
00022 * SelfLocator selection module.
00023 *
00024 * A selector for self locators
00025 */
00026 class SelfLocatorSelector : public ModuleSelector, public SelfLocatorInterfaces
00027 {
00028 public:
00029 /**
00030 * Constructor.
00031 * @param handler The module handler of the process.
00032 * @param interfaces The paramters of the SelfLocator module.
00033   */
00034   SelfLocatorSelector(ModuleHandler &handler, const SelfLocatorInterfaces& interfaces)
00035     : ModuleSelector(SolutionRequest::selfLocator),
00036     SelfLocatorInterfaces(interfaces)
00037   {
00038     handler.setModuleSelector(SolutionRequest::selfLocator, this);
00039   }
00040   
00041   /** 
00042   * Is called on start and when the selected solution changes
00043   * to create a specific solution.
00044   * @param id The id of the solution to create
00045   * @return The created solution or 0
00046   */
00047   virtual Module* createSolution(SolutionRequest::ModuleSolutionID id)
00048   {
00049     switch(id)
00050     {
00051     case SolutionRequest::gt2004SelfLocator:
00052       return new GT2004SelfLocator(*this);
00053       
00054     case SolutionRequest::odometrySelfLocator:
00055       return new OdometrySelfLocator(*this);
00056       
00057     case SolutionRequest::specialPerceptSelfLocator:
00058       return new SpecialPerceptSelfLocator(*this);
00059       
00060     case SolutionRequest::noOdometrySelfLocator:
00061       return new NoOdometrySelfLocator(*this);
00062       
00063     default:
00064       return 0;
00065     }
00066   }
00067   
00068   
00069 };
00070 
00071 #endif // __SelfLocatorSelector_h_
00072 
00073 /*
00074 * Change log :
00075 * 
00076 * $Log: SelfLocatorSelector.h,v $
00077 * Revision 1.5  2004/07/20 20:45:17  spranger
00078 * removed gt2004challenge
00079 *
00080 * Revision 1.4  2004/07/10 00:13:57  spranger
00081 * renaming for coderelease and preparations for gt2005
00082 *
00083 * Revision 1.3  2004/06/30 21:37:54  schumann
00084 * cloned GT2004SelfLocator for slam challenge
00085 *
00086 * Revision 1.2  2004/06/17 11:24:04  roefer
00087 * Added RGIP and GT2004SL
00088 *
00089 * Revision 1.1.1.1  2004/05/22 17:20:48  cvsadm
00090 * created new repository GT2004_WM
00091 *
00092 * Revision 1.5  2004/03/17 16:18:49  thomas
00093 * added preversion of motion optimisation with behaviour, selflocator, headcontrol and robotcontrol dialog
00094 *
00095 * Revision 1.4  2004/03/08 02:11:48  roefer
00096 * Interfaces should be const
00097 *
00098 * Revision 1.3  2004/01/21 14:31:58  loetzsch
00099 * Module Selectors create only the selected solution.
00100 * When the solution changes, the old solution is erased and the new
00101 * one ist created using createSolution(..)
00102 *
00103 * Revision 1.2  2003/12/02 19:45:42  spranger
00104 * added NoOdometrySelfLocator
00105 *
00106 * Revision 1.1  2003/10/06 14:10:15  cvsadm
00107 * Created GT2004 (M.J.)
00108 *
00109 * Revision 1.3  2003/09/30 09:36:11  juengel
00110 * Removed FusionSelfLocator.
00111 *
00112 * Revision 1.2  2003/09/01 15:07:12  juengel
00113 * Removed SelfLocatorSwitcher.
00114 *
00115 * Revision 1.1.1.1  2003/07/02 09:40:24  cvsadm
00116 * created new repository for the competitions in Padova from the 
00117 * tamara CVS (Tuesday 2:00 pm)
00118 *
00119 * removed unused solutions
00120 *
00121 * Revision 1.8  2003/05/26 13:14:53  brunn
00122 * Fusion2003SelfLocator added
00123 *
00124 * Revision 1.7  2003/05/22 07:53:05  roefer
00125 * GT2003SelfLocator added
00126 *
00127 * Revision 1.6  2003/03/29 23:06:44  loetzsch
00128 * added class SelfLocatorSwitcher
00129 *
00130 * Revision 1.5  2003/01/22 14:59:49  dueffert
00131 * checkerboard stuff added
00132 *
00133 * Revision 1.4  2003/01/12 15:24:47  juengel
00134 * Added OdometrySelfLocator
00135 *
00136 * Revision 1.3  2002/11/27 23:58:59  mkunz
00137 * FusionSelfLocator added
00138 *
00139 * Revision 1.2  2002/09/12 12:24:09  juengel
00140 * continued change of module/solution mechanisms
00141 *
00142 * Revision 1.1  2002/09/10 15:36:16  cvsadm
00143 * Created new project GT2003 (M.L.)
00144 * - Cleaned up the /Src/DataTypes directory
00145 * - Removed challenge related source code
00146 * - Removed processing of incoming audio data
00147 * - Renamed AcousticMessage to SoundRequest
00148 *
00149 * Revision 1.2  2002/08/21 11:50:44  cesarz
00150 * GT2001PlayersPerceptor, BerlinSelfLocator, GT2001WalkingEngine,
00151 * DoWalkingEngine, FuzzyBehaviorControl, BremenGOBehaviorControl,
00152 * FuzzyBehaviortesterdlgbar and Behaviortesterdlgbar removed.
00153 *
00154 * Revision 1.1.1.1  2002/05/10 12:40:15  cvsadm
00155 * Moved GT2002 Project from ute to tamara.
00156 *
00157 * Revision 1.9  2002/04/02 13:10:20  dueffert
00158 * big change: odometryData and cameraMatrix in image now, old logfiles may be obsolete
00159 *
00160 * Revision 1.8  2002/04/01 08:28:32  roefer
00161 * Dummy LinesSelfLocator added
00162 *
00163 * Revision 1.7  2002/02/06 16:20:48  brunn
00164 * UNSWSelfLocator entfernt - dafür gibt es jetzt den SingleLandmarkSelfLocator
00165 *
00166 * Revision 1.6  2002/02/05 04:08:28  loetzsch
00167 * changed the execution of the SelfLocator. Parameter
00168 * const PerceptCollection& perceptCollection became
00169 * const LandmarksPercept& landmarksPercept, const LinesPercept& linesPercept.
00170 *
00171 * Revision 1.5  2002/01/20 13:00:18  risler
00172 * changed implementation of selecting default solution
00173 *
00174 * Revision 1.4  2002/01/17 14:35:48  risler
00175 * SolutionRequest added
00176 *
00177 * Revision 1.3  2001/12/10 17:47:07  risler
00178 * change log added
00179 *
00180 */

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