basic/kinematics/DH_Link.h

Go to the documentation of this file.
00001 //## begin module%3707C4FC037A.cm preserve=no
00002 //        %X% %Q% %Z% %W%
00003 //## end module%3707C4FC037A.cm
00004 
00005 //## begin module%3707C4FC037A.cp preserve=no
00006 //## end module%3707C4FC037A.cp
00007 
00008 //## Module: DH_Link%3707C4FC037A; Pseudo Package specification
00009 //## Source file: E:\mpk\code\Kinematics\DH_Link.h
00010 
00011 #ifndef DH_Link_h
00012 #define DH_Link_h 1
00013 
00014 //## begin module%3707C4FC037A.additionalIncludes preserve=no
00015 //## end module%3707C4FC037A.additionalIncludes
00016 
00017 //## begin module%3707C4FC037A.includes preserve=yes
00018 //## end module%3707C4FC037A.includes
00019 
00020 // LinkBase
00021 #include "Kinematics\LinkBase.h"
00022 
00023 class VRML_Reader;
00024 class Frame;
00025 //class ObjectBase;
00026 #include "geometry\objectbase.h"
00027 class VRML_20_Reader;
00028 class IfstreamWithComments;
00029 
00030 //## begin module%3707C4FC037A.additionalDeclarations preserve=yes
00031 
00032 enum DH_Parameter
00033 {
00034         DH_NONE = -1,
00035         DH_A,
00036         DH_ALPHA,
00037         DH_D,
00038         DH_THETA
00039 };
00040 //## end module%3707C4FC037A.additionalDeclarations
00041 
00042 
00043 //## begin DH_Link%3707C4FC037A.preface preserve=yes
00044 //## end DH_Link%3707C4FC037A.preface
00045 
00046 //## Class: DH_Link%3707C4FC037A
00047 //## Category: Kinematics%3707C4D300C8
00048 //## Persistence: Transient
00049 //## Cardinality/Multiplicity: n
00050 
00051 //## Uses: <unnamed>%3724D29F0230;Frame { -> F}
00052 //## Uses: <unnamed>%3798E16101B3;ObjectBase { -> F}
00053 //## Uses: <unnamed>%37BC4E200004;IfstreamWithComments { -> F}
00054 //## Uses: <unnamed>%37BC534D013F;VRML_Reader { -> F}
00055 //## Uses: <unnamed>%37CC822D03A4;VRML_20_Reader { -> F}
00056 
00057 class DH_Link : public LinkBase  //## Inherits: <unnamed>%3707C5050046
00058 {
00059   //## begin DH_Link%3707C4FC037A.initialDeclarations preserve=yes
00060   //## end DH_Link%3707C4FC037A.initialDeclarations
00061 
00062   public:
00063     //## Constructors (specified)
00064       //## Operation: DH_Link%924391851
00065       //        construtor.  Requires a frame manager.
00066       DH_Link (FrameManager*  frameManager);
00067 
00068       //## Operation: DH_Link%925178921
00069       //        copy constructor
00070       DH_Link (const DH_Link& right);
00071 
00072     //## Destructor (generated)
00073       virtual ~DH_Link();
00074 
00075 
00076     //## Other Operations (specified)
00077       //## Operation: UpdateFrames%924391847
00078       //        Updates the frame with the most recent values of all the
00079       //        joint variables.
00080       virtual void UpdateFrames () const;
00081 
00082       //## Operation: FrameNum%924391852
00083       //        this function returns the frame number that this link
00084       //        updates
00085       unsigned int FrameNum () const;
00086 
00087       //## Operation: Clone%924739818
00088       //        clones the link given a pointer to it.
00089       virtual LinkBase* Clone () const;
00090 
00091       //## Operation: SetAlpha%925324839
00092       //        specify the alpha DH paramter
00093       void SetAlpha (const double value);
00094 
00095       //## Operation: SetA%925324840
00096       //        specify the A dh-parameter
00097       void SetA (const double value);
00098 
00099       //## Operation: SetD%925324841
00100       //        specify the d dh parameter
00101       void SetD (const double value);
00102 
00103       //## Operation: SetTheta%925324842
00104       //        specify the theta dh-parameter
00105       void SetTheta (const double value);
00106 
00107       //Added by Zhenwang.Yao 2003.01
00108       __inline double GetA() const {return a;};
00109       __inline double GetD() const {return d;};
00110       __inline double GetAlpha() const {return alpha;};
00111       __inline double GetTheta() const {return theta;};
00112           //End Added by Zhenwang.Yao
00113 
00114 
00115       //## Operation: SetControllingParameter%925420850
00116       //        specify which of the DH parameters is driven by the
00117       //        joint variable
00118       void SetControllingParameter (DH_Parameter parameter);
00119 
00120       //## Operation: SetJointVariable%925420852
00121       //        alter the paramter controlled by the joint variable
00122       virtual void SetJointVariable (const double newValue);
00123 
00124       //## Operation: DoesLinkControlFrame%928263349
00125       //        determines if the link controlls the frame in question
00126       virtual bool DoesLinkControlFrame (const unsigned int frameNum) const;
00127 
00128       //## Operation: Serialize%933801284
00129       //        serailzes the link to a stream
00130       virtual void Serialize (ostream& os) const;
00131 
00132       //## Operation: AddObject%932766018
00133       //        adds an object to the frame that this link controls
00134       virtual void AddObject (const ObjectBase* object);
00135 
00136       //## Operation: DeSerialize%933801287
00137       //        reads the link from a stream
00138       virtual bool DeSerialize (IfstreamWithComments& is);
00139 
00140       //## Operation: GetJointVariable%940357561
00141       double GetJointVariable () const;
00142 
00143           //exposes the type of this joint
00144           DH_Parameter GetJointType() const;
00145 
00146       //## Operation: GetFrame%943395407
00147       Frame GetFrame () const;
00148 
00149       //Added by Zhenwang.Yao 2003.01
00150       Frame& DH_Link::GetFrame (Frame &frame);
00151           //End Added by Zhenwang.Yao 2003.01
00152 
00153 
00154     // Additional Public Declarations
00155       //## begin DH_Link%3707C4FC037A.public preserve=yes
00156           friend std::ostream & operator<<( std::ostream &os, const DH_Link& v ) ;
00157           friend std::istream & operator>>( std::istream &is, DH_Link& v ) ;
00158 
00159       //## end DH_Link%3707C4FC037A.public
00160   protected:
00161     // Data Members for Class Attributes
00162 
00163       //## Attribute: frame%37191CB001AE
00164       //## begin DH_Link::frame%37191CB001AE.attr preserve=no  protected: unsigned int {UA} 
00165       unsigned int frame;
00166       //## end DH_Link::frame%37191CB001AE.attr
00167 
00168       //## Attribute: alpha%37225EA302C6
00169       //## begin DH_Link::alpha%37225EA302C6.attr preserve=no  protected: double {UA} 
00170       double alpha;
00171       //## end DH_Link::alpha%37225EA302C6.attr
00172 
00173       //## Attribute: a%37225EAC0186
00174       //## begin DH_Link::a%37225EAC0186.attr preserve=no  protected: double {UA} 
00175       double a;
00176       //## end DH_Link::a%37225EAC0186.attr
00177 
00178       //## Attribute: d%37225EB00384
00179       //## begin DH_Link::d%37225EB00384.attr preserve=no  protected: double {UA} 
00180       double d;
00181       //## end DH_Link::d%37225EB00384.attr
00182 
00183       //## Attribute: theta%37225EB70258
00184       //## begin DH_Link::theta%37225EB70258.attr preserve=no  protected: double {UA} 
00185       double theta;
00186       //## end DH_Link::theta%37225EB70258.attr
00187 
00188       //## Attribute: q%37225ED50212
00189       //## begin DH_Link::q%37225ED50212.attr preserve=no  protected: double* {UA} 
00190       double* q;
00191       //## end DH_Link::q%37225ED50212.attr
00192 
00193       //## Attribute: type%37A8AD2D0230
00194       //## begin DH_Link::type%37A8AD2D0230.attr preserve=no  protected: DH_Parameter {UA} 
00195       DH_Parameter type;
00196       //## end DH_Link::type%37A8AD2D0230.attr
00197 
00198     // Additional Protected Declarations
00199       //## begin DH_Link%3707C4FC037A.protected preserve=yes
00200       //## end DH_Link%3707C4FC037A.protected
00201 
00202   private:
00203     // Additional Private Declarations
00204       //## begin DH_Link%3707C4FC037A.private preserve=yes
00205       //## end DH_Link%3707C4FC037A.private
00206 
00207   private: //## implementation
00208     // Additional Implementation Declarations
00209       //## begin DH_Link%3707C4FC037A.implementation preserve=yes
00210       //## end DH_Link%3707C4FC037A.implementation
00211 
00212 };
00213 
00214 //## begin DH_Link%3707C4FC037A.postscript preserve=yes
00215 std::ostream & operator<<( std::ostream &os, const DH_Link& v ) ;
00216 IfstreamWithComments & operator>>( IfstreamWithComments &is, DH_Link& v ) ;
00217 //## end DH_Link%3707C4FC037A.postscript
00218 
00219 // Class DH_Link 
00220 
00221 //## begin module%3707C4FC037A.epilog preserve=yes
00222 //## end module%3707C4FC037A.epilog
00223 
00224 
00225 #endif

Generated on Sat Apr 1 21:30:34 2006 for Motion Planning Kernel by  doxygen 1.4.6-NO