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

IKCCD.h

Go to the documentation of this file.
00001 
00002 //
00003 //      Title           : IKCCD.h
00004 //              Project                     : OSCAR Version 2.0          
00005 //      Created         : 3/20/2002
00006 //      Author          : Mike Goza, NASA-JSC, Modified by 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 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         : To provide an alternative IK solution for multiDOF
00028 //                                                arms. Specifically to solve the < 6 DOF arm problem.
00029 //
00030 //----------------------------------------------------------------------------
00031 //
00032 //              $Revisions$
00033 //
00034 //      $Log: IKCCD.h,v $
00035 //      Revision 1.8  2005/03/14 21:53:28  pmarch
00036 //      Added to namespace OSCAR and removed "RR" from front of class names.
00037 //
00038 //      Revision 1.7  2004/07/29 20:15:49  chetan
00039 //      Minor changes to compile under g++ with -Wall and -pedantic warning flags enabled
00040 //
00041 //      Revision 1.6  2004/07/23 22:20:25  chetan
00042 //      Made changes to compile with Warning Level 4 and also under the latest C++ standard
00043 //
00044 //      Revision 1.5  2004/07/14 15:52:30  pmarch
00045 //      Added /defgroup tag to IKCCD class and fixed some variable-naming issues in IKJTranspose
00046 //
00047 //      Revision 1.4  2004/06/04 15:00:29  chetan
00048 //      Changed all joint input types from Vector to JointVector. Suggested by Mike Goza
00049 //
00050 //      Revision 1.2  2004/03/09 20:44:19  pmarch
00051 //      no message
00052 //
00053 //      Revision 1.1  2003/08/18 21:04:10  mtisius
00054 //      Initial commit of inverse kinematics
00055 //
00056 //
00058 #ifndef __IKCCD_H__
00059 #define __IKCCD_H__
00060 
00061 #include "ForwardKinematics/FKPosition.h"
00062 #include "InverseKinematics/IKPosition.h"
00063 
00065 namespace OSCAR {
00066 
00072   class IKCCD : public IKPosition, public Kinematics
00073   {
00074 
00075     public:
00076 
00086           IKCCD(const String& fileName,JointVector& initial_joint,double max_error = 0.1, OSCARError& err = DUMMY_ERROR(noError));
00087     
00096           IKCCD(const DHData& dhParams,JointVector& initial_joint,double max_error = 0.1);
00097 
00103           virtual ~IKCCD();
00104 
00121       bool GetJointPosition(const Xform& desiredHand, JointVector& jointPosition);
00122     
00139       bool GetJointPosition(const HandPose& desiredHandPose, JointVector& jointPosition);
00140 
00150       void GetJointPosition(JointVector& currentJointPosition) const;
00151 
00164           unsigned int GetSolutionProperties() const;
00165     
00166     
00176       void SetTool(const Xform& toolPose);
00177 
00187           void SetTool(const Vector3D& toolPoint);
00188 
00198       void SetBase(const Xform& basePose);
00199 
00208           void SetBase(const Vector3D& basePoint);
00209 
00218       bool SetJointPosition(const JointVector& jointPosition);
00219 
00229       void SetMaximumIterations(unsigned int noIterations);
00230 
00240       unsigned int GetMaximumIterations(void) const;
00241 
00252       bool SetErrorTolerance(double maxError);
00253 
00262       bool GetErrorTolerance(double& maxError);
00263 
00272           bool SetWeightFactors( Vector &weightA );
00273           bool GetWeightFactors( Vector &weightA );
00274 
00275           long SetActiveCoordinates( const bool *activeA );
00276           long GetActiveCoordinates( bool *activeA=NULL );
00277 
00278           bool SetOffsets( JointVector &offsetA );
00279           bool GetOffsets( JointVector &offsetA );
00280 
00281           bool SetMinMax( JointVector &minA, JointVector &maxA );
00282           bool GetMinMax( JointVector &minA, JointVector &maxA );
00283 
00284           virtual void CheckDependencies( JointVector& /*jntA */ ) {};
00285 
00286   protected:
00287           unsigned int max_iterationM;
00288           unsigned int solutionIterationCount;
00289           double max_errorM;
00290           unsigned int dofM;
00291           Vector weightM;
00292           JointVector offsetM;
00293           JointVector jointsM;
00294           JointVector minM;
00295           JointVector maxM;
00296           bool activeM[6];
00297           FKPosition *forkinM;
00298   };
00299 
00300 }
00301 #endif  // __IKCCD_H__
RRG Homepage OSCAR Overview OSCAR Tutorials Simulations