00001
00002
00003
00004
00005
00006
00007
00008
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
00020 #include "Planners\PL_Boolean_Output.h"
00021 #include "Planners\PL_OpenGL.h"
00022
00023
00024
00025
00026
00027
00028
00029
00030 class IK_InvKinBase :
00031 virtual public PL_Boolean_Output,
00032 virtual public PL_OpenGL
00033 {
00034
00035 public:
00036
00037 IK_InvKinBase();
00038
00039
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
00053
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
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
00076
00077 Matrix4x4 GetToolFrame( const Configuration& config ) const;
00078
00079
00080
00081 virtual void CopySettings( PlannerBase* original );
00082
00083 protected:
00084
00085
00086
00087
00088
00089 virtual void AssignGoalConfig( const Configuration& config );
00090
00091
00092
00093
00094 virtual void InitNewSearch();
00095
00096
00097
00098 Matrix4x4 goalFrame;
00099
00100
00101 int m_GoalFrameIndex;
00102
00103 private:
00104
00105
00106 private:
00107
00108
00109 };
00110
00111
00112
00113
00114
00115 #endif