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   * set the values for two leg joints
00049   */
00050   void setLegFJ1Values(int ap, int ai, int ad);
00051   void setLegHJ1Values(int ap, int ai, int ad);
00052   void setLegFJ2Values(int ap, int ai, int ad);
00053   void setLegHJ2Values(int ap, int ai, int ad);
00054   void setLegFJ3Values(int ap, int ai, int ad);
00055   void setLegHJ3Values(int ap, int ai, int ad);
00056 };
00057 
00058 
00059 /**
00060  * Streaming operator that reads PIDData from a stream.
00061  * @param stream The stream from which is read.
00062  * @param pidData The PIDData object.
00063  * @return The stream.
00064  */ 
00065 In& operator>>(In& stream,PIDData& pidData);
00066  
00067 /**
00068  * Streaming operator that writes PIDData to a stream.
00069  * @param stream The stream to write on.
00070  * @param pidData The PIDData object.
00071  * @return The stream.
00072  */ 
00073 Out& operator<<(Out& stream, const PIDData& pidData);
00074 
00075 #endif //__PIDDATA_H__
00076 
00077 /*
00078  * Change log :
00079  * 
00080  * $Log: PIDData.h,v $
00081  * Revision 1.1.1.1  2004/05/22 17:25:30  cvsadm
00082  * created new repository GT2004_WM
00083  *
00084  * Revision 1.2  2003/10/29 13:20:13  juengel
00085  * added method "setToDefaults"
00086  *
00087  * Revision 1.1  2003/10/07 10:07:01  cvsadm
00088  * Created GT2004 (M.J.)
00089  *
00090  * Revision 1.1.1.1  2003/07/02 09:40:22  cvsadm
00091  * created new repository for the competitions in Padova from the 
00092  * tamara CVS (Tuesday 2:00 pm)
00093  *
00094  * removed unused solutions
00095  *
00096  * Revision 1.2  2003/05/16 17:02:17  roefer
00097  * JAM removed
00098  *
00099  * Revision 1.1  2002/11/19 17:13:05  risler
00100  * added datatype PIDData
00101  * support for sending new pid values at runtime
00102  *
00103  */

Generated on Thu Sep 23 19:57:35 2004 for GT2004 by doxygen 1.3.6