GaitGeneration by Graph Search
読み取り中…
検索中…
一致する文字列を見つけられません
gait_pattern_generator_thread.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_GAIT_PATTERN_GENERATOR_THREAD_H_
9#define DESIGNLAB_GAIT_PATTERN_GENERATOR_THREAD_H_
10
11#include <memory>
12#include <tuple>
13#include <vector>
14
19#include "graph_tree_creator.h"
20#include "robot_state_node.h"
21
22
23namespace designlab
24{
25
29{
30public:
32
39 std::unique_ptr<GraphTreeCreator>&& graph_tree_creator_ptr,
40 std::unique_ptr<IGraphSearcher>&& graph_searcher_ptr,
41 int max_depth,
42 int max_node_num);
43
45
46
48 const RobotStateNode& current_node,
49 const MapState& map_ref,
50 const RobotOperation& operation,
51 RobotStateNode* output_node) override;
52
53private:
54 static constexpr int kThreadNum = 6;
55
56
57 std::vector<GaitPatternGraphTree> InitializeGraphTreeArray(int thread_num, int max_node_num) const;
58
60 const std::unique_ptr<GraphTreeCreator> graph_tree_creator_ptr_;
61
63 const std::unique_ptr<IGraphSearcher> graph_searcher_ptr_;
64
65 GaitPatternGraphTree graph_tree_;
66
68 std::vector<GaitPatternGraphTree> graph_tree_array_;
69
70 const int max_depth_;
71
72
73 static_assert(0 < kThreadNum, "The number of threads must be positive.");
74};
75
76} // namespace designlab
77
78
79#endif // DESIGNLAB_GAIT_PATTERN_GENERATOR_THREAD_H_
普通にグラフ探索を行い,歩容パターン生成を行うクラス.
GaitPatternGeneratorThread()=delete
デフォルトコンストラクタは禁止.
GraphSearchResult GetNextNodeByGraphSearch(const RobotStateNode &current_node, const MapState &map_ref, const RobotOperation &operation, RobotStateNode *output_node) override
グラフ探索を行い,次の動作として最適なノードを返す.
RobotStateNode 構造体をノードとする木構造のグラフのクラス.
グラフ探索による歩容パターン生成を行うクラスのインターフェース.
マップを表すクラス.
Definition map_state.h:32
グラフ探索の結果を表す構造体.
探索において目標となる座標や角度,評価する値についてまとめた構造体.
グラフ構造のためのノード(頂点).旧名 LNODE