00001 00002 // 00003 // Title : FKVelocity.h 00004 // Project : OSCAR 00005 // Created : Thu Feb 8 10:15:06 1996 00006 // Author : Chetan Kapoor 00007 // Platforms : All 00008 // Copyright : Copyright© The University of Texas at Austin, 2002. All rights reserved. 00009 // 00010 // This software and documentation constitute an unpublished work 00011 // and contain valuable trade secrets and proprietary information 00012 // belonging to University. None of the foregoing material may be 00013 // copied or duplicated or disclosed without the express, written 00014 // permission of University. UNIVERSITY EXPRESSLY DISCLAIMS ANY 00015 // AND ALL WARRANTIES CONCERNING THIS SOFTWARE AND DOCUMENTATION, 00016 // INCLUDING ANY WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A 00017 // PARTICULAR PURPOSE, AND WARRANTIES OF PERFORMANCE, AND ANY WARRANTY 00018 // THAT MIGHT OTHERWISE ARISE FROM COURSE OF DEALING OR USAGE OF TRADE. 00019 // NO WARRANTY IS EITHER EXPRESS OR IMPLIED WITH RESPECT TO THE USE OF 00020 // THE SOFTWARE OR DOCUMENTATION. Under no circumstances shall 00021 // University be liable for incidental, special, indirect, direct or 00022 // consequential damages or loss of profits, interruption of business, 00023 // or related expenses which may arise from use of software or documentation, 00024 // including but not limited to those resulting from defects in software 00025 // and/or documentation, or loss or inaccuracy of data of any kind. 00026 // Purpose : Class to compute Translational and Rotational G functions 00027 // 00028 //---------------------------------------------------------------------------- 00029 // 00030 // Classes: 00031 // <none> 00032 // 00033 // Global Functions: 00034 // <none> 00035 // 00036 // Global Variables: 00037 // <none> 00038 // 00039 //---------------------------------------------------------------------------- 00040 // 00041 // $Revisions$ 00042 // 4-30-97: Troy Harden. I got rid of the local var Pl since it wasted 00043 // space. Changed SetLinkPoints(local_positions) function to convert 00044 // the local positions to global positions by calling the 00045 // calculateGlobalPosition() function and then store them in Pg. 00046 // calculateTranslationalGfunctions(int joint_no) no longer calls 00047 // calculateGlobalPosition() since it is no longer necessary. 00048 // 00049 // Also added a new function SetGlLinkPoints(global_positions) which 00050 // directly sets Pg if the user has global instead of local positions. 00051 // 00052 // 5-5-97: Troy Harden. I added two new functions that calculate and 00053 // return G functions for a single link instead of all links. The 00054 // two functions are: 00055 // GetTranslationalGfunction(int joint_no) 00056 // GetTranslationalGfunction(int joint_no, const Vector& joint_angles) 00057 // 00058 // $Log: FKVelocity.h,v $ 00059 // Revision 1.8 2007/03/30 20:33:48 aspencer 00060 // Added functionality to change link points for G and H function calculation one frame at a time. 00061 // 00062 // Revision 1.7 2005/03/17 21:27:52 chetan 00063 // Changed RRReferenceFrame to ReferenceFrame 00064 // 00065 // Revision 1.6 2005/03/14 21:53:04 pmarch 00066 // Added to namespace OSCAR and removed "RR" from front of class names. 00067 // 00068 // Revision 1.5 2004/07/23 22:19:54 chetan 00069 // Made changes to compile with Warning Level 4 and also under the latest C++ standard 00070 // 00071 // Revision 1.4 2004/05/26 20:10:08 pmarch 00072 // Added /defgroup and /ingroup tags. 00073 // 00074 // Revision 1.3 2004/05/11 21:31:27 eswint 00075 // - Added comments 00076 // 00077 // Revision 1.2 2003/09/09 19:38:54 rctaylor 00078 // Modified calculation of translational G functions to use the ReferenceFrame enum. This allows the calculations to be done using global or local linkPoints based on the current mode. The default is using local linkPoints set to all zero thus matching the Jacobian. 00079 // 00080 // Revision 1.1 2003/08/18 20:32:12 pmarch 00081 // Initial commit of ForwardKinematics 00082 // 00083 // 00085 00086 #ifndef FKVelcoity_hpp 00087 #define FKVelcoity_hpp 00088 00089 #include "ForwardKinematics/FKJacobian.h" 00090 #include "Math/Tensor.h" 00091 00092 00094 namespace OSCAR { 00101 class FKVelocity : public FKPosition 00102 { 00103 00104 public: 00117 FKVelocity(const String& DHfilename, OSCARError& err = DUMMY_ERROR(noError)); 00118 00119 00129 FKVelocity(const DHData& dhParams, OSCARError& err = DUMMY_ERROR(noError)); 00130 00131 00132 00138 FKVelocity(const FKVelocity& fkv); 00139 00140 00146 FKVelocity& operator=(const FKVelocity& fkv); 00147 00148 00158 void SetLinkPoints(const ReferenceFrame frame); 00159 00160 00175 bool SetLinkPoints(const Matrix& linkPoints, const ReferenceFrame frame=Local); 00176 00191 bool SetLinkPoint(const Vector3& newPoint, unsigned int frameNum); 00192 00193 00199 const Tensor* GetRotationalGfunctions(void); 00200 00208 const Tensor* GetRotationalGfunctions(const Vector& jointVector); 00209 00210 00216 const Tensor* GetTranslationalGfunctions(void); 00217 00225 const Tensor* GetTranslationalGfunctions(const Vector& jointVector); 00226 00227 00236 const Matrix* GetTranslationalGfunction(unsigned int jointNo); 00237 00238 00249 const Matrix* GetTranslationalGfunction(unsigned int jointNo, const Vector& jointVector); 00250 00251 00252 virtual ~FKVelocity(); 00253 00254 protected: 00255 ReferenceFrame frameMode; 00256 00257 Matrix *localLinkPoints; 00258 // for which trans_g_func is to be calculated. 00259 00260 Matrix *globalLinkPoints; 00261 // for which trans_g_func is to be calculated. 00262 00263 Tensor *rot_g_func; 00264 // first-order influence coefficients, i.e. [Gjk]n. 00265 00266 Tensor *trans_g_func; 00267 // translational first-order influence 00268 // coefficients, i.e. [Gp]n 00269 00270 void calculateGlobalPosition(unsigned int joint_no, Vector3* calcGlob); 00271 void calculateRotationalGfunctions(void); 00272 void calculateTranslationalGfunctions(unsigned int joint_no); 00273 00274 }; 00275 00276 #include "ForwardKinematics/FKVelocity.ipp" 00277 00278 } 00279 #endif // FKVelocity_hpp 00280
| RRG Homepage | OSCAR Overview | OSCAR Tutorials | Simulations |