GaitGeneration by Graph Search
読み取り中…
検索中…
一致する文字列を見つけられません
interpolated_node_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_INTERPOLATED_NODE_CREATOR_H_
9#define DESIGNLAB_INTERPOLATED_NODE_CREATOR_H_
10
11#include <array>
12#include <memory>
13#include <vector>
14
16#include "math_util.h"
17#include "robot_state_node.h"
18
19
20namespace designlab
21{
22
26{
27public:
28 explicit InterpolatedNodeCreator(const std::shared_ptr<const IHexapodCoordinateConverter>& converter_ptr);
29
34 std::vector<RobotStateNode> CreateInterpolatedNode(const RobotStateNode& node, const RobotStateNode& next_node) const;
35
36private:
37 static constexpr float kInterpolatedDistance = 0.15f;
38 static constexpr float kInterpolatedAngle = math_util::ConvertDegToRad(0.1f);
39
40 static constexpr float kBodyMoveMaxInterpolatedDistance = 200.0f;
41
46 bool IsNoChange(const RobotStateNode& current_node, const RobotStateNode& next_node) const;
47
49 bool IsBodyMove(const RobotStateNode& current_node, const RobotStateNode& next_node) const;
50
52 bool IsBodyRot(const RobotStateNode& current_node, const RobotStateNode& next_node) const;
53
54 std::vector<RobotStateNode> CreateBodyMoveInterpolatedNode(const RobotStateNode& current_node, const RobotStateNode& next_node) const;
55
56 std::vector<RobotStateNode> CreateBodyRotInterpolatedNode(const RobotStateNode& current_node, const RobotStateNode& next_node) const;
57
59 std::vector<int> GetGroundMoveIndex(const RobotStateNode& current_node, const RobotStateNode& next_node) const;
60
62 std::vector<int> GetFreeMoveIndex(const RobotStateNode& current_node, const RobotStateNode& next_node) const;
63
64 std::vector<RobotStateNode> CreateLegMoveInterpolatedNode(const RobotStateNode& current_node, const RobotStateNode& next_node) const;
65
66
67 const std::shared_ptr<const IHexapodCoordinateConverter> converter_ptr_;
68};
69
70} // namespace designlab
71
72
73#endif // DESIGNLAB_INTERPOLATED_NODE_CREATOR_H_
矩形軌道を生成し,ノード間を補間するクラス.
std::vector< RobotStateNode > CreateInterpolatedNode(const RobotStateNode &node, const RobotStateNode &next_node) const
ノード間を補間する.
constexpr T ConvertDegToRad(const T deg) noexcept
角度を [deg] から [rad] に変換する関数.
Definition math_util.h:126
グラフ構造のためのノード(頂点).旧名 LNODE