00001 00002 // 00003 // Title : IKJGenerateOptions.h 00004 // Project : OSCAR Version 2.0 00005 // Created : March 3 14:05:48 2003 00006 // Author : Chalongrath Pholsiri 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 : Inverse object that returns a set of possible solns. 00028 // 00029 //---------------------------------------------------------------------------- 00030 // 00031 // $Revisions$ 00032 // 00033 // $Log: IKJGenerateOptions.h,v $ 00034 // Revision 1.12 2005/06/20 19:35:27 josh 00035 // Made the first argument in the constructor (JointVector&) const. 00036 // 00037 // Revision 1.11 2005/03/25 22:03:38 josh 00038 // Added copy constructor and assignment operator. 00039 // 00040 // Revision 1.10 2005/03/17 15:56:08 josh 00041 // Changed internal IK from IKJReconfig to IKJacobian to make it more generic. If you need ability to lock joints (Exact method for SetNullJointMethod), then must pass a pointer to IKJReconfig. 00042 // 00043 // Revision 1.9 2005/03/14 23:02:28 josh 00044 // Fixed errors from move to OSCAR namespace. 00045 // 00046 // Revision 1.8 2005/03/14 21:53:31 pmarch 00047 // Added to namespace OSCAR and removed "RR" from front of class names. 00048 // 00049 // Revision 1.7 2005/01/11 16:08:09 pmarch 00050 // Set default template parameter to FKJacobian and added additional commenting. 00051 // 00052 // Revision 1.6 2005/01/10 18:54:00 chetan 00053 // Fixed documentation 00054 // 00055 // Revision 1.5 2005/01/10 17:35:59 pmarch 00056 // Added template parameter to IKJacobian-based objects to allow user to supply custom forward kinematics object. 00057 // 00058 // Revision 1.4 2004/09/27 18:51:11 aspencer 00059 // Clarified what the return value of "GetJointPositions" means 00060 // 00061 // Revision 1.3 2004/07/23 22:20:28 chetan 00062 // Made changes to compile with Warning Level 4 and also under the latest C++ standard 00063 // 00064 // Revision 1.2 2004/05/26 20:15:34 pmarch 00065 // Added /defgroup and /ingroup tags. 00066 // 00067 // Revision 1.1 2003/08/18 21:04:05 mtisius 00068 // Initial commit of inverse kinematics 00069 // 00070 // 00072 #ifndef IKJGenerateOptions_hpp 00073 #define IKJGenerateOptions_hpp 00074 00075 #include "DecisionMaking/Perturbation.h" 00076 #include "IKJacobian.h" 00077 00079 namespace OSCAR { 00097 template <class JacobianType=FKJacobian> 00098 class IKJGenerateOptions : public virtual Base 00099 { 00100 00101 public: 00102 00114 enum NullJointMethod { Exact, Approximate }; 00115 00139 IKJGenerateOptions(const JointVector& initialJointPosition, IKJacobian<JacobianType>* ik, Perturbation *perturb, 00140 NullJointMethod method = Approximate, OSCARError& err = DUMMY_ERROR(noError)); 00141 00149 IKJGenerateOptions(const IKJGenerateOptions &rhs); 00150 00158 IKJGenerateOptions& operator=(const IKJGenerateOptions &rhs); 00159 00165 virtual ~IKJGenerateOptions(); 00166 00183 virtual bool GetJointPositions(const Xform& desiredHandMatrix, VectorArray& jointPositions); 00184 00204 virtual bool GetJointPositions(const HandPose& desiredHand, VectorArray& jointPositions); 00205 00215 bool GetJointPosition(JointVector& jointPosition) const; 00216 00228 bool SetJointPosition(const JointVector& jointPosition); 00229 00242 int SetNullJoints(const CoordinateStatusArray& nullJoints); 00243 00251 bool SetNullJointMethod(const NullJointMethod method); 00252 00263 bool GetSolutionProperties(Vector& MOTs) const; 00264 00273 bool GetSolutionProperties(BoolArray& validity) const; 00274 00282 void Reallocate(unsigned int noOptions); 00283 00284 protected: 00285 // Protected members 00286 unsigned int DOF; 00287 unsigned int noOfOptions; 00288 IKJacobian<JacobianType> *invkin; 00289 Perturbation *perturbation; 00290 JointVector *currentJointVector; 00291 JointVector *baseSolution; 00292 JointVector *baseJointVector; 00293 VectorArray *perturbedJoints; 00294 JointVector *solution; 00295 JointVector *perturbedJoint; 00296 NullJointMethod nullJoint; 00297 00298 // solutions properties 00299 Vector *MOTs; 00300 BoolArray *valids; 00301 00302 }; 00303 00304 #include "IKJGenerateOptions.ipp" 00305 00306 } 00307 #endif //IKJGenerateOptions_hpp
| RRG Homepage | OSCAR Overview | OSCAR Tutorials | Simulations |