23 std::unique_ptr<GraphTreeCreator>&& graph_tree_creator,
24 std::unique_ptr<IGraphSearcher>&& graph_searcher,
26 const int max_node_num) :
27 graph_tree_creator_ptr_(
std::move(graph_tree_creator)),
28 graph_searcher_ptr_(
std::move(graph_searcher)),
29 graph_tree_{ max_node_num },
32 assert(graph_tree_creator_ptr_ !=
nullptr);
33 assert(graph_searcher_ptr_ !=
nullptr);
34 assert(0 < max_depth_);
35 assert(0 < max_node_num);
45 assert(output_node !=
nullptr);
46 assert(graph_tree_creator_ptr_ !=
nullptr);
47 assert(graph_searcher_ptr_ !=
nullptr);
53 graph_tree_creator_ptr_->Init(divided_map);
58 graph_tree_.
AddNode(current_node);
61 graph_tree_creator_ptr_->CreateGraphTree(0, max_depth_, &graph_tree_);
70 const auto [search_result, _, next_node] =
71 graph_searcher_ptr_->SearchGraphTree(
72 graph_tree_, operation, divided_map, max_depth_);
79 (*output_node) = next_node;
void Init(const MapState &map_state, const Vector3 global_robot_com)
マップのデータを初期化する. ロボットの重心座標を中心にマップのデータを格子状に分割し, その中に存在する脚設置可能点を集める.
GaitPatternGeneratorBasic(std::unique_ptr< GraphTreeCreator > &&graph_tree_creator_ptr, std::unique_ptr< IGraphSearcher > &&graph_searcher_ptr, int max_depth, int max_node_num)
GraphSearchResult GetNextNodeByGraphSearch(const RobotStateNode ¤t_node, const MapState &map_ref, const RobotOperation &operation, RobotStateNode *output_node) override
グラフ探索を行い,次の動作として最適なノードを返す.
constexpr void Reset()
グラフをリセットする.
void AddNode(const RobotStateNode &node)
ノードを追加する. 追加するノードは親ノードのインデックスと,depthの指定が適切にされている必要がある. これらが適切にされていない場合,アサーションに引っかかる. また,あらかじめ確保...
enums::Result result
成功か失敗か.
探索において目標となる座標や角度,評価する値についてまとめた構造体.
グラフ構造のためのノード(頂点).旧名 LNODE
constexpr bool IsLootNode() const
自身が根ノードであるか判定する.
Vector3 center_of_mass_global_coord
[4 * 3 = 12byte] グローバル座標系における重心の位置.旧名 GCOM