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

Representations/Motion/JointDataSequence.h

Go to the documentation of this file.
00001 /** 
00002 * @file JointDataSequence.h
00003 *
00004 * Definition of JointDataSequence class.
00005 * The JointDataSequence is a sequence of joint data sets 
00006 * with timing and interpolation information.
00007 * This is sent from PC to robot and executed by DebugMotionControl.
00008 *
00009 * @author Max Risler
00010 */
00011 #ifndef __JOINTDATASEQUENCE_H__
00012 #define __JOINTDATASEQUENCE_H__
00013 
00014 #include "JointData.h"
00015 
00016 #include "Tools/Streams/InOut.h"
00017 
00018 /** Maximum number of entries per sequence. */
00019 static const int jointDataSequenceMaxNumOfEntries = 400;
00020 
00021 /**
00022 * The JointDataSequence is a sequence of joint data sets 
00023 * with timing and interpolation information.
00024 *
00025 * This is sent from PC to robot and executed by DebugMotionControl.
00026 */
00027 class JointDataSequence
00028 {
00029 public:
00030   /** Constructor */
00031   JointDataSequence();
00032   
00033  /** Assignment operator */
00034   JointDataSequence& operator=(const JointDataSequence& other);
00035 
00036   /** Number of Entries */
00037   int numOfEntries;
00038 
00039   /** If true sequence is executed repeatedly */
00040   bool loop;
00041 
00042   /** adds an entry at end of the sequence */
00043   void addEntry(const JointData& jointData, bool interp, int rep);
00044 
00045 
00046   /** The joint data entries */
00047   JointData entry[jointDataSequenceMaxNumOfEntries];
00048 
00049   /** Number of times an entry gets repeated */
00050   int repeats[jointDataSequenceMaxNumOfEntries];
00051 
00052   /** If true linear interpolation will be done to get to this entry from last */ 
00053   bool interpolate[jointDataSequenceMaxNumOfEntries];
00054 };
00055 
00056 /**
00057  * Streaming operator that reads a JointDataSequence from a stream.
00058  * @param stream The stream from which is read.
00059  * @param jointDataSequence The JointDataSequence object.
00060  * @return The stream.
00061  */ 
00062 In& operator>>(In& stream,JointDataSequence& jointDataSequence);
00063  
00064 /**
00065  * Streaming operator that writes a JointDataSequence to a stream.
00066  * @param stream The stream to write on.
00067  * @param jointDataSequence The JointDataSequence object.
00068  * @return The stream.
00069  */ 
00070 Out& operator<<(Out& stream, const JointDataSequence& jointDataSequence);
00071 
00072 #endif //__JOINTDATASEQUENCE_H__
00073 
00074 /*
00075  * Change log :
00076  * 
00077  * $Log: JointDataSequence.h,v $
00078  * Revision 1.1.1.1  2004/05/22 17:25:18  cvsadm
00079  * created new repository GT2004_WM
00080  *
00081  * Revision 1.1  2003/10/07 10:07:01  cvsadm
00082  * Created GT2004 (M.J.)
00083  *
00084  * Revision 1.1.1.1  2003/07/02 09:40:22  cvsadm
00085  * created new repository for the competitions in Padova from the 
00086  * tamara CVS (Tuesday 2:00 pm)
00087  *
00088  * removed unused solutions
00089  *
00090  * Revision 1.3  2003/02/05 12:07:30  dueffert
00091  * more mof lines allowed
00092  *
00093  * Revision 1.2  2002/11/28 16:50:43  risler
00094  * added addEntry
00095  *
00096  * Revision 1.1  2002/09/10 15:26:40  cvsadm
00097  * Created new project GT2003 (M.L.)
00098  * - Cleaned up the /Src/DataTypes directory
00099  * - Removed Challenge Code
00100  * - Removed processing of incoming audio data
00101  * - Renamed AcousticMessage to SoundRequest
00102  *
00103  * Revision 1.3  2002/08/22 14:41:03  risler
00104  * added some doxygen comments
00105  *
00106  * Revision 1.2  2002/07/23 13:32:57  loetzsch
00107  * new streaming classes
00108  *
00109  * removed many #include statements
00110  *
00111  * Revision 1.1.1.1  2002/05/10 12:40:13  cvsadm
00112  * Moved GT2002 Project from ute to tamara.
00113  *
00114  * Revision 1.2  2002/02/21 18:02:51  risler
00115  * added assignment operator
00116  *
00117  * Revision 1.1  2002/02/08 22:31:45  risler
00118  * added JointDataSequence, finished DebugMotionControl
00119  *
00120  */

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