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

Modules/SensorBehaviorControl/SensorBehaviorControlSelector.h

Go to the documentation of this file.
00001 /**
00002 * @file SensorBehaviorControlSelector.h
00003 * 
00004 * Definition of class SensorBehaviorControlSelector
00005 *
00006 * @author Max Risler
00007 * @author Martin Lötzsch
00008 * @author Matthias Jüngel
00009 */
00010 
00011 #ifndef __SensorBehaviorControlSelector_h_
00012 #define __SensorBehaviorControlSelector_h_
00013 
00014 #include "Tools/Module/ModuleSelector.h"
00015 
00016 #include "ObstacleAvoiderOnGreenField.h"
00017 #include "ObstacleAvoiderOnGreenFieldERS7.h"
00018 #include "MotionRecognition.h"
00019 #include "SimpleMotionRecognition.h"
00020 #include "BB2004Calibrator.h"
00021 #include "ImageSaver.h"
00022 
00023 /**
00024 * @class SensorBehaviorControlSelector
00025 * 
00026 * A module selector for sensor data to motion request modules.
00027 *
00028 * @author Martin Lötzsch
00029 */
00030 class SensorBehaviorControlSelector : public ModuleSelector, public SensorBehaviorControlInterfaces
00031 {
00032 public:
00033 /**
00034 * Constructor.
00035 * @param handler The module handler of the process.
00036 * @param interfaces The paramters of the SensorBehaviorControl module.
00037   */
00038   SensorBehaviorControlSelector(ModuleHandler &handler,const SensorBehaviorControlInterfaces& interfaces)
00039     : ModuleSelector(SolutionRequest::sensorBehaviorControl),
00040     SensorBehaviorControlInterfaces(interfaces)
00041   {
00042     handler.setModuleSelector(SolutionRequest::sensorBehaviorControl, this);
00043   }    
00044   
00045   /** 
00046   * Is called on start and when the selected solution changes
00047   * to create a specific solution.
00048   * @param id The id of the solution to create
00049   * @return The created solution or 0
00050   */
00051   virtual Module* createSolution(SolutionRequest::ModuleSolutionID id)
00052   {
00053     switch(id)
00054     {
00055     case SolutionRequest::obstacleAvoiderOnGreenField:
00056       return new ObstacleAvoiderOnGreenField(*this);
00057       
00058     case SolutionRequest::obstacleAvoiderOnGreenFieldERS7:
00059       return new ObstacleAvoiderOnGreenFieldERS7(*this);
00060       
00061     case SolutionRequest::motionrecognition:
00062       return new MotionRecognition(*this);
00063       
00064     case SolutionRequest::simpleMotionRecognition:
00065       return new SimpleMotionRecognition(*this);
00066       
00067     case SolutionRequest::bb2004Calibrator:
00068       return new BB2004Calibrator(*this);
00069 
00070     case SolutionRequest::imageSaver:
00071       return new ImageSaver(*this);
00072       
00073     default:
00074       return 0;
00075     }
00076   }
00077   
00078 };
00079 
00080 #endif //__SensorBehaviorControlSelector_h_
00081 
00082 /*
00083 * Change log:
00084 *
00085 * $Log: SensorBehaviorControlSelector.h,v $
00086 * Revision 1.3  2004/06/16 21:00:02  goehring
00087 * ImageSaver added
00088 *
00089 * Revision 1.2  2004/05/22 20:34:43  juengel
00090 * Removed AlLx_RemotePresence.
00091 *
00092 * Revision 1.1.1.1  2004/05/22 17:20:53  cvsadm
00093 * created new repository GT2004_WM
00094 *
00095 * Revision 1.8  2004/03/08 02:11:50  roefer
00096 * Interfaces should be const
00097 *
00098 * Revision 1.7  2004/03/04 23:00:54  roefer
00099 * Added (so far empty) BB2004Calibrator
00100 *
00101 * Revision 1.6  2004/02/27 13:37:16  jhoffman
00102 * added obstacle avoiding "sensor behavior control" for ers7
00103 *
00104 * Revision 1.5  2004/01/21 14:31:58  loetzsch
00105 * Module Selectors create only the selected solution.
00106 * When the solution changes, the old solution is erased and the new
00107 * one ist created using createSolution(..)
00108 *
00109 * Revision 1.4  2004/01/08 21:59:18  richert
00110 * added Module SimpleMotionRecognition
00111 *
00112 * Revision 1.3  2003/12/12 17:09:37  richert
00113 * added new solution motionrecognition
00114 *
00115 * Revision 1.2  2003/11/17 14:56:04  urban
00116 * added SensorBehaviorControl-solution "AlLx RemotePresence" and RobotControl-dialogbar "AlLx Joystick"
00117 *
00118 * Revision 1.1  2003/10/06 14:10:15  cvsadm
00119 * Created GT2004 (M.J.)
00120 *
00121 * Revision 1.3  2003/09/27 18:40:47  loetzsch
00122 * removed AnnaSeghersSchoolDemo again
00123 *
00124 * Revision 1.2  2003/09/14 17:47:38  loetzsch
00125 * added solution AnnaSeghersSchooDemo
00126 *
00127 * Revision 1.1.1.1  2003/07/02 09:40:24  cvsadm
00128 * created new repository for the competitions in Padova from the 
00129 * tamara CVS (Tuesday 2:00 pm)
00130 *
00131 * removed unused solutions
00132 *
00133 * Revision 1.7  2003/01/30 18:26:40  jhoffman
00134 * added ObstacleAvoider
00135 *
00136 * Revision 1.6  2002/12/05 15:58:52  goehring
00137 * DanielTest implemented
00138 *
00139 * Revision 1.5  2002/12/03 19:00:28  loetzsch
00140 * doen't compile
00141 *
00142 * Revision 1.4  2002/12/03 16:46:42  goehring
00143 * added daniel test behavior
00144 *
00145 * Revision 1.3  2002/11/20 15:44:49  juengel
00146 * Added cameraMatrix to SensorBehaviorControlInterfaces.
00147 *
00148 * Revision 1.2  2002/11/18 19:24:16  juengel
00149 * Line Follower added.
00150 *
00151 * Revision 1.1  2002/11/07 17:27:58  loetzsch
00152 * renamed Module SensorDataToMotionRequest to SensorBehaviorControl
00153 *
00154 * Revision 1.2  2002/09/12 12:24:09  juengel
00155 * continued change of module/solution mechanisms
00156 *
00157 * Revision 1.1  2002/09/10 15:36:16  cvsadm
00158 * Created new project GT2003 (M.L.)
00159 * - Cleaned up the /Src/DataTypes directory
00160 * - Removed challenge related source code
00161 * - Removed processing of incoming audio data
00162 * - Renamed AcousticMessage to SoundRequest
00163 *
00164 * Revision 1.3  2002/07/29 17:44:48  jhoffman
00165 * added braitenberg vehicle-style behavior (or actually: a "sensor data to motion request")
00166 *
00167 * Revision 1.2  2002/05/14 12:39:04  dueffert
00168 * corrected some documentation mistakes
00169 *
00170 * Revision 1.1.1.1  2002/05/10 12:40:15  cvsadm
00171 * Moved GT2002 Project from ute to tamara.
00172 *
00173 * Revision 1.1  2002/02/05 03:51:47  loetzsch
00174 * added a few new module selectors
00175 *
00176 */

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