planners/inversekin/IK_InvKinBase.h

Go to the documentation of this file.
00001 //=========================================================================
00002 //
00003 //  File:  IK_InvKinBase.h
00004 //
00005 //  Created 31-Jul-01 by Shane Schneider
00006 //
00007 //              Planner Base for inverse kinematics planners.
00008 //              Contains the inheritance to the parent forward planners.
00009 
00010 #ifndef IK_InvKinBase_h
00011 #define IK_InvKinBase_h 1
00012 
00013 #pragma warning( disable : 4250 )
00014 
00015 #include "kinematics/Configuration.h"
00016 #include "Geometry/Frame.h"
00017 
00018 
00019 // PL_Boolean_Output
00020 #include "Planners\PL_Boolean_Output.h"
00021 #include "Planners\PL_OpenGL.h"
00022 
00023 //----------- Forward Declarations -----------------
00024 
00025 //## Class: IK_InvKinBase%3921BC600296
00026 //## Category: Inverse Planners%36FB140B003C
00027 //## Persistence: Transient
00028 //## Cardinality/Multiplicity: n
00029 
00030 class IK_InvKinBase : 
00031         virtual public PL_Boolean_Output,  //## Inherits: <unnamed>%3921BC73013F
00032         virtual public PL_OpenGL
00033 {
00034 
00035   public:
00036           // Default Constructor
00037           IK_InvKinBase();
00038 
00039     //## Destructor (generated)
00040       virtual ~IK_InvKinBase();
00041 
00042       virtual bool DrawExplicit () const;
00043 
00044           virtual void DrawUniversePortion() const;
00045 
00046           virtual bool Load (const char *filename);
00047 
00048       virtual bool Plan ();
00049 
00050           virtual bool Save (const char *filename) const;
00051 
00052 //        virtual void SetStartConfig( const Configuration& configuration );
00053 //        virtual void SetGoalConfig( const Configuration& config ); 
00054           void SetGoalFrame( const Matrix4x4& newframe );
00055           void SetGoalFrame( const Configuration& config );
00056           void SetGoalFrame( const VectorN& dofVector );
00057           void SetGoalFrame( const double& x, const double& y, const double& z, 
00058                                                  const double& roll, const double& pitch, const double& yaw );
00059 
00060           void GetRotAngles( const Matrix4x4& frame, double& x, double& y, double& z,
00061                                                                  double& roll, double& pitch, double& yaw ) const;
00062           VectorN GetRotVector( const Matrix4x4& frame ) const;
00063 
00064           // converts from XYZ-RPY to a matrix
00065           static Matrix4x4 GetTransformFrame
00066               ( 
00067                       const double& x, const double& y, const double& z, 
00068                           const double& roll, const double& pitch, const double& yaw 
00069                   );
00070           Matrix4x4 GetTransformFrame( const VectorN& dofVector ) const;
00071           
00072           Matrix4x4 GetGoalFrame() const;
00073           VectorN   GetGoalFrameVector() const;
00074 
00075           // GetToolFrame
00076           //    Computes the tool frame for a given configuration wrt world frame
00077           Matrix4x4 GetToolFrame( const Configuration& config ) const;
00078 
00079         // Additional Public Declarations
00080 
00081           virtual void CopySettings( PlannerBase* original );
00082           
00083   protected:
00084         // Additional Implementation Declarations
00085 
00086           // AssignGoalConfig
00087           //    Locally called function that assigns the computed goal config for the solved
00088           //    goal frame to the server.
00089           virtual void AssignGoalConfig( const Configuration& config );
00090 
00091           // InitNewSearch
00092           //    Abstract function that initiates parameters in derived classes to indicates if a new search
00093           //    has been requested.
00094           virtual void InitNewSearch();
00095 
00096 
00097     // Additional Protected Declarations
00098           Matrix4x4 goalFrame;  // Store the goal frame wrt world frame
00099 
00100           //index into the frame manager pointing to the goal frame
00101           int m_GoalFrameIndex;
00102       
00103   private:
00104     // Additional Private Declarations
00105 
00106   private: //## implementation
00107     // Additional Implementation Declarations
00108 
00109 };
00110 
00111 
00112 // Class IK_InvKinBase 
00113 
00114 
00115 #endif

Generated on Sat Apr 1 21:30:43 2006 for Motion Planning Kernel by  doxygen 1.4.6-NO