00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 00055 00056 00057 #ifndef Kinematics_h 00058 #define Kinematics_h 00059 00060 #include "Base/Base.h" 00061 #include "Math/JointVector.h" 00062 #include "Math/HandPose.h" 00063 #include "Math/Xform.h" 00064 #include "FileData/DHData.h" 00065 #include "ForwardKinematics/FKErrors.h" 00066 00067 00068 namespace OSCAR { 00069 00078 class Kinematics : public virtual Base 00079 { 00080 public: 00088 enum ReferenceFrame {Local,Global}; 00089 00103 Kinematics(const String& dhParamFileName, OSCARError& err = DUMMY_ERROR(noError), const String& name = String(" ")); 00104 00105 00114 Kinematics(const DHData& dhParams, OSCARError& err = DUMMY_ERROR(noError), const String& name = String(" ")); 00115 00116 00128 Kinematics(unsigned int DOF, OSCARError& err = DUMMY_ERROR(noError), const String& name = String(" ")); 00129 00130 00138 Kinematics(const Kinematics& kin); 00139 00140 00148 Kinematics& operator=(const Kinematics& kin); 00149 00150 00158 unsigned int GetDOF() const; 00159 00160 00169 virtual void SetTool(const Vector3D& toolPointVector); 00170 00171 00182 virtual void SetTool(const Xform& toolPose); 00183 00184 00194 virtual void SetBase(const Vector3D& location); 00195 00196 00206 virtual void SetBase(const Xform& pose); 00207 00208 00217 virtual bool IsToolSet() const; 00218 00227 virtual bool IsBaseSet() const; 00228 00229 00241 virtual bool GetTool(Vector3D& toolPoint) const; 00242 00254 virtual bool GetTool(Xform& toolPose) const; 00255 00267 virtual bool GetBase(Vector3D& location) const; 00268 00280 virtual bool GetBase(Xform& pose) const; 00281 00282 00292 const DHData* GetDHParameters() const; 00293 00294 00295 virtual ~Kinematics(); 00296 protected: 00297 unsigned int DOF; 00298 bool toolFlag; // maintains status about tool point being set via Vector (x,y,z) 00299 bool baseFlag; // maintains whether robot pose is set 00300 Xform toolPose; // x, y, z of tool point expressed in the local frame of the last link 00301 Xform basePose; // relative position and orientation of the robot base frame w.r.t to world frame 00302 DHData *dhParameters; // a pointer to a DHData object to hold geometrical information 00303 }; 00304 00305 #include "ForwardKinematics/Kinematics.ipp" 00306 00307 } 00308 #endif // Kinematics_h
| RRG Homepage | OSCAR Overview | OSCAR Tutorials | Simulations |