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

Representations/Motion/PIDData.h

Go to the documentation of this file.
00001 /** 
00002 * @file PIDData.h
00003 *
00004 * Definition of PIDData.
00005 * This defines PID values for all joints.
00006 *
00007 * @author Max Risler
00008 */
00009 #ifndef __PIDDATA_H__
00010 #define __PIDDATA_H__
00011 
00012 #include "JointData.h"
00013 #include "Tools/Streams/InOut.h"
00014 
00015 /**
00016 * PID data set. Containing servo gain values for all used joints.
00017 * @author Max Risler
00018 */
00019 class PIDData
00020 {
00021 public:
00022 
00023   /** The pid servo gain values */
00024   int p[JointData::numOfJoint];
00025   int i[JointData::numOfJoint];
00026   int d[JointData::numOfJoint];
00027 
00028   /** Default constructor */
00029   PIDData();
00030 
00031   /** Assignment operator */
00032   PIDData& operator=(const PIDData& other);
00033 
00034   /** Copy constructor */
00035   PIDData(const PIDData& other);
00036 
00037   /** 
00038   * set the values for one joint
00039   */
00040   void setValues(JointData::JointID joint, int ap, int ai, int ad);
00041 
00042   /**
00043   *
00044   */
00045   void setToDefaults();
00046   /**
00047   *
00048   */
00049   void setHeadToDefaults(bool neckTilt = true, bool headPan = true, bool headTilt = true, bool mouth = true, bool earL = true, bool earR = true);
00050   
00051   /** 
00052   * set the values for two leg joints
00053   */
00054   void setLegFJ1Values(int ap, int ai, int ad);
00055   void setLegHJ1Values(int ap, int ai, int ad);
00056   void setLegFJ2Values(int ap, int ai, int ad);
00057   void setLegHJ2Values(int ap, int ai, int ad);
00058   void setLegFJ3Values(int ap, int ai, int ad);
00059   void setLegHJ3Values(int ap, int ai, int ad);
00060 };
00061 
00062 
00063 /**
00064  * Streaming operator that reads PIDData from a stream.
00065  * @param stream The stream from which is read.
00066  * @param pidData The PIDData object.
00067  * @return The stream.
00068  */ 
00069 In& operator>>(In& stream,PIDData& pidData);
00070  
00071 /**
00072  * Streaming operator that writes PIDData to a stream.
00073  * @param stream The stream to write on.
00074  * @param pidData The PIDData object.
00075  * @return The stream.
00076  */ 
00077 Out& operator<<(Out& stream, const PIDData& pidData);
00078 
00079 #endif //__PIDDATA_H__

Generated on Mon Mar 20 22:00:02 2006 for GT2005 by doxygen 1.3.6