planners/inversekin/Redundant.h

Go to the documentation of this file.
00001 
00002 //
00003 //Contents: Class CRedundant
00004 // 
00006 
00007 #ifndef _Redundant_Header_
00008 #define _Redundant_Header_
00009 
00010 //#include "KINEMATICS\FrameManager.h"
00011 #include "CollisionDetectors\CD_BasicStyle.h"
00012 //#include "Configuration.h"
00013 #include "Active.h"
00014 #include "Passive.h"
00015 
00016 class CRedundant
00017 {
00018 public:
00019         CRedundant();
00020         CRedundant(FrameManager *frameManager);
00021         ~CRedundant();
00022 
00023         //Set context information: Frame Manager, Collision Detector
00024         void SetFrameManager(FrameManager* frameManager);
00025         virtual void SetCollisionDetector (CD_BasicStyle* collisionDetector);
00026 
00027         //Set information for passive joint chain
00028         void SetPassiveBaseFrame(unsigned int frame);
00029         void SetPassiveFirstJoint(unsigned int joint);
00030         void SetPassiveLastJoint(unsigned int joint);
00031 
00032         //Set information for active joint chain
00033         void SetActiveBaseFrame(unsigned int frame);
00034         void SetActiveFirstJoint(unsigned int joint);
00035         void SetActiveLastJoint(unsigned int joint);
00036 
00037         //Get end-effector frame for a given configuration
00038         void GetDesireFrameByConfiguration(const Configuration &conf, Frame &frame) const;
00039 
00040         //Get configuration purely randomly
00041         virtual bool GetRandomConfiguration(Configuration &conf);
00042         //Get configuration of the same end-effect pose as configuration "desire"
00043         virtual bool GetRandomConfiguration(Configuration &conf, Configuration &desire);
00044         //Get a random configuration of the same pose as "desire", in a neighbor area of "bias"
00045         virtual bool GetRandomConfiguration(Configuration &conf, Configuration &bias, Configuration &desire, double dist);
00046         //Get configuration of the given end-effect pose
00047         virtual bool GetRandomConfiguration(Configuration &conf, Frame &frame);
00048         //Get a random configuration of the given pose, in a neighbor area of "bias"
00049         virtual bool GetRandomConfiguration(Configuration &conf, Configuration &bias, Frame &frame, double dist);
00050         //Complete a configuration based on its active joint variable   
00051         virtual bool GetConfigurationByActive(Configuration &conf, Configuration &active, Frame &frame);
00052         //Complete a configuration based on its active joint variable, choose the closest one to bias
00053         virtual bool GetConfigurationByActive(Configuration &conf, Configuration &active, Configuration &bias, Frame &frame);
00054         //Complete a configuration based on its active joint variable, and neighboring information
00055         virtual bool GetConfigurationByActive(Configuration &conf, Configuration &active, Configuration &bias, Frame &frame, double dist);
00056 
00057 protected:
00058         R_OpenChain *robot;
00059         CD_BasicStyle* collisionDetector;
00060         FrameManager *frameManager;
00061         CPassive passive;
00062         CActive active;
00063         std::vector< LinkBase*> links;
00064         int activeJointNum;
00065         int passiveJointNum;
00066 
00067 private:
00068         //Combine active joint variables and passive joint variables to a complete configuration
00069         void CombineConfiguration(Configuration &conf, Configuration &activeConf, Configuration &passiveConf);
00070         //Apply the active joint variables into robot
00071         void UpdateActiveConfiguration(Configuration &active);
00072 };
00073 
00074 #endif

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