00001 00002 // 00003 // Title : FKJacobian.h 00004 // Project : OSCAR 00005 // Created : Thu Feb 8 10:15:06 1996 00006 // Author : Chetan Kapoor 00007 // Platforms : All 00008 // Copyright : The University of Texas at Austin 00009 // All Rights Reserved. 00010 // Access : Company Confidential 00011 // Purpose : Forward Kinematics Class for computing the jacobian 00012 // 00013 //---------------------------------------------------------------------------- 00014 // 00015 // Classes: 00016 // <none> 00017 // 00018 // Global Functions: 00019 // <none> 00020 // 00021 // Global Variables: 00022 // <none> 00023 // 00024 //---------------------------------------------------------------------------- 00025 // 00026 // $Revisions$ 00027 // 00028 // $Log: FKJacobian.h,v $ 00029 // Revision 1.7 2007/02/28 19:03:55 pmarch 00030 // Added ConvertVelocityToFixedXYZ() method. 00031 // 00032 // Revision 1.6 2007/02/01 19:05:19 chetan 00033 // Added another method 00034 // 00035 // Revision 1.5 2005/03/14 21:52:58 pmarch 00036 // Added to namespace OSCAR and removed "RR" from front of class names. 00037 // 00038 // Revision 1.4 2004/07/23 22:19:49 chetan 00039 // Made changes to compile with Warning Level 4 and also under the latest C++ standard 00040 // 00041 // Revision 1.3 2004/07/08 19:22:48 chetan 00042 // Changed activeInputs declared in FKJacobian.C to a pointer. This is done so that it is created after SUCCESSFUL base class initialization. Previously, it was being initialized in the constructor of FKKJacobian as size DOF without any checks for successful base class initialization 00043 // 00044 // Revision 1.2 2004/05/26 20:10:11 pmarch 00045 // Added /defgroup and /ingroup tags. 00046 // 00047 // Revision 1.1 2003/08/18 20:32:20 pmarch 00048 // Initial commit of ForwardKinematics 00049 // 00050 // 00052 #ifndef FKJacobian_hpp 00053 #define FKJacobian_hpp 00054 00055 #include "Math/JointVector.h" 00056 #include "ForwardKinematics/FKPosition.h" 00057 #include "ForwardKinematics/FKJacobianBase.h" 00058 00060 namespace OSCAR { 00061 00062 00072 class FKJacobian : public FKPosition, public FKJacobianBase 00073 { 00074 public: 00083 enum JacobianType {Full = 0, Partial = 1}; 00084 00095 FKJacobian(const String& dhFilename, OSCARError& err = DUMMY_ERROR(noError)); 00096 00097 00108 FKJacobian(const DHData& dhParams, OSCARError& err = DUMMY_ERROR(noError)); 00109 00117 FKJacobian(const FKJacobian& fkj); 00118 00126 FKJacobian& operator=(const FKJacobian& fkj); 00127 00137 bool SetActiveOutputs( const CoordinateStatusArray& activeOutputs ); 00138 00139 00148 const CoordinateStatusArray& GetActiveOutputs( ) const; 00149 00156 unsigned int GetNumberOfActiveOutputs( ) const; 00157 00168 const Matrix* GetJacobian( JacobianType JType = Partial); 00169 00179 const Matrix* GetPreviouslyComputedJacobian( JacobianType JType = Partial); 00180 00191 const Matrix* GetJacobian( const Vector& jointVector); 00192 00193 00203 const Matrix* GetJacobian( const JointVector& jointVector); 00204 00213 const Matrix* GetJacobianTranspose( JacobianType JacobianType = Partial) ; 00214 00228 bool ConvertVelocityToFixedXYZ(const OSCAR::HandPose& handPosition, OSCAR::HandPose& handVelocity); 00229 00230 virtual ~FKJacobian(); 00231 protected: 00232 CoordinateSpace activeOutputs; 00233 CoordinateSpace* activeInputs; 00234 unsigned int nActiveOutputs; 00235 unsigned int nActiveInputs; 00236 00237 Matrix* jacobian; // holds [6 x n] Jacobian 00238 Matrix* jacobianTranspose; 00239 Matrix* partialJacobian; // holds [nActiveOutpus x nActiveInputs] Jacobian 00240 Matrix* partialJacobianTranspose; 00241 00242 virtual void calculateJacobian(void); 00243 virtual void calculateJacobianColumn(int jointNo); 00244 virtual void extractPartialJacobian( ); 00245 virtual void resizePartialJacobian( ); 00246 00247 }; 00248 00249 #include "ForwardKinematics/FKJacobian.ipp" 00250 00251 } 00252 #endif //FKJacobian_hpp 00253 00254 00255 00256
| RRG Homepage | OSCAR Overview | OSCAR Tutorials | Simulations |