ThetaStar.h
Go to the documentation of this file.
1 
6 #include <list>
7 #include <unordered_map>
8 #include <iostream>
9 
10 #include "PathPlanner.h"
11 #include "Geom.h"
12 #include "LineOfSight.h"
13 
14 #ifndef ORCA_THETASTAR_H
15 #define ORCA_THETASTAR_H
16 
22 class ThetaStar : public PathPlanner
23 {
24  public:
25 
34  ThetaStar(const Map &map, const EnvironmentOptions &options, const Point &start, const Point &goal, const float &radius);
35 
40  ThetaStar(const ThetaStar &obj);
41 
45  ~ThetaStar() override;
46 
52  bool GetNext(const Point &curr, Point &next) override;
53 
58  bool CreateGlobalPath() override;
59 
64  ThetaStar* Clone() const override;
65 
71  ThetaStar & operator = (const ThetaStar &obj);
72 
73  private:
74 
76  bool SearchPath(const Node &start, const Node &goal);
77  bool StopCriterion() const;
78  void AddOpen(Node newNode);
79  Node FindMin();
80  float ComputeHFromCellToCell(int i1, int j1, int i2, int j2) const;
81  float Distance(int i1, int j1, int i2, int j2) const;
82  Node ResetParent(Node current, Node parent);
83  void MakePrimaryPath(Node curNode);
84  std::list<Node> FindSuccessors(Node curNode);
85 
86 
87  std::list<Point> currPath;
88 
89  std::unordered_map<int, Node> close;
90  std::vector<std::list<Node>> open;
91  int openSize;
92  bool glPathCreated;
93  LineOfSight visChecker;
94 
96 
97 
98 
99 };
100 
101 
102 #endif //ORCA_THETASTAR_H
bool CreateGlobalPath() override
Finds path from global start to global goal position using Theta* algorithm.
Definition: ThetaStar.cpp:325
PathPlanner class implements base pathfinder interface and behavior.
Definition: PathPlanner.h:25
ThetaStar(const Map &map, const EnvironmentOptions &options, const Point &start, const Point &goal, const float &radius)
ThetaStar constructor with parametes.
Definition: ThetaStar.cpp:9
The Node class defines a cell of grid (see Map class)
Definition: Geom.h:21
File contains Node, Point, Line, Vertex, ObstacleSegment classes and some methods and functions imple...
The Point class defines a position (or euclidean vector from (0,0)) in 2D space.
Definition: Geom.h:61
~ThetaStar() override
ThetaStar destructor.
Definition: ThetaStar.cpp:33
ThetaStar & operator=(const ThetaStar &obj)
Assignment operator.
Definition: ThetaStar.cpp:338
File contains PathPlanner class.
File contains LineOfSight class.
bool GetNext(const Point &curr, Point &next) override
Returns current goal of agent from global path.
Definition: ThetaStar.cpp:36
Class EnvironmentOptions contains environment and algoritms parameters.
Map class describes static environment.
Definition: Map.h:36
ThetaStar * Clone() const override
Method for cloning inheritors objects. Creates copy of object in memmory and return pointer to copy...
Definition: ThetaStar.cpp:353
ThetaStar class implements Theta* algorithm, which creates path from start to goal position...
Definition: ThetaStar.h:22
This class implements line-of-sight function between two cells on the grid for a variable size of age...
Definition: LineOfSight.h:30


ORCAStar
Author(s): Stepan Drgachev
autogenerated on Wed Jul 15 2020 16:13:14