libmove3d-planners
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros Groups Pages
HRICS_GridState.hpp
1 #ifndef HRIGRIDSTATE_HPP
2 #define HRIGRIDSTATE_HPP
3 
4 #include "API/planningAPI.hpp"
5 #include "HRI_costspace/Grid/HRICS_Grid.hpp"
6 #include "HRI_costspace/Grid/HRICS_Cell.hpp"
7 
12 namespace HRICS
13 {
14  class State : public API::State
15  {
16  public:
17  State() {}
18  State( Eigen::Vector3i cell, Grid* grid);
19  State( Cell* cell , Grid* grid);
20 
21  std::vector<API::State*> getSuccessors();
22 
23  bool isLeaf(); /* leaf control for an admissible heuristic function; the test of h==0*/
24  bool equal(API::State* other);
25 
26  void setClosed(std::vector<State*>& closedStates,std::vector<State*>& openStates);
27  bool isColsed(std::vector<State*>& closedStates);
28 
29  void setOpen(std::vector<State*>& openStates);
30  bool isOpen(std::vector<State*>& openStates);
31 
32  void reset();
33 
34  void print();
35 
36  Cell* getCell() { return _Cell; }
37 
38  protected:
39  double computeLength(API::State *parent); /* g */
40  double computeHeuristic(API::State *parent = NULL ,API::State* goal = NULL); /* h */
41 
42  private:
43  Cell* _Cell;
44  Grid* _Grid;
45  };
46 }
47 
48 #endif // HRIGRIDSTATE_HPP
Definition: HRICS_Grid.hpp:16
Definition: HRICS_GridState.hpp:14
Definition: HRICS_Cell.hpp:16
++
Definition: State.hpp:20