GaitGeneration by Graph Search
読み取り中…
検索中…
一致する文字列を見つけられません
robot_ground_point_renderer.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_ROBOT_GROUND_POINT_RENDERER_H_
9#define DESIGNLAB_ROBOT_GROUND_POINT_RENDERER_H_
10
11#include <array>
12#include <memory>
13#include <vector>
14
15#include "math_vector3.h"
16#include "hexapod_const.h"
18#include "robot_state_node.h"
19
20
21namespace designlab
22{
23
27{
28public:
30 const std::shared_ptr<const IHexapodCoordinateConverter>& converter_ptr);
31
32
38 void SetNodeAndSimulationEndNodeIndex(const std::vector<RobotStateNode>& result_node,
39 const std::vector<size_t>& simulation_end_node_index);
40
45 void Draw(size_t draw_simulation_num, bool draw_all_simulation = false) const;
46
47private:
48 struct VectorAndIsGround
49 {
50 Vector3 vec;
51
52 bool is_ground;
53 };
54
55
56 const unsigned int kRightLegGroundPointColor;
57
58 const unsigned int kLeftLegGroundPointColor;
59
60 const unsigned int kRightLegGroundPointDarkColor;
61
62 const unsigned int kLeftLegGroundPointDarkColor;
63
65 const std::shared_ptr<const IHexapodCoordinateConverter> converter_ptr_;
66
69 size_t loaded_node_num_;
70
73 std::vector<std::vector<std::array<VectorAndIsGround, HexapodConst::kLegNum>>> ground_point_;
74};
75
76} // namespace designlab
77
78
79#endif // DESIGNLAB_ROBOT_GROUND_POINT_RENDERER_H_
ロボットが接地点した地点の履歴を描画するクラス.
void SetNodeAndSimulationEndNodeIndex(const std::vector< RobotStateNode > &result_node, const std::vector< size_t > &simulation_end_node_index)
void Draw(size_t draw_simulation_num, bool draw_all_simulation=false) const
3次元の位置ベクトルを表す構造体.