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__

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