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
19namespace designlab {
20
24 public:
26 const std::shared_ptr<const IHexapodCoordinateConverter>& converter_ptr);
27
32 std::vector<RobotStateNode> CreateInterpolatedNode(
33 const RobotStateNode& node, const RobotStateNode& next_node) const;
34
35 private:
36 static constexpr float kInterpolatedDistance = 0.15f;
37 static constexpr float kInterpolatedAngle =
39
40 static constexpr float kBodyMoveMaxInterpolatedDistance =
41 200.0f;
42
47 bool IsNoChange(const RobotStateNode& current_node,
48 const RobotStateNode& next_node) const;
49
51 bool IsBodyMove(const RobotStateNode& current_node,
52 const RobotStateNode& next_node) const;
53
55 bool IsBodyRot(const RobotStateNode& current_node,
56 const RobotStateNode& next_node) const;
57
58 std::vector<RobotStateNode> CreateBodyMoveInterpolatedNode(
59 const RobotStateNode& current_node,
60 const RobotStateNode& next_node) const;
61
62 std::vector<RobotStateNode> CreateBodyRotInterpolatedNode(
63 const RobotStateNode& current_node,
64 const RobotStateNode& next_node) const;
65
67 std::vector<int> GetGroundMoveIndex(const RobotStateNode& current_node,
68 const RobotStateNode& next_node) const;
69
71 std::vector<int> GetFreeMoveIndex(const RobotStateNode& current_node,
72 const RobotStateNode& next_node) const;
73
74 std::vector<RobotStateNode> CreateLegMoveInterpolatedNode(
75 const RobotStateNode& current_node,
76 const RobotStateNode& next_node) const;
77
78 const std::shared_ptr<const IHexapodCoordinateConverter> converter_ptr_;
79};
80
81} // namespace designlab
82
83#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:119
グラフ構造のためのノード(頂点).