Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

FKPosition.h

Go to the documentation of this file.
00001 
00002 //
00003 //       Title       : FKPosition.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     : Forward Kinematics at the Position level
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 //
00043 //       $Log: FKPosition.h,v $
00044 //       Revision 1.5  2007/02/01 05:52:43  chetan
00045 //       Changed GetGlobalTransformaton methods so that they can return the tool point xform
00046 //
00047 //       Revision 1.4  2005/03/14 21:53:00  pmarch
00048 //       Added to namespace OSCAR and removed "RR" from front of class names.
00049 //
00050 //       Revision 1.3  2004/07/23 22:19:51  chetan
00051 //       Made changes to compile with Warning Level 4 and also under the latest C++ standard
00052 //
00053 //       Revision 1.2  2004/05/26 20:10:10  pmarch
00054 //       Added /defgroup and /ingroup tags.
00055 //
00056 //       Revision 1.1  2003/08/18 20:32:16  pmarch
00057 //       Initial commit of ForwardKinematics
00058 //
00059 //
00061 
00062 #ifndef FKPosition_hpp
00063 #define FKPosition_hpp
00064 
00065 #include "Math/Matrix.h"
00066 #include "Math/Vector.h"
00067 #include "Math/HandPose.h"
00068 #include "Math/Xform.h"
00069 #include "ForwardKinematics/FKErrors.h"
00070 #include "ForwardKinematics/Kinematics.h"
00071 #include "ForwardKinematics/FKPositionBase.h"
00072 
00073 
00075 namespace OSCAR {
00076 
00089   class FKPosition : public Kinematics, public FKPositionBase
00090   {
00091   public:
00092 
00108     FKPosition(const String& DHfilename, OSCARError& err = DUMMY_ERROR(noError), const String& name = String(" "));
00109 
00110 
00124     FKPosition(const DHData& dhParams, OSCARError& err = DUMMY_ERROR(noError), const String& name = String(" "));
00125 
00126 
00134     FKPosition(const FKPosition& fkp);
00135   
00136   
00144     FKPosition& operator=(const FKPosition& fkp);
00145   
00159     const Xform* GetHandPose(const Vector& jointVector); 
00160 
00161 
00169     const Xform* GetLocalTransformation(unsigned int jointNo) const;
00170 
00171 
00181     const Xform* GetLocalTransformation(unsigned int jointNo, const Vector& jointVector);
00182   
00183 
00193     const Xform* GetGlobalTransformation(unsigned int jointNo) const;
00194 
00206     const Xform* GetGlobalTransformation(unsigned int jointNo, const Vector& jointVector);
00207   
00215     const Xform* GetAllLocalTransformations() const;
00216 
00224           const Xform* GetAllLocalTransformations(const Vector& jointVector);
00225 
00226 
00235     const Xform* GetAllGlobalTransformations() const;
00236 
00237 
00246     const Xform* GetAllGlobalTransformations(const Vector& jointVector);
00247 
00248 
00249 
00250     virtual ~FKPosition();
00251   protected:
00252     double                       *cosalpha, *sinalpha;  // arrays to hold sines and cosines
00253     double                       *costheta, *sintheta;  // cosines and sines for theta.  Valid for Prismatic joints
00254     Xform                        *localTransformations; // array of transformation matrices for each link; T01, T12..
00255     Xform                *linkToBase; // transformation matrices for each link to global frame: T01, T02 ...
00256   
00257     virtual void        calculateTransformations(const Vector& input_vector);
00258     virtual     void    calculateLinkTransformation(int joint_no, double joint_value);
00259     virtual void        calculateLinkToBaseTransformations(const Vector& input_vector);
00260     void                      makeToolPointAdjustment(void);
00261     void                      makeRobotPoseAdjustment(void);
00262     void          initialize(void);  // allocates memory, initializes objects. used by constructor
00263   
00264   };
00265 
00266   #include "ForwardKinematics/FKPosition.ipp"
00267 
00268 }
00269 #endif  // FKPosition_hpp
RRG Homepage OSCAR Overview OSCAR Tutorials Simulations