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

Modules/RobotStateDetector/RobotStateDetector.h

Go to the documentation of this file.
00001 /**
00002 * @file RobotStateDetector.h
00003 * 
00004 * This file contains a generic class for RobotStateDetector.
00005 */
00006 
00007 #ifndef __RobotStateDetector_h_
00008 #define __RobotStateDetector_h_
00009 
00010 #include "Tools/Module/Module.h"
00011 #include "Tools/RobotConfiguration.h"
00012 
00013 #include "Representations/Perception/BodyPercept.h"
00014 #include "Representations/Perception/CollisionPercept.h"
00015 #include "Representations/Cognition/RobotState.h"
00016 
00017 
00018 /**
00019 * @class RobotStateDetectorInterfaces
00020 * 
00021 * The interfaces of the RobotStateDetector module.
00022 */
00023 class RobotStateDetectorInterfaces
00024 {
00025 public:
00026   /** Constructor.*/
00027   RobotStateDetectorInterfaces(
00028     const BodyPercept& bodyPercept,
00029     const CollisionPercept& collisionPercept,
00030     RobotState& robotState
00031     )
00032     : 
00033     bodyPercept(bodyPercept),
00034     collisionPercept(collisionPercept),
00035     robotState(robotState)
00036   {}
00037   
00038   /** The BodyPercept*/
00039   const BodyPercept& bodyPercept;
00040   
00041   /** Detected collisions for each joint */
00042   const CollisionPercept& collisionPercept;
00043 
00044   /** The RobotState*/
00045   RobotState& robotState;
00046 };
00047 
00048 /**
00049 * @class RobotStateDetector 
00050 *
00051 * The Base class for robot state detection
00052 *
00053 * Robot state detectors detect button messages and whether the robot is crashed.
00054 */
00055 class RobotStateDetector : public Module, public RobotStateDetectorInterfaces, public RobotDimensions
00056 {
00057 public:
00058 /*
00059 * Constructor.
00060 * @param interfaces The paramters of the RobotStateDetector module.
00061   */
00062   RobotStateDetector(const RobotStateDetectorInterfaces& interfaces)
00063     : RobotStateDetectorInterfaces(interfaces),
00064       RobotDimensions(getRobotConfiguration().getRobotDimensions())
00065   {}
00066   
00067   /** Destructor */
00068   virtual ~RobotStateDetector() {}
00069 };
00070 
00071 #endif //__RobotStateDetector_h_
00072 
00073 
00074 /*
00075  * Change log :
00076  * 
00077  * $Log: RobotStateDetector.h,v $
00078  * Revision 1.2  2004/05/27 09:33:18  loetzsch
00079  * clean up
00080  *
00081  * Revision 1.1.1.1  2004/05/22 17:20:41  cvsadm
00082  * created new repository GT2004_WM
00083  *
00084  * Revision 1.3  2004/03/08 02:11:45  roefer
00085  * Interfaces should be const
00086  *
00087  * Revision 1.2  2004/01/24 11:39:34  juengel
00088  * RobotStateDetector is derived from RobotDimensions
00089  *
00090  * Revision 1.1  2003/10/06 14:10:14  cvsadm
00091  * Created GT2004 (M.J.)
00092  *
00093  * Revision 1.3  2003/09/26 21:23:20  loetzsch
00094  * renamed class JointState to CollisionPercept
00095  *
00096  * Revision 1.2  2003/09/26 15:27:49  juengel
00097  * Renamed DataTypes to representations.
00098  *
00099  * Revision 1.1.1.1  2003/07/02 09:40:24  cvsadm
00100  * created new repository for the competitions in Padova from the 
00101  * tamara CVS (Tuesday 2:00 pm)
00102  *
00103  * removed unused solutions
00104  *
00105  * Revision 1.3  2003/06/19 09:04:20  goehring
00106  * JointState added
00107  *
00108  * Revision 1.2  2002/09/12 09:45:58  juengel
00109  * continued change of module/solution mechanisms
00110  *
00111  * Revision 1.1  2002/09/10 15:36:15  cvsadm
00112  * Created new project GT2003 (M.L.)
00113  * - Cleaned up the /Src/DataTypes directory
00114  * - Removed challenge related source code
00115  * - Removed processing of incoming audio data
00116  * - Renamed AcousticMessage to SoundRequest
00117  *
00118  * Revision 1.2  2002/08/22 14:41:03  risler
00119  * added some doxygen comments
00120  *
00121  * Revision 1.1.1.1  2002/05/10 12:40:15  cvsadm
00122  * Moved GT2002 Project from ute to tamara.
00123  *
00124  * Revision 1.4  2002/03/28 16:55:58  risler
00125  * RobotStateDetector receives BodyPercept instead of PerceptCollection
00126  * added switch duration in RobotStateDetector
00127  *
00128  * Revision 1.3  2001/12/21 14:09:39  roefer
00129  * Added several destructors
00130  *
00131  * Revision 1.2  2001/12/10 17:47:07  risler
00132  * change log added
00133  *
00134  */

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