Skip to content

Commit 7b28781

Browse files
committed
[AutoBalancer, Stabilizer] add description of each data port
1 parent 2870d44 commit 7b28781

File tree

2 files changed

+56
-56
lines changed

2 files changed

+56
-56
lines changed

rtc/AutoBalancer/AutoBalancer.cpp

+22-22
Original file line numberDiff line numberDiff line change
@@ -54,29 +54,29 @@ static std::ostream& operator<<(std::ostream& os, const struct RTC::Time &tm)
5454
AutoBalancer::AutoBalancer(RTC::Manager* manager)
5555
: RTC::DataFlowComponentBase(manager),
5656
// <rtc-template block="initializer">
57-
m_qRefIn("qRef", m_qRef),
58-
m_basePosIn("basePosIn", m_basePos),
59-
m_baseRpyIn("baseRpyIn", m_baseRpy),
60-
m_zmpIn("zmpIn", m_zmp),
61-
m_optionalDataIn("optionalData", m_optionalData),
62-
m_emergencySignalIn("emergencySignal", m_emergencySignal),
63-
m_diffCPIn("diffCapturePoint", m_diffCP),
64-
m_refFootOriginExtMomentIn("refFootOriginExtMoment", m_refFootOriginExtMoment),
57+
m_qRefIn("qRef", m_qRef), // 関節角度入力値
58+
m_basePosIn("basePosIn", m_basePos), // ベースリンク位置入力値
59+
m_baseRpyIn("baseRpyIn", m_baseRpy), // ベースリンク姿勢入力値 (rpy)
60+
m_zmpIn("zmpIn", m_zmp), // ZMP 入力値 (ベースリンク座標)
61+
m_optionalDataIn("optionalData", m_optionalData), // 各足の接地状態(遊脚<->支持脚)が変わるまでの時間
62+
m_emergencySignalIn("emergencySignal", m_emergencySignal), // 転倒判定フラグ (false: 非転倒, true: 転倒)
63+
m_diffCPIn("diffCapturePoint", m_diffCP), // Capture Point 誤差 (world 座標)
64+
m_refFootOriginExtMomentIn("refFootOriginExtMoment", m_refFootOriginExtMoment), // (把持物体などによる)目標外モーメント
6565
m_refFootOriginExtMomentIsHoldValueIn("refFootOriginExtMomentIsHoldValue", m_refFootOriginExtMomentIsHoldValue),
66-
m_actContactStatesIn("actContactStates", m_actContactStates),
67-
m_qOut("q", m_qRef),
68-
m_zmpOut("zmpOut", m_zmp),
69-
m_basePosOut("basePosOut", m_basePos),
70-
m_baseRpyOut("baseRpyOut", m_baseRpy),
71-
m_baseTformOut("baseTformOut", m_baseTform),
72-
m_basePoseOut("basePoseOut", m_basePose),
73-
m_accRefOut("accRef", m_accRef),
74-
m_contactStatesOut("contactStates", m_contactStates),
75-
m_toeheelRatioOut("toeheelRatio", m_toeheelRatio),
76-
m_controlSwingSupportTimeOut("controlSwingSupportTime", m_controlSwingSupportTime),
77-
m_walkingStatesOut("walkingStates", m_walkingStates),
78-
m_sbpCogOffsetOut("sbpCogOffset", m_sbpCogOffset),
79-
m_cogOut("cogOut", m_cog),
66+
m_actContactStatesIn("actContactStates", m_actContactStates), // 各脚の実接触状態 (false: 遊脚, true: 支持脚)
67+
m_qOut("q", m_qRef), // 関節角度出力値
68+
m_zmpOut("zmpOut", m_zmp), // ZMP 出力値 (ベースリンク座標)
69+
m_basePosOut("basePosOut", m_basePos), // ベースリンク位置出力値
70+
m_baseRpyOut("baseRpyOut", m_baseRpy), // ベースリンク姿勢出力値 (rpy)
71+
m_baseTformOut("baseTformOut", m_baseTform), // ベースリンク位置姿勢 (matrix)
72+
m_basePoseOut("basePoseOut", m_basePose), // ベースリンク位置姿勢 (rpy)
73+
m_accRefOut("accRef", m_accRef), // IMU の目標加速度
74+
m_contactStatesOut("contactStates", m_contactStates), // 各足の目標接触状態 (false: 遊脚, true: 支持脚)
75+
m_toeheelRatioOut("toeheelRatio", m_toeheelRatio), // 各足の回転状態 (1 -> 0: べた足 -> つま先 or かかと)
76+
m_controlSwingSupportTimeOut("controlSwingSupportTime", m_controlSwingSupportTime), // 各足の接地状態(遊脚<->支持脚)が変わるまでの時間
77+
m_walkingStatesOut("walkingStates", m_walkingStates), // 歩行中かどうか (false: 非歩行, true: 歩行)
78+
m_sbpCogOffsetOut("sbpCogOffset", m_sbpCogOffset), // 目標外力と釣り合うための重心位置修正量 (world 座標)
79+
m_cogOut("cogOut", m_cog), // 重心位置出力値 (world 座標)
8080
m_AutoBalancerServicePort("AutoBalancerService"),
8181
// </rtc-template>
8282
gait_type(BIPED),

