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

IKJAvoidLimits.h

Go to the documentation of this file.
00001 
00002 //
00003 //      Title           :  IKJAvoidLimits.h
00004 //      Project         :  OSCAR Version 2.0
00005 //      Created         :  Thu Nov 30 07:52:08 1995
00006 //      Author          :  Chetan Kapoor & Peter March
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 the University. None of the foregoing material may be
00013 //          copied or duplicated or disclosed without the express, written
00014 //          permission of University. THE 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 the
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 //
00027 //       Purpose         :
00028 //
00029 //----------------------------------------------------------------------------
00030 //
00031 //       $Revisions$
00032 //
00033 //       $Log: IKJAvoidLimits.h,v $
00034 //       Revision 1.9  2005/03/14 21:53:31  pmarch
00035 //       Added to namespace OSCAR and removed "RR" from front of class names.
00036 //
00037 //       Revision 1.8  2005/01/11 16:08:09  pmarch
00038 //       Set default template parameter to FKJacobian and added additional commenting.
00039 //
00040 //       Revision 1.7  2005/01/10 18:54:00  chetan
00041 //       Fixed documentation
00042 //
00043 //       Revision 1.6  2005/01/10 17:35:58  pmarch
00044 //       Added template parameter to IKJacobian-based objects to allow user to supply custom forward kinematics object.
00045 //
00046 //       Revision 1.5  2004/07/27 16:43:26  chetan
00047 //       Made changes to compile with Warning Level 4 and also under the latest C++ standard. Also made compilable with VC extensions turned off. Mostly carriage returns at the end of a file.
00048 //
00049 //       Revision 1.4  2004/07/23 22:20:27  chetan
00050 //       Made changes to compile with Warning Level 4 and also under the latest C++ standard
00051 //
00052 //       Revision 1.3  2004/05/26 20:15:34  pmarch
00053 //       Added /defgroup and /ingroup tags.
00054 //
00055 //       Revision 1.2  2004/04/22 18:08:22  eswint
00056 //       - Changed constructor of IKJacobian to take const JointVector, reflected in changes to constructors for IKJReconfig & IKJAvoidLimits and IJKAvoidLimits::computeWeightingMatrix
00057 //
00058 //       Revision 1.1  2003/08/18 21:04:06  mtisius
00059 //       Initial commit of inverse kinematics
00060 //
00061 //
00063 #ifndef IKJAvoidLimits_hpp
00064 #define IKJAvoidLimits_hpp
00065 
00066 #include "InverseKinematics/IKJReconfig.h"
00067 #include "InverseKinematics/IKErrors.h"
00068 #include "FileData/MatrixData.h"
00069 
00071 namespace OSCAR {
00087   template <class JacobianType=FKJacobian>
00088   class IKJAvoidLimits : public IKJReconfig<JacobianType>
00089   {
00090 
00091     public:
00092 
00124           IKJAvoidLimits(const JointVector& initialJointPosition, 
00125                       JacobianType* fkJacobian,
00126                       MatrixData& limitsData,
00127                       OSCARError& err = DUMMY_ERROR(noError),
00128                       EqnSolver* solver = 0, 
00129                       double maxError = 0.1, 
00130                       double rtScale = 1000.0);
00131 
00162           IKJAvoidLimits(JointVector& initialJointPosition, 
00163                       JacobianType* fkJacobian,
00164                       const String& limitsFile,
00165                       OSCARError& err = DUMMY_ERROR(noError),
00166                       EqnSolver* solver = 0, 
00167                       double maxError = 0.1, 
00168                       double rtScale = 1000.0);
00169 
00177           IKJAvoidLimits(const IKJAvoidLimits& rhs);
00178 
00186           IKJAvoidLimits& operator=(const IKJAvoidLimits& rhs);
00187 
00193           virtual ~IKJAvoidLimits();
00194 
00195 
00212       bool GetJointVelocity(const HandPose& handVelocity, JointVector& jointVelocitySolution);
00213 
00214 
00224     bool SetLimits(const Matrix& limits, AngleUnits angleFlag=Degrees);
00225 
00226 
00236     bool GetLimits(Matrix& limits, AngleUnits angleFlag=Degrees) const;
00237 
00238   
00239 
00240   protected:
00241     Matrix* weights;
00242     Matrix* jointLimits;
00243     Vector* jointMedian;
00244     Vector* jointRange;
00245 
00246     void ClearWeights();
00247     virtual bool inverse();
00248     bool computeWeightingMatrix(const JointVector& currJoints);
00249     bool computeJointVectors(void);
00250   };
00251   #include "InverseKinematics/IKJAvoidLimits.ipp"
00252 
00253 }
00254 #endif  // IKJacobian_hpp
RRG Homepage OSCAR Overview OSCAR Tutorials Simulations