GaitGeneration by Graph Search
読み取り中…
検索中…
一致する文字列を見つけられません
DesignLab
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
15
#include "
interface_hexapod_coordinate_converter.h
"
16
#include "
math_util.h
"
17
#include "
robot_state_node.h
"
18
19
20
namespace
designlab
21
{
22
25
class
InterpolatedNodeCreator
final
26
{
27
public
:
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
36
private
:
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_
designlab::InterpolatedNodeCreator
矩形軌道を生成し,ノード間を補間するクラス.
Definition
interpolated_node_creator.h:26
designlab::InterpolatedNodeCreator::CreateInterpolatedNode
std::vector< RobotStateNode > CreateInterpolatedNode(const RobotStateNode &node, const RobotStateNode &next_node) const
ノード間を補間する.
Definition
interpolated_node_creator.cpp:24
interface_hexapod_coordinate_converter.h
math_util.h
designlab::math_util::ConvertDegToRad
constexpr T ConvertDegToRad(const T deg) noexcept
角度を [deg] から [rad] に変換する関数.
Definition
math_util.h:126
designlab
Definition
abstract_dxlib_gui.cpp:18
robot_state_node.h
designlab::RobotStateNode
グラフ構造のためのノード(頂点).旧名 LNODE
Definition
robot_state_node.h:47
構築:
1.9.8