00001
00002
00003
00004
00006
00007 #ifndef _Passive_Header_
00008 #define _Passive_Header_
00009
00010 #include "Joints.h"
00011 #include "Kinematics\DH_Link.h"
00012 #define MAX_SOLUTION 4
00013
00014 class CPassive:public CJoints
00015 {
00016 public:
00017 CPassive();
00018 CPassive(FrameManager* frameManager);
00019 virtual ~CPassive();
00020
00021 virtual void SetRobot(R_OpenChain *robot);
00022 virtual void SetLastJoint(unsigned int joint);
00023
00024
00025 virtual void SetEndEffectFrame(Frame &frame);
00026
00027 virtual void SetDesireEndEffect(Frame &frame);
00028
00029 virtual void SetFirstFrame(Frame &frame);
00030
00031
00032 virtual bool GetRandomConfiguration(Configuration &conf);
00033
00034 virtual bool GetConfiguration(Configuration &conf);
00035
00036
00037 virtual bool GetConfiguration(Configuration &conf, Configuration ¤t);
00038
00039 virtual bool GetConfiguration(Configuration &conf, Configuration ¤t, double dist);
00040
00041 protected:
00042
00043 Frame firstFrame;
00044 Frame effectFrame;
00045 Frame desireEffect;
00046
00047 private:
00048 Configuration *solution;
00049 int solutionNum;
00050 bool ResolveJoints(DH_Parameter type);
00051 bool ResolveJoints(DH_Parameter type1, DH_Parameter type2);
00052 bool ResolveJoints(DH_Parameter type1, DH_Parameter type2, DH_Parameter type3);
00053 bool Inverse();
00054 bool __inline Solution(double a, double b, double c, double solution[2], int &num);
00055 bool __inline Solution(double a, double b, double c, double d, double &solution);
00056 bool __inline Solution(Frame &rotated, double &solution);
00057 };
00058
00059
00060 #endif