Buran Motion Planning Framework
one_direction_path_finder.h
1 #pragma once
2 
3 #include <base/grid_path_finder.h>
4 #include <base/node_grid_path_finder.h>
5 
6 #include <memory>
7 #include <unordered_map>
8 #include <set>
9 #include <utility>
10 #include <unordered_set>
11 
12 #include <future>
13 #include "scene.h"
14 #include "base/path_node.h"
15 
16 namespace bmpf {
45  public:
57  OneDirectionPathFinder(const std::shared_ptr<bmpf::Scene> &scene,
58  bool showTrace,
59  unsigned int maxOpenSetSize,
60  int gridSize,
61  unsigned int maxNodeCnt,
62  unsigned int kG = 1,
63  unsigned int kD = 0,
64  int threadCnt = 1
65  ) :
66  NodeGridPathFinder(scene, showTrace, gridSize, maxNodeCnt, kG, kD, threadCnt),
67  _maxOpenSetSize(maxOpenSetSize) {
68  // инициализация смещений
69  _initOffsets();
70  _ready = true;
71  };
72 
73  protected:
74 
84  std::shared_ptr<PathNode> _forEachNeighbor(
85  std::shared_ptr<PathNode> currentNode, std::vector<int> &endCoords
86  ) override;
87 
93  std::vector<unsigned long> _offsetStandartIndexes;
97  std::vector<std::vector<int>> _offsetList;
101  unsigned int _maxOpenSetSize;
102 
103  private:
107  void _initOffsets();
108  };
109 
110 }
bmpf::NodeGridPathFinder
Базовый класс для всех планировщиков на сетке с нодами Базовый класс для всех планировщиков на сетке ...
Definition: node_grid_path_finder.h:40
bmpf::OneDirectionPathFinder::_offsetStandartIndexes
std::vector< unsigned long > _offsetStandartIndexes
Definition: one_direction_path_finder.h:93
bmpf::OneDirectionPathFinder::_offsetList
std::vector< std::vector< int > > _offsetList
Definition: one_direction_path_finder.h:97
bmpf::PathFinder::_ready
bool _ready
Definition: path_finder.h:253
bmpf::OneDirectionPathFinder
Definition: one_direction_path_finder.h:44
bmpf::OneDirectionPathFinder::_maxOpenSetSize
unsigned int _maxOpenSetSize
Definition: one_direction_path_finder.h:101
bmpf::OneDirectionPathFinder::OneDirectionPathFinder
OneDirectionPathFinder(const std::shared_ptr< bmpf::Scene > &scene, bool showTrace, unsigned int maxOpenSetSize, int gridSize, unsigned int maxNodeCnt, unsigned int kG=1, unsigned int kD=0, int threadCnt=1)
Definition: one_direction_path_finder.h:57
bmpf::OneDirectionPathFinder::_forEachNeighbor
std::shared_ptr< PathNode > _forEachNeighbor(std::shared_ptr< PathNode > currentNode, std::vector< int > &endCoords) override
Definition: one_direction_path_finder.cpp:15