GaitGeneration by Graph Search
読み取り中…
検索中…
一致する文字列を見つけられません
DesignLab
simulation_end_checker_by_position.cpp
[詳解]
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
#include "
simulation_end_checker_by_position.h
"
9
10
11
namespace
designlab
12
{
13
14
SimulationEndCheckerByPosition::SimulationEndCheckerByPosition
(
15
const
Vector3
& goal_position,
16
const
float
allowable_error) :
17
goal_position_(goal_position),
18
allowable_error_(allowable_error)
19
{
20
}
21
22
bool
SimulationEndCheckerByPosition::IsEnd
(
const
RobotStateNode
& node)
const
23
{
24
// 位置を取得し,誤差を計算.
25
const
float
dif = (node.
center_of_mass_global_coord
- goal_position_).GetLength();
26
27
if
(dif > allowable_error_)
28
{
29
return
false
;
30
}
31
32
return
true
;
33
}
34
35
}
// namespace designlab
designlab::SimulationEndCheckerByPosition::SimulationEndCheckerByPosition
SimulationEndCheckerByPosition(const Vector3 &goal_position, float allowable_error)
Definition
simulation_end_checker_by_position.cpp:14
designlab::SimulationEndCheckerByPosition::IsEnd
bool IsEnd(const RobotStateNode &node) const override
シミュレーションの終了を判定する.
Definition
simulation_end_checker_by_position.cpp:22
designlab
Definition
abstract_dxlib_gui.cpp:18
simulation_end_checker_by_position.h
designlab::RobotStateNode
グラフ構造のためのノード(頂点).旧名 LNODE
Definition
robot_state_node.h:47
designlab::RobotStateNode::center_of_mass_global_coord
Vector3 center_of_mass_global_coord
[4 * 3 = 12byte] グローバル座標系における重心の位置.旧名 GCOM
Definition
robot_state_node.h:202
designlab::Vector3
3次元の位置ベクトルを表す構造体.
Definition
math_vector3.h:40
構築:
1.9.8