rtc/Stabilizer/Stabilizer.cpp

+34-34
Original file line numberDiff line numberDiff line change
@@ -61,42 +61,42 @@ static double switching_inpact_absorber(double force, double lower_th, double up
6161
Stabilizer::Stabilizer(RTC::Manager* manager)
6262
: RTC::DataFlowComponentBase(manager),
6363
// <rtc-template block="initializer">
64-
m_qCurrentIn("qCurrent", m_qCurrent),
65-
m_qRefIn("qRef", m_qRef),
66-
m_rpyIn("rpy", m_rpy),
67-
m_zmpRefIn("zmpRef", m_zmpRef),
64+
m_qCurrentIn("qCurrent", m_qCurrent), // 関節角度エンコーダ値
65+
m_qRefIn("qRef", m_qRef), // 関節角度入力値
66+
m_rpyIn("rpy", m_rpy), // IMU 姿勢計測値 (rpy)
67+
m_zmpRefIn("zmpRef", m_zmpRef), // ZMP 入力値 (ベースリンク座標)
6868
m_StabilizerServicePort("StabilizerService"),
69-
m_basePosIn("basePosIn", m_basePos),
70-
m_baseRpyIn("baseRpyIn", m_baseRpy),
71-
m_contactStatesIn("contactStates", m_contactStates),
72-
m_toeheelRatioIn("toeheelRatio", m_toeheelRatio),
73-
m_controlSwingSupportTimeIn("controlSwingSupportTime", m_controlSwingSupportTime),
74-
m_qRefSeqIn("qRefSeq", m_qRefSeq),
75-
m_walkingStatesIn("walkingStates", m_walkingStates),
76-
m_sbpCogOffsetIn("sbpCogOffset", m_sbpCogOffset),
77-
m_qRefOut("q", m_qRef),
78-
m_tauOut("tau", m_tau),
79-
m_zmpOut("zmp", m_zmp),
80-
m_refCPOut("refCapturePoint", m_refCP),
81-
m_actCPOut("actCapturePoint", m_actCP),
82-
m_diffCPOut("diffCapturePoint", m_diffCP),
83-
m_diffFootOriginExtMomentOut("diffFootOriginExtMoment", m_diffFootOriginExtMoment),
84-
m_actContactStatesOut("actContactStates", m_actContactStates),
85-
m_COPInfoOut("COPInfo", m_COPInfo),
86-
m_emergencySignalOut("emergencySignal", m_emergencySignal),
69+
m_basePosIn("basePosIn", m_basePos), // ベースリンク位置入力値
70+
m_baseRpyIn("baseRpyIn", m_baseRpy), // ベースリンク姿勢入力値 (rpy)
71+
m_contactStatesIn("contactStates", m_contactStates), // 各足の目標接触状態 (false: 遊脚, true: 支持脚)
72+
m_toeheelRatioIn("toeheelRatio", m_toeheelRatio), // 各足の回転状態 (1 -> 0: べた足 -> つま先 or かかと)
73+
m_controlSwingSupportTimeIn("controlSwingSupportTime", m_controlSwingSupportTime), // 各足の接地状態(遊脚<->支持脚)が変わるまでの時間
74+
m_qRefSeqIn("qRefSeq", m_qRefSeq), // SequencePlayer が出力する関節角度 (補間中かどうかの判断のみに利用)
75+
m_walkingStatesIn("walkingStates", m_walkingStates), // 歩行中かどうか (false: 非歩行, true: 歩行)
76+
m_sbpCogOffsetIn("sbpCogOffset", m_sbpCogOffset), // 目標外力と釣り合うための重心位置修正量 (world 座標)
77+
m_qRefOut("q", m_qRef), // 関節角度出力値
78+
m_tauOut("tau", m_tau), // 関節トルク出力値
79+
m_zmpOut("zmp", m_zmp), // ZMP 出力値 (ベースリンク座標)
80+
m_refCPOut("refCapturePoint", m_refCP), // 目標 Capture Point (ベースリンク座標)
81+
m_actCPOut("actCapturePoint", m_actCP), // 実 Capture Point (ベースリンク座標)
82+
m_diffCPOut("diffCapturePoint", m_diffCP), // Capture Point 誤差 (world 座標)
83+
m_diffFootOriginExtMomentOut("diffFootOriginExtMoment", m_diffFootOriginExtMoment), // モーメント誤差 (支持脚座標)
84+
m_actContactStatesOut("actContactStates", m_actContactStates), // 各脚の実接触状態 (false: 遊脚, true: 支持脚)
85+
m_COPInfoOut("COPInfo", m_COPInfo), // (COP 計算に必要な)各足に作用するモーメント (end-effector 座標)
86+
m_emergencySignalOut("emergencySignal", m_emergencySignal), // 転倒判定フラグ (false: 非転倒, true: 転倒)
8787
// for debug output
88-
m_originRefZmpOut("originRefZmp", m_originRefZmp),
89-
m_originRefCogOut("originRefCog", m_originRefCog),
90-
m_originRefCogVelOut("originRefCogVel", m_originRefCogVel),
91-
m_originNewZmpOut("originNewZmp", m_originNewZmp),
92-
m_originActZmpOut("originActZmp", m_originActZmp),
93-
m_originActCogOut("originActCog", m_originActCog),
94-
m_originActCogVelOut("originActCogVel", m_originActCogVel),
95-
m_actBaseRpyOut("actBaseRpy", m_actBaseRpy),
96-
m_currentBasePosOut("currentBasePos", m_currentBasePos),
97-
m_currentBaseRpyOut("currentBaseRpy", m_currentBaseRpy),
98-
m_allRefWrenchOut("allRefWrench", m_allRefWrench),
99-
m_allEECompOut("allEEComp", m_allEEComp),
88+
m_originRefZmpOut("originRefZmp", m_originRefZmp), // 目標 ZMP (支持脚座標)
89+
m_originRefCogOut("originRefCog", m_originRefCog), // 目標重心位置 (支持脚座標)
90+
m_originRefCogVelOut("originRefCogVel", m_originRefCogVel), // 目標重心速度 (支持脚座標)
91+
m_originNewZmpOut("originNewZmp", m_originNewZmp), // 安定化のために修正された目標 ZMP (支持脚座標)
92+
m_originActZmpOut("originActZmp", m_originActZmp), // 実 ZMP (支持脚座標)
93+
m_originActCogOut("originActCog", m_originActCog), // 実重心位置 (支持脚座標)
94+
m_originActCogVelOut("originActCogVel", m_originActCogVel), // 実重心速度 (支持脚座標)
95+
m_actBaseRpyOut("actBaseRpy", m_actBaseRpy), // 実ベースリンク姿勢 (rpy)
96+
m_currentBasePosOut("currentBasePos", m_currentBasePos), // 姿勢追従制御により重心位置が変わらないように修正を加えたベースリンク位置
97+
m_currentBaseRpyOut("currentBaseRpy", m_currentBaseRpy), // ベースリンク姿勢指令値に姿勢追従制御の修正量を加えた姿勢
98+
m_allRefWrenchOut("allRefWrench", m_allRefWrench), // 各足の目標レンチ (支持脚座標)
99+
m_allEECompOut("allEEComp", m_allEEComp), // 安定化制御により修正された各足先位置姿勢修正量 (pos, rpy)
100100
m_debugDataOut("debugData", m_debugData),
101101
control_mode(MODE_IDLE),
102102
st_algorithm(OpenHRP::StabilizerService::TPCC),

0 commit comments

Comments
 (0)