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

Modules/MotionControl/MotionControl.h

Go to the documentation of this file.
00001 /**
00002 * @file MotionControl.h
00003 * 
00004 * Definition of class MotionControl.
00005 */
00006 
00007 #ifndef __MotionControl_h_
00008 #define __MotionControl_h_
00009 
00010 #include "Tools/Module/Module.h"
00011 
00012 #include "Representations/Motion/HeadMotionRequest.h"
00013 #include "Representations/Motion/JointDataBuffer.h"
00014 #include "Representations/Motion/PIDData.h"
00015 #include "Representations/Motion/OdometryData.h"
00016 #include "Representations/Motion/MotionInfo.h"
00017 
00018 #include "Representations/Perception/SensorDataBuffer.h"
00019 #include "Representations/Perception/BodyPosture.h"
00020 
00021 #include "Modules/WalkingEngine/GT2004ParameterSet.h"
00022 
00023 //****for GT2005WalkingEngine****
00024 #include "Modules/WalkingEngine/GT2005Parameters.h"
00025 #include "Modules/WalkingEngine/GT2005DebugData.h"
00026 
00027 #ifdef _WIN32
00028 #pragma warning(disable:4786) 
00029 // the constructor with all it's long parameter type names results in a too
00030 // long debug identifier
00031 #endif
00032 
00033 /**
00034 * @class MotionControlInterfaces
00035 *
00036 * The interfaces of the MotionControl module.
00037 */
00038 class MotionControlInterfaces
00039 {
00040 public:
00041   /** Constructor */ 
00042   MotionControlInterfaces(
00043     const unsigned long& frameNumber,
00044     const MotionRequest& motionRequest, 
00045     const HeadMotionRequest& headMotionRequest,
00046     const SensorDataBuffer& sensorDataBuffer,
00047     const BodyPosture& bodyPosture,
00048     const InvKinWalkingParameters& invKinWalkingParameters,
00049     const GT2004Parameters& gt2004Parameters,
00050     const unsigned long& walkParameterTimeStamp,
00051     const bool& receivedNewSensorData,
00052     JointDataBuffer& jointDataBuffer, 
00053     PIDData& pidData,
00054     OdometryData& odometryData,
00055     MotionInfo& motionInfo,
00056     bool headIsBlockedBySpecialActionOrWalk,
00057   //****for GT2005WalkingEngine****
00058   GTWalkParametersIndividual& gt2005Parameters,
00059   GT2005DebugData& gt2005DebugData)
00060     :
00061     frameNumber(frameNumber),
00062     motionRequest(motionRequest),
00063     headMotionRequest(headMotionRequest),
00064     sensorDataBuffer(sensorDataBuffer),
00065     bodyPosture(bodyPosture),
00066     invKinWalkingParameters(invKinWalkingParameters),
00067     gt2004Parameters(gt2004Parameters),
00068     walkParameterTimeStamp(walkParameterTimeStamp),
00069     receivedNewSensorData(receivedNewSensorData),
00070     jointDataBuffer(jointDataBuffer),
00071     pidData(pidData),
00072     odometryData(odometryData),
00073     motionInfo(motionInfo),
00074     headIsBlockedBySpecialActionOrWalk(headIsBlockedBySpecialActionOrWalk),
00075   //****for GT2005WalkingEngine****
00076   gt2005Parameters(gt2005Parameters),
00077   gt2005DebugData(gt2005DebugData)
00078 {}
00079 
00080 protected:  
00081   /** A reference to the frame number */
00082   const unsigned long& frameNumber;
00083 
00084   /** A request from the behavior control */  
00085   const MotionRequest& motionRequest;
00086   
00087   /** Head joint values from the head control */
00088   const HeadMotionRequest& headMotionRequest;
00089   
00090   /** The current body sensor data */
00091   const SensorDataBuffer& sensorDataBuffer;
00092   
00093   /** The current body posture */
00094   const BodyPosture& bodyPosture;
00095   
00096   /** walking parameter sets to be used by the WalkingEngine, eg calculated by evolution behavior */
00097   const InvKinWalkingParameters& invKinWalkingParameters;
00098   const GT2004Parameters& gt2004Parameters;
00099   const unsigned long& walkParameterTimeStamp;
00100 
00101   /** Indicates that the Motion Process received a new SensorDataBuffer */
00102   const bool& receivedNewSensorData;
00103   
00104   /** A buffer of joint data to be filled */
00105   JointDataBuffer& jointDataBuffer;
00106 
00107   /** The current PID servo gains */
00108   PIDData& pidData;
00109   
00110   /** The odometry to be incremented */
00111   OdometryData& odometryData;
00112 
00113   /** The height of the neck and the body tilt to be calculated */
00114   MotionInfo& motionInfo;
00115 
00116   /** Specifies if the head is blocked by a special action or walk.*/
00117   bool headIsBlockedBySpecialActionOrWalk;
00118 
00119   //****for GT2005WalkingEngine****
00120   GTWalkParametersIndividual& gt2005Parameters;
00121   GT2005DebugData& gt2005DebugData;
00122 };
00123 
00124 /** 
00125 * @class MotionControl
00126 *
00127 * A generic class for motion control modules.
00128 * MotionControl is responsible for setting values for the joints of the robot 
00129 */
00130 class MotionControl : public Module, public MotionControlInterfaces, public RobotDimensions
00131 {
00132 public:
00133 /*
00134 * Constructor.
00135 * @param interfaces The paramters of the MotionControl module.
00136   */
00137   MotionControl(const MotionControlInterfaces& interfaces)
00138     : MotionControlInterfaces(interfaces),
00139       RobotDimensions(getRobotConfiguration().getRobotDimensions())
00140   {}
00141   
00142   /** Destructor */
00143   virtual ~MotionControl() {}
00144 };
00145 
00146 #endif //__MotionControl_h_

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