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

Modules/GetupEngine/GetupEngine.h

Go to the documentation of this file.
00001 /**
00002 * @file GetupEngine.h
00003 * 
00004 * Definition of class GetupEngine
00005 * 
00006 * @author Max Risler
00007 */
00008 
00009 #ifndef __GetupEngine_h_
00010 #define __GetupEngine_h_
00011 
00012 #include "Tools/Module/Module.h"
00013 
00014 #include "Representations/Perception/SensorDataBuffer.h"
00015 #include "Representations/Perception/BodyPosture.h"
00016 #include "Representations/Motion/JointData.h"
00017 #include "Representations/Motion/PIDData.h"
00018 #include "Representations/Motion/OdometryData.h"
00019 #include "Representations/Motion/MotionInfo.h"
00020 
00021 /**
00022 * @class GetupEngineInterfaces
00023 * 
00024 * Interfaces of the GetupEngine module.
00025 */
00026 class GetupEngineInterfaces
00027 {
00028 public:
00029   /** Constructor */
00030   GetupEngineInterfaces(
00031     const MotionRequest::MotionID& lastMotionType,
00032     const SensorDataBuffer& sensorDataBuffer,
00033     const MotionRequest& motionRequest,
00034     const BodyPosture& bodyPosture,
00035     PIDData& pidData,
00036     OdometryData& odometryData,
00037     MotionInfo& motionInfo)
00038     : lastMotionType(lastMotionType),
00039     sensorDataBuffer(sensorDataBuffer),
00040     motionRequest(motionRequest),
00041     bodyPosture(bodyPosture),
00042     pidData(pidData),
00043     odometryData(odometryData),
00044     motionInfo(motionInfo)
00045   {}
00046 protected:  
00047   /** The motion type of the previous frame */
00048   const MotionRequest::MotionID& lastMotionType;
00049   
00050   /** The current sensor data */
00051   const SensorDataBuffer& sensorDataBuffer;
00052   
00053   /** The current motion request */
00054   const MotionRequest& motionRequest;
00055   
00056   /** The current body posture */
00057   const BodyPosture& bodyPosture;
00058   
00059   /** The current PID servo gains */
00060   PIDData& pidData;
00061 
00062   /** Calculated odometry data */
00063   OdometryData& odometryData;
00064 
00065   /** The neck height and the body tilt to be estimated by the getup engine */
00066   MotionInfo& motionInfo;
00067 };
00068 
00069 /**
00070 * @class GetupEngine
00071 * 
00072 * A generic class for getup engine modules.
00073 *
00074 * The getup engine lets the robot stand up from any position
00075 * by generating appropriate joint data.
00076 *
00077 * @author Max Risler
00078 */
00079 class GetupEngine : public Module, protected GetupEngineInterfaces
00080 {
00081 public:
00082 /*
00083 * Constructor.
00084 * @param interfaces The paramters of the GetupEngine module.
00085   */
00086   GetupEngine(const GetupEngineInterfaces& interfaces)
00087     : GetupEngineInterfaces(interfaces)
00088   {}
00089   
00090   /**
00091   * calculates the next joint data set
00092   * @param jointData stores calculated frame
00093   * @return true if next set should be calculated by GetupEngine
00094   *         false if change to other module can occur
00095   */
00096   virtual bool executeParameterized(JointData& jointData) = 0;
00097   
00098   /** Destructor */
00099   virtual ~GetupEngine() {}
00100   
00101 protected:
00102   /** That function is not used but has to be implemented */
00103   virtual void execute() {};
00104 };
00105 
00106 #endif //__GetupEngine_h_

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