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_ 00107 00108 /* 00109 * Change log : 00110 * 00111 * $Log: GetupEngine.h,v $ 00112 * Revision 1.4 2004/05/27 09:29:28 loetzsch 00113 * removed executedMotionRequest from Interfaces 00114 * 00115 * Revision 1.3 2004/05/27 09:13:04 loetzsch 00116 * removed executedMotionRequest from Interfaces 00117 * 00118 * Revision 1.2 2004/05/26 16:10:24 dueffert 00119 * better data types used 00120 * 00121 * Revision 1.1.1.1 2004/05/22 17:19:10 cvsadm 00122 * created new repository GT2004_WM 00123 * 00124 * Revision 1.2 2004/03/08 01:38:52 roefer 00125 * Interfaces should be const 00126 * 00127 * Revision 1.1 2003/10/06 14:10:14 cvsadm 00128 * Created GT2004 (M.J.) 00129 * 00130 * Revision 1.2 2003/09/26 15:27:49 juengel 00131 * Renamed DataTypes to representations. 00132 * 00133 * Revision 1.1.1.1 2003/07/02 09:40:23 cvsadm 00134 * created new repository for the competitions in Padova from the 00135 * tamara CVS (Tuesday 2:00 pm) 00136 * 00137 * removed unused solutions 00138 * 00139 * Revision 1.8 2003/05/02 18:26:18 risler 00140 * SensorDataBuffer added 00141 * replaced SensorData with SensorDataBuffer 00142 * full SensorData resolution now accessible 00143 * 00144 * Revision 1.7 2003/03/06 12:06:50 dueffert 00145 * execute with parameters renamed to avoid inheritance warnings 00146 * 00147 * Revision 1.6 2002/11/20 18:02:29 risler 00148 * added PID values to GT2001MotionNetSpecialActions 00149 * added playDead motion 00150 * 00151 * Revision 1.5 2002/09/17 23:55:20 loetzsch 00152 * - unraveled several datatypes 00153 * - changed the WATCH macro 00154 * - completed the process restructuring 00155 * 00156 * Revision 1.4 2002/09/12 13:17:27 loetzsch 00157 * made member variables of module interfaces protected 00158 * 00159 * Revision 1.3 2002/09/11 20:06:19 loetzsch 00160 * continued experiments with modules/solutions 00161 * 00162 * Revision 1.2 2002/09/11 00:06:58 loetzsch 00163 * continued change of module/solution mechanisms 00164 * 00165 * Revision 1.1 2002/09/10 15:36:14 cvsadm 00166 * Created new project GT2003 (M.L.) 00167 * - Cleaned up the /Src/DataTypes directory 00168 * - Removed challenge related source code 00169 * - Removed processing of incoming audio data 00170 * - Renamed AcousticMessage to SoundRequest 00171 * 00172 * Revision 1.2 2002/08/22 14:41:04 risler 00173 * added some doxygen comments 00174 * 00175 * Revision 1.1.1.1 2002/05/10 12:40:14 cvsadm 00176 * Moved GT2002 Project from ute to tamara. 00177 * 00178 * Revision 1.2 2002/02/23 16:33:07 risler 00179 * finished GetupEngine 00180 * 00181 * Revision 1.1 2002/02/20 16:40:50 risler 00182 * added GetupEngine 00183 * 00184 * 00185 */