00001 #ifndef PL_RRT_h
00002 #define PL_RRT_h 1
00003
00004 #pragma warning( disable : 4250 )
00005
00006
00007 #include "Planners/PL_Boolean_Output.h"
00008
00009 #include "Planners/PL_OpenGL.h"
00010 #include "planners/aca/JMA_aca_structs.h"
00011
00012 class PL_RRT : public PL_Boolean_Output,
00013 virtual public PL_OpenGL
00014 {
00015
00016 public:
00017 ~PL_RRT();
00018 virtual bool Plan();
00019 virtual void SetStart_and_GoalConfig (const Configuration& configuration1,const Configuration& configuration2);
00020 bool PL_RRT::DrawExplicit () const;
00021 protected:
00022 double MyDistanceFunc (const Configuration& conf1, const Configuration& conf2) const;
00023 int Extend_trapped(JMA_Roadmap_Tree* Ptr_tree, int* the_n_nodes, Configuration* the_random_config);
00024 int Get_new_config(Configuration* the_random_config, Configuration* the_near_config, Configuration* the_new_config);
00025
00026 int Get_nearest_neighbour(JMA_Roadmap_Tree* Ptr_tree1, Configuration* the_random_config, Configuration* the_near_config);
00027
00028 void InitRoadmapTree( JMA_Roadmap_Tree* Ptr_tree,
00029 const int n_dof1,
00030 const JMA_Configuration init_conf) const;
00031 void GetIdsPath (JMA_Roadmap_Tree* Ptr_tree,
00032 const int landmark_id, int ids_list[],
00033 int* n_landmarks);
00034 int Get_random_config(Configuration* the_random_config);
00035 private:
00036 int ids_list[ 10000 ];
00037 JMA_Roadmap_Tree tree;
00038 JMA_Configuration init_conf, goal_conf;
00039 int numberOfEmbryos;
00040 int numberOfLandmarks;
00041 Configuration random_config, near_config, new_config, last_config;
00042
00043 private:
00044
00045 };
00046 #endif