-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlplian.h
More file actions
75 lines (54 loc) · 1.84 KB
/
Copy pathlplian.h
File metadata and controls
75 lines (54 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#ifndef DLIAN_H
#define DLIAN_H
#include "linefunctions.h"
#include "map.h"
#include "openlist.h"
#include "searchresult.h"
#include <unordered_map>
#include <set>
#include <chrono>
class LPLian
{
public:
LPLian();
LPLian(float angleLimit_, int distance_, float hweight_, bool postsmoother_, float obstacleposition_);
~LPLian(void);
//main function for the whole pathbuilding algorithm
SearchResult FindThePath(Map &map);
private:
float angleLimit;
int distance; // Minimal value of length of steps
Node *start;
Node *goal;
int number_of_steps;
float hweight;
bool postsmoother; // Smoothing the path after the algorithm
float obstacleposition;
//EnvironmentOptions opt;
std::list<Node> hppath;
std::list<Node> lppath;
std::vector<float> angles;
SearchResult current_result;
std::vector<circleNode> circle_nodes;
void calculateCircle(int radius);
OpenList OPEN;
std::unordered_multimap<int, Node> NODES;
void Initialize(Map &map);
void UpdateVertex(Node* node);
void update(Node new_node, const Map &map);
bool expand(Node* curNode, const Map &map);
bool ComputeShortestPath(Map &map);
Key CalculateKey(Node &vertex);
Node* getFromNodes(Node current_node, int width, Node *parent=nullptr);
std::vector<Node *> getAllNodes(Node current_node, int width);
void ResetParent(Node* current, const Map &map);
std::vector<Node *> GetSuccessors(Node *curr, Map &map);
std::vector<Node *> GetSurroundings(Node current, Map &map);
bool checkAngle(const Node &dad, const Node &node, const Node &son) const;
std::list<Node> smoothPath(const std::list<Node>& path, const Map& map);
//functions for path building
void makePrimaryPath(Node* curNode);
void makeSecondaryPath();
double makeAngles();
};
#endif // DLIAN_H