libmove3d-planners
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros Groups Pages
gtpPlan.hpp
1 #ifndef GTPPLAN_HPP
2 #define GTPPLAN_HPP
3 
4 
5 #include "GTP/GTPTools/worldState.hpp"
6 #include "onePlan.hpp"
7 #include "planNode.hpp"
8 #include "onePlan.hpp"
9 #include <iostream>
10 #include <fstream>
11 
12 class OnePlan;
13 
14 class PlanTree
15 {
16  MOVE3D_STATIC_LOGGER;
17 public:
18  PlanTree();
19  ~PlanTree();
20 
21  bool checkIfPlanInTree(OnePlan* OP);
22  OnePlan* getPlanFromNode(PlanNode* PN);
23  PlanNode* getNodeFromId(int idFirst, int idSecond);
24  PlanNode* getNodeFormTS(TaskSolution* TS);
25 
26  bool addPlanNode(PlanNode* PN, TaskSolution *prevTS);
27 
28  void printAll();
29 
30  void printInFile(PlanNode* pn);
31 
32  std::vector<PlanNode*> getAllNodes() {return _tree;}
33 
34  double computeDist(PlanNode* p1, PlanNode* p2);
35 
36  PlanNode* getClosestNode(WorldState* ws, type_data td );
37 
38  void saveInFile(std::string path);
39 
40 
41 private:
42  std::vector<PlanNode*> _tree;
43  std::string myfilepath;
44 
45 public:
46  std::vector<double> getAllImpoInfo();
47 };
48 
49 
50 #endif // GTPPLAN_HPP
Definition: taskSolution.hpp:9
Definition: planNode.hpp:12
Definition: structTools.hpp:54
Definition: gtpPlan.hpp:14
Definition: onePlan.hpp:9
Definition: worldState.hpp:30