GaitGeneration by Graph Search
読み取り中…
検索中…
一致する文字列を見つけられません
graph_tree_creator.h
[詳解]
1
3
4// Copyright(c) 2023-2025 Design Engineering Laboratory, Saitama University
5// Released under the MIT license
6// https://opensource.org/licenses/mit-license.php
7
8#ifndef DESIGNLAB_GRAPH_TREE_CREATOR_H_
9#define DESIGNLAB_GRAPH_TREE_CREATOR_H_
10
11#include <map>
12#include <memory>
13#include <vector>
14
19
20
21namespace designlab
22{
23
29{
30public:
31 explicit GraphTreeCreator(std::unique_ptr<INodeCreatorBuilder>&& node_creator_builder_ptr);
32
33 ~GraphTreeCreator() = default;
34
37 void Init(const DividedMapState& map_state);
38
44 GraphSearchResult CreateGraphTree(int start_depth, int max_depth,
45 GaitPatternGraphTree* graph_ptr) const;
46
47private:
52 void MakeNewNodesByCurrentNode(const RobotStateNode& current_node, int current_num,
53 std::vector<RobotStateNode>* output_graph_ptr) const;
54
56 std::map<HexapodMove, std::unique_ptr<INodeCreator> > node_creator_map_;
57
59 const std::unique_ptr<INodeCreatorBuilder> node_creator_builder_ptr_;
60};
61
62} // namespace designlab
63
64
65#endif // DESIGNLAB_GRAPH_TREE_CREATOR_H_
マップを格子状に分割して管理するクラス.
RobotStateNode 構造体をノードとする木構造のグラフのクラス.
歩容パターングラフを作成するクラス.
void Init(const DividedMapState &map_state)
ノード生成クラスを初期化する.
GraphSearchResult CreateGraphTree(int start_depth, int max_depth, GaitPatternGraphTree *graph_ptr) const
歩容パターングラフを作成する.
グラフ探索の結果を表す構造体.
グラフ構造のためのノード(頂点).旧名 LNODE