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_

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