00001 /** 00002 * @file HeadControlSelector.h 00003 * 00004 * Definition of class HeadControlSelector 00005 * 00006 * @author Max Risler 00007 * @author Martin Lötzsch 00008 */ 00009 00010 #ifndef __HeadControlSelector_h_ 00011 #define __HeadControlSelector_h_ 00012 00013 #include "Tools/Module/ModuleSelector.h" 00014 00015 #include "GT2004HeadControl/GT2004HeadControl.h" 00016 00017 /** 00018 * HeadControl selection module. 00019 * 00020 * A selector for head control modules. 00021 */ 00022 class HeadControlSelector : public ModuleSelector, public HeadControlInterfaces 00023 { 00024 public: 00025 /** 00026 * Constructor. 00027 * @param handler The module handler of the process. 00028 * @param interfaces The paramters of the HeadControl module. 00029 */ 00030 HeadControlSelector(ModuleHandler &handler,const HeadControlInterfaces& interfaces) 00031 : ModuleSelector(SolutionRequest::headControl), 00032 HeadControlInterfaces(interfaces) 00033 { 00034 handler.setModuleSelector(SolutionRequest::headControl,this); 00035 } 00036 00037 /** 00038 * Is called on start and when the selected solution changes 00039 * to create a specific solution. 00040 * @param id The id of the solution to create 00041 * @return The created solution or 0 00042 */ 00043 virtual Module* createSolution(SolutionRequest::ModuleSolutionID id) 00044 { 00045 switch(id) 00046 { 00047 case SolutionRequest::gt2004HeadControl: 00048 return new GT2004HeadControl(*this); 00049 00050 default: 00051 return 0; 00052 } 00053 } 00054 }; 00055 00056 #endif // __HeadControlSelector_h_ 00057 00058 /* 00059 * Change log : 00060 * 00061 * $Log: HeadControlSelector.h,v $ 00062 * Revision 1.4 2004/05/26 15:28:42 loetzsch 00063 * removed ATH2004ERS7HeadControl 00064 * 00065 * Revision 1.3 2004/05/24 15:19:24 loetzsch 00066 * readded head control ATH2004ERS7 00067 * 00068 * Revision 1.2 2004/05/22 18:47:41 juengel 00069 * Removed some solutions. 00070 * 00071 * Revision 1.1.1.1 2004/05/22 17:19:21 cvsadm 00072 * created new repository GT2004_WM 00073 * 00074 * Revision 1.10 2004/05/14 11:37:08 loetzsch 00075 * support for multiple xabsl2engines in different modules 00076 * preliminary GT2004HeadControl (does not work at all) 00077 * 00078 * Revision 1.9 2004/04/07 13:25:43 thomas 00079 * ddd checkin after go04 - second part fixed solutions 00080 * 00081 * Revision 1.8 2004/04/07 12:28:57 risler 00082 * ddd checkin after go04 - first part 00083 * 00084 * Revision 1.3 2004/04/02 09:27:54 Marc 00085 * Removed Opponent Team Code 00086 * 00087 * Revision 1.2 2004/03/29 15:20:35 Marc 00088 * DDD2004 Headcontrol installed 00089 * 00090 * Revision 1.7 2004/03/28 14:07:20 jhoffman 00091 * renamed headcontrolmode ATH2004 in ATH2004ERS7 00092 * 00093 * Revision 1.6 2004/03/16 14:00:21 juengel 00094 * Integrated Improvments from "Günne" 00095 * -ATH2004ERS7Behavior 00096 * -ATHHeadControl 00097 * -KickSelectionTable 00098 * -KickEditor 00099 * 00100 * Revision 1.5 2004/03/08 01:38:54 roefer 00101 * 00102 * Interfaces should be const 00103 * Revision 1.2 2004/03/15 17:11:39 hoffmann 00104 * - added ATH2004HeadControl 00105 * - added ATH2004LEDControl 00106 * - headmotiontester shows "tilt2" 00107 * - motion process updates odometry while no new robotPose is received, added to motion request 00108 * - some ui adjustments 00109 * - added member function to "field" to find out if robot is in own penalty area for use in the obstacles locator 00110 * 00111 * Revision 1.4 2004/02/27 15:03:48 wachter 00112 * cloned GT2003HeadControl as MSH2004HeadContol 00113 * 00114 * Revision 1.3 2004/02/04 13:41:32 roefer 00115 * Some place holders for BB2004 modules added 00116 * 00117 * Revision 1.2 2004/01/21 14:31:58 loetzsch 00118 * Module Selectors create only the selected solution. 00119 * When the solution changes, the old solution is erased and the new 00120 * one ist created using createSolution(..) 00121 * 00122 * Revision 1.1 2003/10/06 14:10:15 cvsadm 00123 * Created GT2004 (M.J.) 00124 * 00125 * Revision 1.3 2003/09/25 11:20:19 juengel 00126 * Removed LinesHeadControl. 00127 * 00128 * Revision 1.2 2003/07/04 10:20:05 kudlacik 00129 * Added BallChallangeHeadControl 00130 * 00131 * Revision 1.1.1.1 2003/07/02 09:40:23 cvsadm 00132 * created new repository for the competitions in Padova from the 00133 * tamara CVS (Tuesday 2:00 pm) 00134 * 00135 * removed unused solutions 00136 * 00137 * Revision 1.9 2003/05/27 16:17:25 juengel 00138 * Renamed GT2003HeadControl to HUGO2003HeadControl. 00139 * Added GT2003HeadControl. 00140 * 00141 * Revision 1.8 2003/03/31 22:00:18 roefer 00142 * LinesHeadControl added 00143 * 00144 * Revision 1.7 2003/03/31 21:21:55 loetzsch 00145 * fixed the funny module solution creation 00146 * 00147 * Revision 1.6 2003/03/31 16:09:43 jhoffman 00148 * made sure that only one instance of gt2002 is instantiated 00149 * 00150 * Revision 1.5 2003/03/31 14:57:28 jhoffman 00151 * added "GT2003HeadControl" and put some head control stuff 00152 * in the parent class "HeadControl"; "GT2003HeadConrol" subsumes 00153 * "GT2002H..." 00154 * 00155 * Revision 1.4 2002/11/28 14:45:42 jhoffman 00156 * added motion detector image processor and a head control that uses the information 00157 * 00158 * Revision 1.3 2002/09/22 18:40:55 risler 00159 * added new math functions, removed GTMath library 00160 * 00161 * Revision 1.2 2002/09/10 21:07:30 loetzsch 00162 * continued change of module/solution mechanisms 00163 * 00164 * Revision 1.1 2002/09/10 15:36:14 cvsadm 00165 * Created new project GT2003 (M.L.) 00166 * - Cleaned up the /Src/DataTypes directory 00167 * - Removed challenge related source code 00168 * - Removed processing of incoming audio data 00169 * - Renamed AcousticMessage to SoundRequest 00170 * 00171 * Revision 1.3 2002/08/22 14:41:03 risler 00172 * added some doxygen comments 00173 * 00174 * Revision 1.2 2002/08/21 07:21:51 cesarz 00175 * EllipseHeadControl and DefaultHeadControl removed. 00176 * 00177 * Revision 1.1.1.1 2002/05/10 12:40:14 cvsadm 00178 * Moved GT2002 Project from ute to tamara. 00179 * 00180 * Revision 1.13 2002/05/03 11:49:23 juengel 00181 * GT2002HeadControl created. 00182 * 00183 * Revision 1.12 2002/04/24 18:16:05 risler 00184 * HeadState not const in HeadControl 00185 * 00186 * Revision 1.11 2002/04/23 10:38:28 risler 00187 * renamed headOdometry to headState 00188 * 00189 * Revision 1.10 2002/04/17 17:04:39 risler 00190 * Darmstadt GO 00191 * 00192 * Revision 1.9 2002/04/16 21:39:28 dueffert 00193 * new head controller added 00194 * 00195 * Revision 1.8 2002/04/02 13:10:19 dueffert 00196 * big change: odometryData and cameraMatrix in image now, old logfiles may be obsolete 00197 * 00198 * Revision 1.7 2002/02/21 16:28:24 risler 00199 * removed SmoothHeadControl 00200 * 00201 * Revision 1.6 2002/02/21 12:46:50 loetzsch 00202 * no message 00203 * 00204 * Revision 1.5 2002/02/20 16:57:52 kallnik 00205 * new Headcontrol 00206 * and 00207 * new Function long abs(long) 00208 * 00209 * Revision 1.4 2002/02/01 20:43:41 kosen 00210 * Bremen2001HeadControl in DefaultHeadControl integrated and redundant files removed 00211 * 00212 * Revision 1.3 2002/01/25 21:30:21 kosen 00213 * Bremen2001HeadControl added 00214 * 00215 * Revision 1.2 2002/01/20 13:00:18 risler 00216 * changed implementation of selecting default solution 00217 * 00218 * Revision 1.1 2002/01/20 10:34:38 risler 00219 * no message 00220 * 00221 * 00222 */