8#ifndef DESIGNLAB_XR_R1_H_
9#define DESIGNLAB_XR_R1_H_
32 const int leg_index,
const Vector3& leg_pos)
const noexcept override;
35 const int leg_index,
const Vector3& leg_pos,
40 const Vector3& converted_position,
int leg_index,
42 const bool consider_rot)
const override;
45 const Vector3& converted_position,
int leg_index,
47 const bool consider_rot)
const override;
50 const Vector3& converted_position,
52 const bool consider_rot)
const override;
55 const Vector3& converted_position,
int leg_index)
const;
58 const Vector3& converted_position,
int leg_index)
const;
73 const std::array<Vector3, HexapodConst::kLegNum>& leg_pos)
const override;
76 const std::array<Vector3, HexapodConst::kLegNum>& leg_pos)
const override;
79 const std::array<Vector3, HexapodConst::kLegNum>& leg_pos)
const override;
86 static constexpr int kMaxLegRSize{ 200 };
89 std::array<float, kMaxLegRSize> InitMaxLegR()
const;
90 std::array<Vector2, HexapodConst::kLegNum> InitMinLegPosXY()
const;
91 std::array<Vector2, HexapodConst::kLegNum> InitMaxLegPosXY()
const;
94 const float kBodyLiftingHeightMin;
97 const float kBodyLiftingHeightMax;
99 const float kMovableCoxaAngleMin;
100 const float kMovableCoxaAngleMax;
102 const float kMinLegR;
103 const float kMaxLegR;
105 const float kFreeLegHeight;
106 const float kStableMargin;
108 const float kMinLegDistance;
112 std::array<float, kMaxLegRSize> kMaxLegRArray;
115 std::array<Vector2, HexapodConst::kLegNum> kMinLegPosXY;
118 std::array<Vector2, HexapodConst::kLegNum> kMaxLegPosXY;
122 const std::array<Vector3, HexapodConst::kLegNum> leg_base_pos_robot_coordinate_;
125 const std::array<Vector3, HexapodConst::kLegNum> free_leg_pos_leg_coordinate_;
ロボットは重心位置・アクチュエータなど様々な点を基準とする座標系を持つ. これらを相互に変換する処理のインターフェース.
間接角度や角速度を計算する処理のインターフェース.
6脚ロボットが有効な姿勢をとっているかを チェックする処理のインターフェース.
bool IsStable(const leg_func::LegStateBit &leg_state, const std::array< Vector3, HexapodConst::kLegNum > &leg_pos) const override
安定余裕を用いて,静的に安定しているかどうかを判定する.
float GetGroundHeightMarginMax() const noexcept override
地面の最大高さと重心位置を最大どれだけ離すかを返す.
bool IsLegInterfering(const std::array< Vector3, HexapodConst::kLegNum > &leg_pos) const override
脚が他の脚と干渉しているかどうかを判定する.
float GetGroundHeightMarginMin() const noexcept override
地面の最大高さと重心位置を最小どれだけ離すかを返す.
Vector3 GetFreeLegPosLegCoordinate(int leg_index) const noexcept override
遊脚する位置を返す,脚座標系.
bool IsBodyInterferingWithGround(const RobotStateNode &node, const DividedMapState &devide_map) const override
胴体が地面と干渉しているかどうかを判定する.
bool IsValidJointState(const int leg_index, const Vector3 &leg_pos, const HexapodJointState &joint_state) const noexcept override
指定した脚のHexapodJointStateが正しく計算できているかを調べる. 目標座標に届かない場合や,間接の可動範囲外まで動いてしまう場合, 戻り値は false になる.
HexapodJointState CalculateJointState(const int leg_index, const Vector3 &leg_pos) const noexcept override
指定した脚の関節のグローバル座標と,角度を計算する. 重たいのでグラフ探索や,描画処理中にループで使用することは推奨しない. 間接の可動範囲外まで動いてしまう場合でも,...
Vector3 ConvertGlobalToLegCoordinate(const Vector3 &converted_position, int leg_index, const Vector3 ¢er_of_mass_global, const Quaternion &robot_quat, const bool consider_rot) const override
グローバル座標系で表現されている座標を,脚座標系に変換する.
float CalculateStabilityMargin(const leg_func::LegStateBit &leg_state, const std::array< Vector3, HexapodConst::kLegNum > &leg_pos) const override
安定余裕(Stability Margin)を計算する. 詳しくは「不整地における歩行機械の静的安定性評価基準」 という論文を読んで欲しい. 接地脚を繋いで作られる多角形の辺と重心の距離の最小値を計...
Vector3 ConvertLegToRobotCoordinate(const Vector3 &converted_position, int leg_index) const
脚座標系で表現されている座標を,ロボット座標系に変換する.
bool IsLegInRange(int leg_index, const Vector3 &leg_pos) const override
脚が可動範囲内にあるかどうかを判定する.
Vector3 GetLegBasePosRobotCoordinate(int leg_index) const noexcept override
脚の付け根の座標(leg base position )を取得する.ロボット座標系.
Vector3 ConvertRobotToGlobalCoordinate(const Vector3 &converted_position, const Vector3 ¢er_of_mass_global, const Quaternion &robot_quat, const bool consider_rot) const override
ロボット座標系で表現されている座標を,グローバル座標系に変換する.
Vector3 ConvertRobotToLegCoordinate(const Vector3 &converted_position, int leg_index) const
ロボット座標系で表現されている座標を,脚座標系に変換する.
Vector3 ConvertLegToGlobalCoordinate(const Vector3 &converted_position, int leg_index, const Vector3 ¢er_of_mass_global, const Quaternion &robot_quat, const bool consider_rot) const override
脚座標系で表現されている座標を,グローバル座標系に変換する.
std::bitset< kLegStateBitNum > LegStateBit
脚状態を保存する型.28bitのビット型.