libmove3d-planners
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros Groups Pages
GreedyCost.hpp
1 #ifndef P3D_GREEDY_PROTO_HH
2 #define P3D_GREEDY_PROTO_HH
3 
4 #include "API/planningAPI.hpp"
5 #include "planner/TrajectoryOptim/Classic/costOptimization.hpp"
6 #include "planner/TrajectoryOptim/Classic/smoothing.hpp"
7 
8 #include "planner/Diffusion/RRT.hpp"
9 #include "planner/Diffusion/Variants//Transition-RRT.hpp"
10 
14 class GreedyCost {
15 
16 public:
17 
18  GreedyCost(graph* G, int (*stop_func)(), void (*draw_func)());
19  ~GreedyCost();
20 
21  bool run();
22 
23  void createVectorLocalPath();
24 
25  int strait(Node& expansionNode,
26  std::tr1::shared_ptr<Configuration> directionConfig,
27  Node* directionNode,
28  Env::expansionMethod method,
29  bool toGoal);
30 
31  void optimizePhaze();
32  void optimizeLinear();
33  void shortCutLinear();
34  bool checkStopConditions();
35 
36  int getOptimFail() { return nb_OptimFail; }
37  int getOptimSuccess() {return nb_OptimSuccess; }
38 
39 private:
40 
41  int mConsecutiveFailures;
42 
43  int (*_stop_func)();
44  void (*_draw_func)();
45 
46  Robot* mRobot;
47  Graph* mGraph;
48 
49  Node* mStart;
50  Node* mGoal;
51 
52  RRTExpansion* Expansion;
53  RRT* Diffusion;
54  API::CostOptimization* optimTrj;
55 
56  int nb_Loops;
57  int nb_LocalPaths;
58  int nb_CostCompare;
59  int nb_CObstFail;
60 
61  int nb_OptimSuccess;
62  int nb_OptimFail;
63 
64 };
65 
66 extern bool p3d_RunGreedyCost(graph* GraphPt, int (*fct_stop)(void),
67  void (*fct_draw)(void));
68 
69 #endif
Classe représentant un Node d'un Graph.
Definition: node.hpp:39
Definition: costOptimization.hpp:20
Definition: graph.hpp:28
Expansion procedure of the Rapidly-exploring Random Tree (RRT) algorithm.
Definition: RRT.hpp:21
This class holds a the robot represented by a kinematic chain.
Definition: robot.hpp:42
Planner based on trajectory optimization.
Definition: GreedyCost.hpp:14
The Rapidly-exploring Random Tree (RRT) algorithm.
Definition: RRT.hpp:81