8#ifndef DESIGNLAB_INTERFACE_HEXAPOD_JOINT_CALCULATOR_H_
9#define DESIGNLAB_INTERFACE_HEXAPOD_JOINT_CALCULATOR_H_
60 std::array<HexapodJointState, HexapodConst::kLegNum> joint_state;
81 const int leg_index,
const Vector3& leg_pos)
const noexcept = 0;
92 const std::array<HexapodJointState, HexapodConst::kLegNum>& joint_state)
115 const int leg_index,
const Vector3& leg_pos,
static constexpr int kLegNum
間接角度や角速度を計算する処理のインターフェース.
virtual HexapodJointState CalculateJointState(const int leg_index, const Vector3 &leg_pos) const noexcept=0
指定した脚の関節のグローバル座標と,角度を計算する. 重たいのでグラフ探索や,描画処理中にループで使用することは推奨しない. 間接の可動範囲外まで動いてしまう場合でも,答えを返す. 目標座標...
virtual bool IsValidJointState(const int leg_index, const Vector3 &leg_pos, const HexapodJointState &joint_state) const noexcept=0
指定した脚のHexapodJointStateが正しく計算できているかを調べる. 目標座標に届かない場合や,間接の可動範囲外まで動いてしまう場合, 戻り値は false になる.
std::array< HexapodJointState, HexapodConst::kLegNum > CalculateAllJointState(const RobotStateNode &node) const noexcept
全ての関節のグローバル座標と,角度を計算する. 重たいのでグラフ探索や,描画処理中にループで使用することは推奨しない. 間接の可動範囲外まで動いてしまう場合でも,答えを返す. 目標座標に届か...
virtual ~IHexapodJointCalculator()=default
bool IsValidAllJointState(const RobotStateNode &node, const std::array< HexapodJointState, HexapodConst::kLegNum > &joint_state) const noexcept
HexapodJointStateが正しく計算できているかを調べる. 目標座標に届かない場合や,間接の可動範囲外まで動いてしまう場合, 戻り値は false になる.
std::vector< Vector3 > joint_pos_leg_coordinate
bool is_in_range
目標座標に脚が届かないならば false になる.
std::vector< float > joint_angle
グラフ構造のためのノード(頂点).旧名 LNODE