GaitGeneration by Graph Search
読み取り中…
検索中…
一致する文字列を見つけられません
robot_operation.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_OPERATION_H_
9#define DESIGNLAB_ROBOT_OPERATION_H_
10
11#include <format>
12
13#include "math_quaternion.h"
14#include "math_vector3.h"
15#include "string_util.h"
17
18namespace designlab {
19
42
73
76 "Note that this file is not referenced by some settings.");
77
79
81 straight_move_vector, "Param",
82 "The value that is referenced when the setting is to go straight in the "
83 "specified direction.");
85 straight_move_position, "Param",
86 "The value that is referred to when the setting is to go straight to the "
87 "specified coordinates.");
89 spot_turn_last_posture, "Param",
90 "The value that is referenced when setting the camera to turn on the "
91 "spot until it reaches the specified posture.");
93 spot_turn_rot_axis, "Param",
94 "The value referred to when setting up in-situ turning around the "
95 "specified axis (in the direction of right-hand threads).");
97 turn_center, "Param",
98 "The value referred to when setting the rotation around the specified "
99 "center.");
101 turn_radius, "Param",
102 "The value referenced in the case of a setup that turns at a specified "
103 "radius.");
105 turn_clockwise, "Param",
106 "The value that is referenced when the setting is to turn in the "
107 "specified direction.");
108
110 operation_type, DESIGNLAB_TOML11_NO_TABLE,
111 std::format("This is the setting of the robot's operation method. ({})",
113};
114
115} // namespace designlab
116
118 straight_move_position, spot_turn_last_posture,
119 spot_turn_rot_axis, operation_type, turn_center,
120 turn_radius, turn_clockwise);
121
122#endif // DESIGNLAB_ROBOT_OPERATION_H_
std::string EnumValuesToString(const std::string separator)
enum型を渡すと,その要素を列挙した文字列を返す関数.
Definition string_util.h:72
RobotOperationType
Robotをどのように動かすかを表す列挙体.
@ kSpotTurnRotAxis
その場で旋回させる(回転軸を示し,その軸周りの右ねじの回転)
@ kStraightMoveVector
直線移動をさせる(移動したい方向をベクトルで示す)
@ kStraightMovePosition
直線移動をさせる(移動したい座標を示す)
@ kTurn
旋回中心と,旋回半径と,旋回方向を与えて旋回させる.
@ kSpotTurnLastPosture
その場で旋回させる(最終的な姿勢 Posture を示す)
@ kNone
何も動作をしない.
クォータニオンを表す構造体.
static Quaternion MakeByAngleAxis(float rad_angle, const Vector3 &axis)
回転軸と回転角からクォータニオンを作成する. q = cos(θ/2) * w + sin(θ/2) * { v.x + v.y + v.z } となる. ノルムは必ず1になる.
探索において目標となる座標や角度,評価する値についてまとめた構造体.
Vector2 turn_center
旋回中心.
Vector3 straight_move_vector
< 目標方向.正規化されたベクトル.
float turn_radius
旋回半径.
RobotOperationType operation_type
bool turn_clockwise
旋回方向.
Vector3 straight_move_position
目標姿勢 ( posture )
Quaternion spot_turn_last_posture
旋回時の回転軸.右ねじの回転.
2次元の位置ベクトルを表す構造体.
3次元の位置ベクトルを表す構造体.
static constexpr Vector3 GetUpVec() noexcept
上に進む単位ベクトルを返す. 静的な関数なので,Vector3::GetUpVec() と呼び出せる.
#define DESIGNLAB_TOML11_SERIALIZE(NAME,...)
tomlファイルのシリアライズ/デシリアライズを行うためのマクロ. TOML11_DEFINE_CONVERSION_NON_INTRUSIVEをラッパしたもの....
#define DESIGNLAB_TOML11_NO_TABLE
tomlファイルに追加する変数をテーブルに追加しないことを示すためのマクロ.
#define DESIGNLAB_TOML11_DESCRIPTION_CLASS(CLASS)
tomlファイルに説明を追加するためのクラスの宣言を行うためのマクロ.
#define DESIGNLAB_TOML11_TABLE_NO_DESCRIPTION()
tomlファイルに追加するテーブルにコメントを追加しないことを示すマクロ. DESIGNLAB_TOML11_DESCRIPTION_CLASS内に必ず記述する必要がある.
#define DESIGNLAB_TOML11_VARIABLE_ADD_DESCRIPTION(VARIABLE, TABLE, DESCRIPTION)
tomlファイルに変数とファイルの説明を追加するためのマクロ.
#define DESIGNLAB_TOML11_FILE_ADD_DESCRIPTION(DESCRIPTION)
tomlファイルにファイルの説明を追加するためのマクロ. DESIGNLAB_TOML11_DESCRIPTION_CLASS内に必ず記述する必要がある.