GaitGeneration by Graph Search
読み取り中…
検索中…
一致する文字列を見つけられません
com_candidate_polygon_maker.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_COM_CANDIDATE_POLYGON_MAKER_H_
9#define DESIGNLAB_COM_CANDIDATE_POLYGON_MAKER_H_
10
11#include <array>
12#include <memory>
13#include <vector>
14
15#include "math_polygon2.h"
16#include "discrete_com_pos.h"
18#include "robot_state_node.h"
19
20
21namespace designlab
22{
23
28{
30 com_pos(enums::DiscreteComPos::kFront),
31 polygon(),
32 is_able(false) {}
33
36 bool is_able;
37};
38
39
45{
46public:
47 static constexpr int kMakePolygonNum = 7;
48
49
51 const std::shared_ptr<const IHexapodCoordinateConverter>& converter_ptr);
52
53
59 const RobotStateNode& node,
60 std::array<ComPosAndPolygon, kMakePolygonNum>* output_poly) const;
61
62
63private:
66 static constexpr bool kDoCheckPolygon = true;
67
68
71 void MakeCandidateBox(const std::array<Vector2, HexapodConst::kLegNum>& leg_pos,
72 const int start_leg_num, Polygon2* output_poly) const;
73
76 void MakeCandidateTriangle(
77 const std::array<Vector2, HexapodConst::kLegNum>& leg_pos,
78 ComPosAndPolygon* output) const;
79
83 bool IsAblePolygon(const Polygon2& poly) const;
84
85 const std::shared_ptr<const IHexapodCoordinateConverter> converter_ptr_;
86};
87
88} // namespace designlab
89
90
91#endif // DESIGNLAB_COM_CANDIDATE_POLYGON_MAKER_H_
重心位置の候補地点を示す多角形を作成するクラス.
static constexpr int kMakePolygonNum
作成する多角形の数.
void MakeCandidatePolygon(const RobotStateNode &node, std::array< ComPosAndPolygon, kMakePolygonNum > *output_poly) const
現在のロボットの状態を表すノードから, 重心位置の候補地点を示す多角形を作成する.
離散化された重心位置とその重心位置を含む多角形の組み合わせを表す構造体.
Polygon2 polygon
重心位置を含む多角形.
bool is_able
重心位置を含む多角形が正しいかどうか.
enums::DiscreteComPos com_pos
離散化された重心位置.
2次元の多角形を表す構造体.
グラフ構造のためのノード(頂点).旧名 LNODE