libmove3d-planners
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros Groups Pages
HRICS_rrtPlanExpansion.hpp
1 #ifndef HRICS_RRTPLANEXPANSION_H
2 #define HRICS_RRTPLANEXPANSION_H
3 
4 #include "API/planningAPI.hpp"
5 #include "planner/Diffusion/Variants/Transition-RRT.hpp"
6 #include "HRI_costspace/Grid/HRICS_TwoDGrid.hpp"
7 
13 {
14 public:
15  HRICS_rrtPlanExpansion(Graph* ptrGraph, Node * goal);
16 
21  void init();
22 
26  void setGrid(API::TwoDGrid* grid) { m2DGrid = dynamic_cast<HRICS::PlanGrid*>(grid); }
27 
31  void setCellPath(std::vector<API::TwoDCell*> cellPath);
32 
36  std::tr1::shared_ptr<Configuration> getExpansionDirection(
37  Node* expandComp, Node* goalComp, bool samplePassive, Node*& directionNode);
38 
42  std::tr1::shared_ptr<Configuration> getConfigurationInNextCell(Node* CompcoNode, Node* goalComp);
43 
47  Node* addNode(Node* currentNode, LocalPath& path, double pathDelta,
48  Node* directionNode, unsigned& nbCreatedNodes);
49 
54  bool on2DPathAndAfter(API::TwoDCell* cell);
55 
56 private:
57  HRICS::PlanGrid* m2DGrid;
58  std::vector<API::TwoDCell*> m2DCellPath;
59 
60  API::TwoDCell* mLastForward;
61  API::TwoDCell* mLastBackward;
62  API::TwoDCell* mBiasedPlanCell;
63 
64  bool mForward;
65  bool mBiasing;
66 
67  double* mBox;
68 
69 };
70 
71 #endif // HRICS_RRTEXPANSION_H
Classe représentant un Node d'un Graph.
Definition: node.hpp:39
Classe représentant un chemin local.
Definition: localpath.hpp:15
Special RRT Expansion method for the HRICS.
Definition: HRICS_rrtPlanExpansion.hpp:12
std::tr1::shared_ptr< Configuration > getConfigurationInNextCell(Node *CompcoNode, Node *goalComp)
Configuration from the next cell along the 3dPath.
Definition: HRICS_rrtPlanExpansion.cpp:101
Definition: graph.hpp:28
Definition: TwoDCell.hpp:19
bool on2DPathAndAfter(API::TwoDCell *cell)
Checks it the cell is after the given cell on the 2D path.
Definition: HRICS_rrtPlanExpansion.cpp:184
std::tr1::shared_ptr< Configuration > getExpansionDirection(Node *expandComp, Node *goalComp, bool samplePassive, Node *&directionNode)
Direction used in RRT one step.
Definition: HRICS_rrtPlanExpansion.cpp:61
Definition: TwoDGrid.hpp:25
double pathDelta(LocalPath &path)
Return the path parameter that is the closest to step()
Definition: BaseExpansion.cpp:79
Expansion procedure of the Transition-based RRT (T-RRT) algorithm.
Definition: Transition-RRT.hpp:17
void init()
Initializes some variables for the expansion method.
Definition: HRICS_rrtPlanExpansion.cpp:27
void setCellPath(std::vector< API::TwoDCell * > cellPath)
Sets the cell path.
Definition: HRICS_rrtPlanExpansion.cpp:49
Plannar HRI Grid.
Definition: HRICS_TwoDGrid.hpp:13
Node * addNode(Node *currentNode, LocalPath &path, double pathDelta, Node *directionNode, unsigned &nbCreatedNodes)
Adds a node to a conected component.
Definition: HRICS_rrtPlanExpansion.cpp:254
void setGrid(API::TwoDGrid *grid)
Sets the grid.
Definition: HRICS_rrtPlanExpansion.hpp:26