Isaac LabとPPOで始めるUnitree G1のボトル把持・持ち上げ強化学習プロジェクト:Object-Relative補正とDGX Spark・実機統合

Isaac LabとPPOで始めるUnitree G1のボトル把持・持ち上げ強化学習プロジェクト:Object-Relative補正とDGX Spark・実機統合

Week 3 progress of the G1 Bottle Pick-and-Lift Reinforcement Learning project!
2026.08.20

はじめに

前回の記事では、Unitree G1 Inspire Handを対象としたボトル把持・持ち上げ強化学習プロジェクトについて、以下の内容を紹介しました。

  • 0.08 kgから0.62 kgまでのMass Curriculum
  • 0.62 kg条件に適応したStage 2 grasp / lift policy
  • dynamic bottleを動かさずに接近するStage 1 Safe Approach Policy
  • Stage 1とStage 2を接続するcontrolled ingress
  • Isaac Labのdecimationに起因するphase timing問題
  • checkpoint architectureとobservation contractの確認
  • termination-basedなformal deterministic evaluation

前回までの主要なsimulation結果は、以下の通りでした。

Module Condition Result
Stage 1 Dynamic 0.62 kg、x/y ±1.5 cm 768 / 768
Stage 2 Fixed nominal、0.62 kg 766 / 768
Zero-residual bridge Fixed nominal Stage 2 handoverまで到達

一方で、前回の記事の時点では、actual Stage 1 handover stateからStage 2 learned residualを動作させた統合評価は完了していませんでした。

今週は、この統合部分を完成させた後、randomized workspaceのfailure分析、object-relative trajectory correction、広域workspaceへの拡張を進めました。

さらに、学習済みcheckpointをNVIDIA DGX Sparkへ移行し、Isaac Labに依存しないstandalone actorを構築しました。その後、Unitree G1実機とInspire Handの状態取得、task-ready poseへの右腕遷移、空中での手指動作、そして最初のbounded model-derived commandまで段階的に確認しました。

この記事では、以下の内容をまとめます。

  • Learned Stage 2を接続したnominal integration
  • Integrated RandPosで発生したcoordinate semanticsの問題
  • Object-relative ingress / lift correction
  • ±1.5 cm条件での成功率55.7%から97.4%への改善
  • ±5 cm workspaceとStage 0 coarse bias
  • 実用的な非対称workspaceでの84.4%成功
  • DGX Sparkへのcheckpoint移行
  • Standalone PyTorch actorの再構築
  • Brev x86とDGX Spark ARM64の推論一致
  • 実機G1 / Inspire Handとの初期統合
  • 今週遭遇したfailureと実装上の注意点
  • 現在の到達点と今後の課題

本記事の成功率はIsaac Lab上のsimplified rigid-body bottleを使用したsimulation結果です。
実機に関する内容は、固定立位・監視下・低速・無物体または軽量空ボトルで行った段階的な検証です。実際の飲料ボトルの自律把持・持ち上げ、sim-to-real transfer、human handover、安全認証を示すものではありません。


Learned Stage 2を統合Pipelineへ接続する

前回は、Stage 1からcontrolled ingressを経由してStage 2へ到達できることを確認しました。

最初のbridge diagnosticでは、Stage 2 residualを厳密にzeroにしていました。

learned Stage 1
  ↓
controlled ingress
  ↓
scripted Stage 2 base trajectory
  + zero residual

この構成では、安全なhandoverには成功したものの、0.62 kg bottleを意味のある高さまで持ち上げることはできませんでした。

代表的な結果は以下でした。

Metric Result
Maximum center-height increase approximately 4.8 mm
Final center-height increase approximately 0.04 mm
Maximum horizontal displacement approximately 43 mm
Strict retention / lift False

つまり、Stage 1からStage 2へのgeometry bridgeは成立していましたが、0.62 kg条件でのgrasp / retentionにはlearned residualが必要でした。

そこで、選択済みのStage 2 checkpointを統合environmentへ接続しました。

Stage 1:
  frozen deterministic policy

controlled ingress:
  deterministic arm interpolation

Stage 2:
  scripted base trajectory
  + frozen deterministic 12D hand residual

Stage 2 actorの推論は、physics substepごとではなく、environment stepごとに1回だけ実行します。

environment step:
  actor inference
  previous residual update
  target calculation

remaining physics substep:
  same targetを保持

これは前回発見したdecimation問題と同様に重要です。

actor inferenceやprevious residual updateをphysics substepごとに実行すると、policyがtraining時とは異なる時間スケールで動作してしまいます。

修正後、Stage 2 actor inference countは期待値と一致しました。

actual inference count:
  742

expected inference count:
  742

Nominal conditionでは、Stage 2 learned residualを有効にすることで、約3.58 cmのmeaningful liftを確認しました。

ただし、持ち上げ成功後もpolicy targetを更新し続けると、時間経過とともにbottleが傾き、最終的にslipする場合がありました。


持ち上げ成功後のTarget Latch

Formal success判定では、一定期間連続して以下を満たす必要があります。

  • bottle height
  • retention
  • workspace
  • uprightness
  • safety condition

今回の設定では、24 consecutive valid stepsをformal success conditionとして使用しました。

Success成立後は、最後にcommandしたhand targetを保存し、そのtargetを保持するsupervisory latchを追加しました。

retention / lift success
  ↓
copy current commanded hand target
  ↓
stop updating hand target
  ↓
continue normal physics simulation

このlatchが固定するのはcommand targetだけです。

以下の操作は行っていません。

  • bottle attachment
  • bottle freeze
  • kinematic override
  • teleport
  • physics停止
  • object poseの直接変更

Latch後の代表的な結果は以下でした。

Metric Result
Commanded-target drift 0.000000000
Final retention count 423
Final center-height increase approximately 0.0358 m
Final uprightness approximately 0.969

これにより、nominal conditionで以下の一連の動作を確認できました。

Stage 1 outer approach
  ↓
controlled ingress
  ↓
Stage 2 grasp
  ↓
lift
  ↓
retention
  ↓
stable extended hold

ただし、この結果はhybrid controlです。

learned Stage 1
  + deterministic geometric bridge
  + learned Stage 2
  + supervisory target latch

Pure end-to-end RLではありません。


Integrated RandPosの最初の結果は55.7%

Nominal integrationが成立した後、ボトル位置をx/y方向に±1.5 cm変化させるintegrated RandPos evaluationを実施しました。

条件は以下です。

bottle:
  dynamic simplified rigid body
  0.62 kg

randomization:
  x/y ±0.015 m

Stage 1:
  frozen model_149

ingress / lift:
  fixed nominal joint-space targets

Stage 2:
  frozen model_100

success:
  termination_managerによる
  24-step retention / lift success

結果は以下でした。

Seed Success
42 145 / 256
43 283 / 512
Combined 428 / 768

Combined success rateは55.73%でした。

Failure distributionは以下でした。

Outcome Count Rate
Success 428 55.73%
Unsafe bottle disturbance 197 25.65%
Object out of workspace 43 5.60%
Timeout 100 13.02%

Stage 1は個別評価で768/768、Stage 2は固定条件で766/768でした。

それにもかかわらず、統合結果は428/768でした。

これは、個別policyのsuccess rateを掛け合わせても、integrated success rateにはならないことを示しています。


問題はPolicy性能ではなくCoordinate Semanticsだった

Failure mapを確認すると、failureはランダムではなく、ボトル位置に応じた方向性を持っていました。

1024 episodesのfailure分析では、unsafe failure 234件のうち233件が、ボトルのy offsetが負側の領域で発生していました。

また、positive x側ではtimeoutやworkspace failureが増加しました。

この結果から、単純なPPO noiseではなく、geometryの不整合を疑いました。

Stage 1はBottle-Relativeだった

Stage 1のtargetは、ボトル位置から計算されます。

outer_target
  = bottle_position + outer_offset

そのため、Stage 1はボトルが移動しても、ボトルに対する同じ相対位置へ移動できます。

IngressとLiftはNominal Joint Poseだった

一方で、Stage 1後のingressとliftは固定joint-space targetでした。

Stage 1:
  displaced bottleへ追従

ingress:
  nominal joint poseへ戻る

lift:
  nominal joint poseへ戻る

つまり、Stage 1まではobject-relativeでしたが、その後のtrajectoryでobject-relative semanticsが失われていました。

bottle-relative outer pose
  ↓
fixed nominal ingress
  ↓
fixed nominal lift

これは、数cmのボトル位置変化に対して、handがボトルから外れた位置へ戻る原因になります。

重要なポイントは、checkpointやPPOを再学習する前に、controller全体でcoordinate semanticsが一貫しているか確認する必要があることです。

Learned policyがobject-relativeでも、その後のscripted controllerがnominal joint-spaceへ戻れば、system全体はobject-relativeではない。


Local JacobianによるObject-Relative補正

この問題を解決するため、nominal ingress pose周辺でhand-center Jacobianを数値的に計測しました。

対象jointは以下の4Dです。

  • right shoulder pitch
  • right shoulder roll
  • right shoulder yaw
  • right elbow

Hand centerは、以下の4つのproximal linkの平均位置です。

  • index proximal
  • middle proximal
  • ring proximal
  • pinky proximal

Cartesian displacementからjoint correctionへの変換は、measured Jacobianのpseudoinverseを使用しました。

bottle_offset = settled_bottle_position - nominal_bottle_position

desired_hand_translation = gain × [offset_x, offset_y, 0]

joint_correction = Cartesian-to-arm pseudoinverse × desired_hand_translation

補正後のtargetは以下です。

corrected_ingress_target = nominal_ingress_target + joint_correction

corrected_lift_target = nominal_lift_target + joint_correction

同じcorrectionをingressとliftの両方へ適用することで、grasp開始後もobject-relative geometryを維持します。

Measured matrixは、概ね以下の特性を持っていました。

Joint x direction y direction
Shoulder pitch -5.28 rad/m -1.08 rad/m
Shoulder roll +0.32 rad/m +1.21 rad/m
Shoulder yaw -1.79 rad/m +1.66 rad/m
Elbow +5.40 rad/m +1.42 rad/m

Jacobian fitのRMSEは約0.036 mmでした。

ただし、これはnominal ingress pose周辺のlocal modelです。

±10 cmや±15 cmへ直接外挿できることを意味しません。


Correction Gainの比較

x/y ±1.5 cm条件で、correction gainを比較しました。

Gain Success
0.00 82 / 128
0.50 116 / 128
0.75 124 / 128
1.00 126 / 128

Gain 1.0を選択し、正式評価を実施しました。

変更していないものは以下です。

  • Stage 1 checkpoint
  • Stage 2 checkpoint
  • PPO weight
  • observation
  • residual scale
  • self-collision
  • bottle physics
  • formal success condition
  • unsafe threshold

追加trainingは行っていません。


±1.5 cmで成功率97.4%

Object-relative ingress / lift correctionを有効にしたformal evaluation結果は以下です。

Seed 42

Outcome Result
Success 253 / 256
Unsafe 0
Workspace 0
Timeout 3

Seed 43

Outcome Result
Success 495 / 512
Unsafe 0
Workspace 3
Timeout 14

Combined

Outcome Result Rate
Success 748 / 768 97.40%
Unsafe 0 / 768 0%
Workspace 3 / 768 0.39%
Timeout 17 / 768 2.21%

補正前後を比較すると、以下のようになります。

Metric Before After
Success 428 748
Success rate 55.73% 97.40%
Unsafe 197 0
Total failures 340 20

Successは320 episodes増加しました。

Failureは340件から20件へ減少し、約94.1%減少しました。

追加PPOを行わず、coordinate semanticsを修正しただけで、success rateが41.67 percentage points改善しました。

これは今週最も重要な結果でした。

Policyを増やす前に、learned controlとgeometric controlの間でframeとtarget semanticsが一致しているか確認する。


Workspaceを±5 cmへ拡張する

次に、ボトル位置範囲をx/y ±5 cmへ拡張しました。

まず、同じobject-relative correctionだけを使用し、Stage 0を追加しない状態で評価しました。

結果は以下でした。

Outcome Count Rate
Success 536 / 768 69.79%
Unsafe 20 / 768 2.60%
Workspace 2 / 768 0.26%
Timeout 210 / 768 27.34%

Stage 2到達後のconditional successは約91.94%でした。

Stage 2 reached:
  583 / 768

success after Stage 2:
  536 / 583

つまり、Stage 2へ到達できれば、多くのepisodeでgrasp / liftに成功していました。

主なbottleneckは、Stage 1が広いworkspaceでouter gateへ到達できないことでした。

特にpositive y方向が弱く、y=+4〜+5 cmのbinでは以下の結果になりました。

samples:
  51

outer gate:
  0 / 51

success:
  0 / 51

この領域ではepisode durationを延長しても、targetへ到達できませんでした。


Stage 0 Coarse Bias

Stage 1 policyは、もともと±1.5 cmのlocal capture rangeで学習されています。

そこで、Stage 1の前にdeterministicなStage 0を追加しました。

Stage 0の目的は、広いworkspace offsetのうち、Stage 1 local rangeを超える部分だけを取り除くことです。

bottle_offset
  ↓
local_offset 
  = clamp(bottle_offset, -0.015, +0.015)

coarse_translation 
  = bottle_offset - local_offset

Stage 0 bias = safe-pose Jacobian pseudoinverse × coarse_translation

実行順序は以下です。

Stage 0:
  60-step smooth coarse motion
  ↓
Stage 1:
  frozen local safe approach
  ↓
object-relative ingress / lift
  ↓
Stage 2

Stage 0はlearned policyではなく、safe pose周辺のmeasured local Jacobianを使用したgeometric controllerです。

選択した設定は以下です。

local capture half-range:
  0.015 m

coarse steps:
  60

correction bound:
  0.24 rad

Full ±5 cm Squareの結果

Stage 0を有効にしたfull x/y ±5 cm squareのformal evaluation結果は以下でした。

Seed 42

success:
  193 / 256
  75.39%

Seed 43

success:
  376 / 512
  73.44%

Combined

Outcome Count Rate
Success 569 / 768 74.09%
Unsafe 16 / 768 2.08%
Workspace 21 / 768 2.73%
Timeout 162 / 768 21.09%

Stage 0なしとの比較は以下です。

Metric Without Stage 0 With Stage 0
Outer gate reached 601 750
Stage 2 reached 583 737
Success 536 569

Stage 0によって、Stage 1 reach failureの大部分を改善できました。

一方で、Stage 2到達後のsuccess rateは約77.2%まで低下しました。

つまり、Stage 0で「到達できる」ようになった後、次のbottleneckは広域位置でのhandover geometryとStage 2 compatibilityへ移りました。


Positive-y領域のFailure Analysis

Full squareのtimeout 162件を分析すると、そのうち147件はStage 2まで到達していました。

成功episodeとtimeout episodeの初期位置平均は、以下の傾向を持っていました。

Outcome Mean x Mean y
Success -0.0014 m -0.0106 m
Timeout after Stage 2 +0.0088 m +0.0248 m
Workspace failure +0.0244 m +0.0093 m

Positive y側では、grasp geometryがStage 2のtraining distributionから外れやすいと考えました。

そこで以下を試しました。

  • global ingress gain
  • positive-y trim
  • pre-contact alignment

Global Gain 1.04

Fixed y=+5 cmでは、gain 1.04により成功する場合がありました。

しかし、paired wide evaluationでは悪化しました。

Gain Success
1.00 204 / 256
1.04 194 / 256

Fixed-pointで有効なparameterが、workspace全体でも有効とは限りません。

Positive-y Trim

First-episode-per-environmentによるpaired comparisonでは、trimによる安定した改善は得られませんでした。

Trim Success / 128
0 mm 97
1 mm 91
2 mm 96
3 mm 98

Unsafe disturbanceが増える条件もあったため、採用しませんでした。

Pre-contact Alignment

Hand centerとbottle centerのerrorを使った追加alignmentも試しました。

Fixed y=+5 cmでは一部のgainで成功しましたが、wide paired evaluationでは改善しませんでした。

alignment off:
  97 / 128

y-only gain 0.25:
  95 / 128

この結果から、fixed-point improvementをglobal correctionとして採用しないことにしました。


Symmetric SquareではなくPractical Workspaceを選ぶ

Full ±5 cm squareは、研究上の比較条件としては有効です。

しかし、positive yの端まで含めた完全な正方形にこだわる必要があるとは限りません。

Full-square evaluationのpost-hoc analysisでは、以下のworkspaceが比較的良い結果を示しました。

x:
  [-0.05, +0.05] m

y:
  [-0.05, +0.03] m

これは幅10 cm、奥行き8 cmの非対称workspaceです。

ただし、post-hoc maskだけではformal resultとは呼べません。

そこで、この範囲を明示的なrandomization distributionとして実装し、prospective evaluationを実施しました。


Practical Asymmetric Workspaceで84.4%

選択したworkspaceは以下です。

bottle x:
  [-0.05, +0.05] m

bottle y:
  [-0.05, +0.03] m

size:
  10 cm × 8 cm

Controller構成は以下です。

Stage 0:
  enabled

Stage 1:
  frozen model_149

ingress / lift:
  object-relative correction
  gain 1.0

Stage 2:
  frozen model_100

positive-y trim:
  disabled

pre-contact alignment:
  disabled

Formal evaluation結果は以下でした。

Seed 42

Outcome Result
Success 209 / 256
Success rate 81.64%
Unsafe 2
Workspace 3
Timeout 42

Seed 43

Outcome Result
Success 439 / 512
Success rate 85.74%
Unsafe 2
Workspace 11
Timeout 60

Combined

Outcome Count Rate
Success 648 / 768 84.375%
Unsafe 4 / 768 0.52%
Workspace 14 / 768 1.82%
Timeout 102 / 768 13.28%

Phase resultsは以下です。

Phase Count Rate
Outer gate reached 764 / 768 99.48%
Ingress started 764 / 768 99.48%
Stage 2 reached 763 / 768 99.35%
Success after Stage 2 648 / 763 84.93%

この結果により、当初の目標としていた80% integrated successを、明示的に定義したpractical workspaceで上回ることができました。


3種類のResultを分ける

今回の結果は、workspace条件によって分けて記録する必要があります。

Level Workspace Result
High-reliability local x/y ±1.5 cm 748 / 768、97.40%
Full symmetric square x/y ±5 cm 569 / 768、74.09%
Practical asymmetric x ±5 cm、y -5〜+3 cm 648 / 768、84.375%

これらは同じ結果ではありません。

  • ±1.5 cmは最も高信頼なlocal result
  • Full ±5 cm squareは80%未満のresearch result
  • 10 cm × 8 cmはprospective evaluationで80%を超えたpractical result

Full squareの弱い領域をpost-hocに除外しただけではなく、別のdistributionとして再評価したことが重要です。


なぜ追加PPOを行わなかったか

今回の改善では、Stage 1とStage 2のcheckpointを変更していません。

selected Stage 1:
  model_149

selected Stage 2:
  model_100

追加PPOを行わなかった理由は、主なfailureがpolicy capacity不足ではなく、以下にあったためです。

  • object-relative semanticsの不一致
  • local policyへのwide offset入力
  • Stage 1 reach range
  • Stage 2 training distributionとのhandover差
  • phase / timing implementation

PPOを続ければ、一部のfailureを吸収できる可能性はあります。

しかし、controllerのframe semanticsが間違った状態でtrainingを追加すると、policyにsystem designの不整合を学習させることになります。

今回のlarge improvementは、追加trainingではなくsystem integrationの修正によるものです。

frozen learned Stage 1
  + measured geometric correction
  + optional Stage 0
  + frozen learned Stage 2
  + supervisory hold

これはhybrid learned-plus-geometric control systemです。


DGX SparkへCheckpointを移行する

Simulation milestoneを確定した後、学習済みcheckpointをNVIDIA DGX Sparkへ移行しました。

目的は、DGX Spark上でIsaac SimやIsaac Labを動かすことではありません。

simulator:
  Isaac Lab環境で実行

DGX Spark:
  standalone actor inference
  robot state adapter
  safety supervisor
  logging
  future perception runtime

選択したcheckpointは以下です。

Stage 1

input:
  24D

network:
  24 → 128 → 64 → 4

activation:
  ELU

Stage 2

input:
  53D

network:
  53 → 256 → 128 → 64 → 12

activation:
  ELU

Checkpointからactor部分だけを取り出し、standalone PyTorch networkとして再構築しました。

このruntimeには以下が不要です。

  • Isaac Sim
  • Isaac Lab
  • Omniverse
  • ManagerBasedRLEnv
  • RSL-RL runtime

x86とARM64で推論結果を比較する

Checkpoint binaryがコピーできても、異なるarchitectureで同じ推論結果になるとは限りません。

そこで、Brev上のx86環境とDGX Spark上のARM64環境で、同じinput tensorに対するactor outputを比較しました。

比較には以下を使用しました。

  • zero observation
  • deterministic synthetic probe
  • actor mean output
  • tolerance 1e-6

結果は以下でした。

Actor Input Maximum absolute difference
Stage 1 Zero 2.98e-8
Stage 1 Probe 1.49e-8
Stage 2 Zero 2.98e-8
Stage 2 Probe 1.19e-7

すべて1e-6以内でした。

これにより、以下を確認できました。

  • checkpoint integrity
  • actor architecture reconstruction
  • layer order
  • activation function
  • deterministic inference
  • x86 / ARM64 numerical parity

ただし、このparityが証明するのは、同じtensorを入力した場合のactor outputが一致することだけです。

以下は証明していません。

  • real-world observation equivalence
  • real robot action mapping
  • real camera accuracy
  • real grasp success
  • real Jacobian validity

Real RuntimeではObservation Contractが重要になる

Standalone actorを動かすだけであれば、checkpointとnetwork architectureがあれば十分です。

しかし、policyを実際のrobot stateへ接続するには、observationの意味を完全に再現する必要があります。

Stage 1 Observation

Stage 1は24Dです。

Term Dimension
Right-arm absolute joint position 4
Right-arm joint velocity 4
Hand-center position 3
Hand-center linear velocity 3
Bottle position 3
Hand-center to outer-target vector 3
Previous raw action 4
Total 24

Stage 2 Observation

Stage 2は53Dです。

Term Dimension
Right-hand articulated joint position 12
Right-hand joint velocity 12
Hand-center position 3
Bottle position 3
Bottle quaternion wxyz 4
Bottle linear velocity 3
Bottle minus hand-center 3
Retention phase 1
Previous raw residual 12
Total 53

Observation dimensionが一致していても、以下が異なると互換性はありません。

  • term order
  • coordinate frame
  • quaternion order
  • unit
  • normalization
  • timing
  • previous action semantics

Checkpoint architectureと同様に、training時のobservation configをsource of truthとして扱う必要があります。


Inspire Handの6D Motor SpaceとSimulatorの12D表現を接続する

Simulationで使用しているright handは、12個のarticulated jointで表現されています。

一方、今回取得した実機RH56DFQ stateでは、right handを6次元のmotor-space stateとして扱っています。

公式DFQ URDFを確認したところ、12 articulated jointsのうち6 jointsにはmimic relationが定義されていました。

代表的な関係は以下です。

index intermediate
  = index proximal

middle intermediate
  = middle proximal

ring intermediate
  = ring proximal

pinky intermediate
  = pinky proximal

thumb intermediate
  = 1.6 × thumb proximal pitch

thumb distal
  = 2.4 × thumb proximal pitch

このmimic structureに基づき、6D motor-space stateをStage 2 policyへ入力可能な12D articulated representationへ展開し、Stage 2 outputを再び6D motor-space candidateへprojectするadapterを作成しました。

real motor-space q6
  ↓
initial motor-to-joint range model
  ↓
DFQ mimic expansion
  ↓
simulator-side 12D articulated representation
  ↓
Stage 2 actor
  ↓
unilateral target q12
  ↓
DFQ manifoldへのleast-squares projection
  ↓
bounded motor-space q6 candidate

採用した変換モデル内では、6D→12D→6Dのroundtrip error 0を確認しました。

ただし、このroundtrip resultが示すのは、adapterのforward / inverse equationが内部的に整合していることです。実機motor coordinateとURDF joint coordinateのrobot-specific calibrationが完了したことを意味するものではありません。

現時点では、motor order、command / state indexの対応、range、sign、zero offset、motor positionとURDF joint angleのscaleについて、追加の実機確認が必要です。

また、実機commandによる視覚的なhand motionは確認できましたが、commanded motor changeとrt/inspire/stateのexpected index responseには明確な比例関係を確認できていません。

したがって、本記事で使用している12D stateは、完全にcalibratedな実機joint angleではなく、公式DFQ mimic structureとinitial range modelに基づくsimulator-side articulated representationとして扱っています。

さらに、simulatorのSIDE_OPEN / CONTACT / SQUEEZE poseは、実機DFQのmimic manifold上に完全には存在しません。

そのため、Stage 2 targetをmotor spaceへ変換する際にはprojection errorを記録し、実機commandではclosing directionとmaximum deltaを明示的に制限しました。


実機ではNormal Standingから始める

Simulationのsafe poseと、G1のnative Normal standing poseは大きく異なっていました。

Official-model FKでhand centerを比較した結果、Normal standingからsimulator task-ready poseまでの距離は約51 cmでした。

hand-center translation:
  x approximately +0.35 m
  y approximately +0.15 m
  z approximately +0.34 m

total distance:
  approximately 0.51 m

これは小さなpolicy residualではありません。

そのため、実機ではStage 1の前にReal Stage -1を追加しました。

Real Stage -1:
  Normal standing
  → task-ready right-arm pose

Stage 1:
  local task approach

Simulation reset poseをそのまま実機へ送るのではなく、robotのnative controllerが実際に生成したright-arm poseをread-onlyで記録し、task-ready candidateとして使用しました。


Real Stage -1の段階的検証

Arm SDKのcontrol weightを一度に上げるのではなく、以下を段階的に確認しました。

  1. Current-state hold
  2. Low-weight bumpless takeover
  3. Small shoulder / elbow waypoint
  4. Full-weight fixed-anchor takeover
  5. Captured task-ready poseへのtransition
  6. Captured poseでのcontinuous hold
  7. Controlled return
  8. Normal controllerへのrelease

最初のexact-state holdでは、開始時に記録した固定poseをcommandし続けたため、native controllerの微小な姿勢調整と競合し、deviation thresholdを超えました。

次に、takeover中はlive stateへ追従し、低weightでcontrol ownershipを徐々に移すbumpless takeoverを試しました。

この方法では、frozen hold中のworst deviationが約0.00045 radとなり、安定したtakeoverを確認できました。

その後、full-weight takeoverでは、takeover直前に取得したright-arm poseをfixed anchorとして使用しました。

代表的な結果は以下でした。

Metric Result
Maximum weight 1.0
Worst velocity approximately 0.244 rad/s
Worst deviation approximately 0.024 rad
Final deviation approximately 0.017 rad
Result PASS

Measured-State Latchで発生したVelocity Spike

Task-ready poseへ到達した後、measured joint stateを新しいhold targetとして保存する方法を試しました。

しかし、commanded targetとactual measured poseの間には約0.07 radのtracking errorが残っていました。

Weightが1.0の状態でcommand targetをmeasured stateへ瞬間的に変更したため、right elbowにvelocity spikeが発生しました。

previous command:
  captured target

new command:
  measured state

command discontinuity:
  approximately 0.07 rad

observed elbow velocity:
  approximately 0.44 rad/s

結果としてsoftware safety gateが発動し、arm weightがreleaseされました。

修正後は、task-ready hold中に同じcaptured targetを継続してpublishする方式へ変更しました。

HOLD_TARGET_POLICY:
  CONTINUOUS_CAPTURED_TARGET

MEASURED_STATE_LATCH:
  DISABLED

この修正により、以下の一連のdry runが成功しました。

Normal standing
  ↓
captured task-ready pose
  ↓
continuous arm hold
  ↓
scripted empty-air hand close
  ↓
hand restore
  ↓
controlled arm return
  ↓
normal weight release

このfailureから、実機controlでは「現在値をtargetにすれば安全」とは限らないことが分かりました。

Control weightが高い状態では、targetを切り替えること自体がstep commandになります。


空ボトルを置いたOpen-Hand Proximity

次に、empty lightweight plastic bottleをmanual placementし、手を閉じずにtask-ready poseまで移動するproximity testを行いました。

条件は以下です。

bottle:
  empty lightweight plastic bottle

pose source:
  manual measurement

hand:
  open

hand command:
  none

contact:
  not intended

perception:
  not used

代表的な結果は以下でした。

Metric Result
Worst arm velocity approximately 0.313 rad/s
Worst tracking error approximately 0.085 rad
Proximity ready Yes
Hold completed Yes
Return to start Pass
Hard fault No
Soft fault No
Final arm error approximately 0.0010 rad

これは、manual nominal placementに対するopen-hand proximity resultです。

以下を意味するものではありません。

  • camera-based approach
  • contact grasp
  • object retention
  • object lift
  • autonomous manipulation

最初のModel-Derived実機Command

Stage 2 model outputは、まずshadow targetとして検証しました。

その後、no-object conditionで、最大0.02 normalized motor unitsに制限したclosing-only commandを実機handへ送信しました。

Stage 2 model:
  model_100

observation:
  live hand state
  + explicitly labeled nominal geometry

controlled coordinates:
  four fingers

thumb:
  held current

direction:
  closing only

maximum delta:
  0.02

object:
  none

生成されたbounded deltaは以下でした。

[-0.0141,
 -0.0200,
 -0.0200,
 -0.0200,
  0.0000,
  0.0000]

Command reader match、ramp、hold、restoreまで完了しました。

ただし、observed state changeは約0.001〜0.002であり、肉眼で明確に確認できるほどのfinger motionではありませんでした。

したがって、この結果は以下のように扱っています。

model inference:
  passed

DFQ projection:
  passed

bounded command publication:
  passed

restore:
  passed

effective grasp:
  not established

Command pathが通ったことと、実用的なgraspが成立することは別の結果です。


Real Stage -1とStage 2 Model Commandの統合

最後に、validated Real Stage -1 arm holdとbounded Stage 2 model-derived hand commandを同じsequenceで実行しました。

Normal standing
  ↓
captured Real Stage -1
  ↓
continuous captured-target hold
  ↓
bounded Stage 2 model hand command
  ↓
hand restore
  ↓
controlled arm return
  ↓
normal arm weight release

代表的な結果は以下でした。

Metric Result
Arm command reader Matched
Hand command reader Matched
Arm ready Yes
Stage 2 command completed Yes
Hand restore completed Yes
Return to start Pass
Hard fault No
Soft fault No
Final arm error approximately 0.0005 rad
Final hand restore error 0

これは、Stage 2 model-derived commandが実機へ送信された結果です。

一方で、Stage 1 actorはまだ実機armを直接制御していません。

Real Stage -1は、captured native poseを使ったreviewed scripted transitionです。


+3 cm Lift TargetのOffline設計

次の実機primitiveとして、captured task-ready poseからhand centerを垂直に3 cm上昇させるtargetをofflineで設計しました。

Official URDF、numerical Jacobian、damped least squares IKを使用し、right shoulder / elbowの4 jointsだけを補正しました。

Wrist jointはcaptured poseの値で固定しています。

desired translation:
  x 0
  y 0
  z +0.03 m

結果は以下でした。

Metric Result
Requested lift 0.030000 m
Actual lift 0.029994 m
Endpoint position error approximately 0.015 mm
Z error approximately 0.006 mm
Maximum XY drift approximately 0.014 mm
Jacobian rank 3
Condition number approximately 4.13
Maximum joint correction approximately 0.0633 rad
Predicted maximum velocity approximately 0.0162 rad/s
Joint limits Pass
Waypoint convergence Pass

主なjoint correctionはright elbowの約-0.0633 radでした。

この結果はoffline kinematic candidateです。

以下はまだ確認していません。

  • real actuator tracking
  • self-collision
  • support-rack clearance
  • table clearance
  • cable interference
  • object load

実機で使用する前に、まずno-object / open-hand conditionでdry testを行う必要があります。


今週遭遇した主なPitfall

1. Strong Modular PoliciesでもIntegrationは失敗する

Stage 1が768/768、Stage 2が766/768でも、最初のintegrated RandPosは428/768でした。

個別policyのsuccessは、handover state distributionの互換性を保証しません。

2. Coordinate Semanticsを途中で失わない

Stage 1がobject-relativeでも、後段のingressがnominal joint-spaceへ戻れば、system全体はobject-relativeではありません。

3. Local Jacobianを広範囲へ外挿しない

Local Jacobianは、そのpose周辺でのみ信頼できます。

±1.5 cmで有効だったcorrectionを、検証なしで±10 cmへ使用することはできません。

4. Fixed-Point ImprovementをGlobal Improvementと呼ばない

特定のy=+5 cm位置で成功したgainやalignmentが、wide paired evaluationでは悪化する場合がありました。

5. Same SeedだけではPaired Comparisonにならない

Auto-reset後のepisodeを含むbatch evaluationでは、同じseedでもepisode sequenceが一致しない場合があります。

True paired comparisonには、first episode per environmentなどの明示的な設計が必要です。

6. Exit Codeだけでは成功判定できない

Simulation applicationが終了code 0でも、tracebackやmissing completion markerがある場合があります。

Result marker、completion marker、JSON、episode countを合わせて確認する必要があります。

7. 実機でTargetを切り替えること自体がCommandになる

Weightが高い状態でmeasured stateへtargetを切り替えると、差分が小さくてもvelocity spikeを生むことがあります。

Continuous targetとcontrolled returnを明示的に設計する必要があります。


現在の到達点

Simulation結果は以下です。

Result level Workspace Success
Stage 1 modular x/y ±1.5 cm 768 / 768
Stage 2 modular Fixed nominal 766 / 768
Initial integrated baseline x/y ±1.5 cm 428 / 768
Object-relative corrected x/y ±1.5 cm 748 / 768
Full wide square x/y ±5 cm 569 / 768
Practical asymmetric x ±5 cm、y -5〜+3 cm 648 / 768

Deployment / hardware integrationは以下です。

Item Status
Checkpoint migration to DGX Spark Completed
x86 / ARM64 actor parity Passed
Standalone actor inference Passed
Real G1 state acquisition Passed
Real Inspire Hand state acquisition Passed
Official-model hand-center FK Passed
Real Stage -1 right-arm transition Passed
Scripted empty-air hand motion Passed
Manual bottle open-hand proximity Passed
First bounded Stage 2 real command Passed
Combined Stage -1 + Stage 2 dry run Passed
+3 cm lift target offline design Passed
Real no-object +3 cm lift Not yet tested
Real object grasp / lift Not yet tested

今後の予定

次の実機検証では、まずofflineで設計した+3 cm lift targetをno-object conditionで確認します。

Normal standing
  ↓
captured task-ready pose
  ↓
open-hand +3 cm lift
  ↓
captured task-ready pose
  ↓
Normal standing

このdry testが成立した場合、次にempty sealed lightweight plastic bottleを使用した最小把持・持ち上げを検討します。

manual central placement
  ↓
captured pregrasp
  ↓
bounded scripted closure
  ↓
short hold
  ↓
maximum +3 cm lift
  ↓
return bottle to table
  ↓
hand restore
  ↓
arm return

最初のobject liftでは、filled bottleや0.62 kg payloadを使用せず、空の軽量プラスチックボトルから段階的に確認します。


まとめ

前回の記事では、0.62 kg bottleに対するStage 1 Safe ApproachとStage 2 Grasp / Liftを個別に構築し、controlled ingressによって接続できることを確認しました。

今週は、learned Stage 2を統合し、nominal conditionでgrasp / lift / retentionまで動作させました。

その後、x/y ±1.5 cmのintegrated RandPos evaluationを行ったところ、最初のsuccess rateは55.73%でした。

原因はpolicy性能ではなく、Stage 1がobject-relativeである一方、ingressとliftがfixed nominal joint-space targetへ戻っていたことでした。

Measured local Jacobianを使用し、bottle offsetに応じてingressとliftの両方を補正した結果、追加PPOなしでsuccess rateは97.40%へ向上しました。

さらに、Stage 0 coarse biasによりworkspaceを拡張しました。

Full x/y ±5 cm squareでは74.09%でしたが、実用的な非対称workspaceであるx [-5,+5] cm、y [-5,+3] cmをprospective evaluationした結果、648/768、84.375%を達成しました。

Simulation milestone確定後、checkpointをDGX Sparkへ移行し、Brev x86とDGX Spark ARM64のdeterministic actor outputが1e-6以内で一致することを確認しました。

実機では、official-model FK、Normal standingからtask-ready poseへのReal Stage -1、continuous arm hold、scripted empty-air grasp、manual bottle proximity、最初のbounded Stage 2 model-derived commandまで段階的に確認しました。

ただし、実機でのobject grasp / liftはまだ実施していません。

現時点での到達点は、以下です。

Object-relative geometric correctionとfrozen PPO policyを組み合わせ、bounded randomized workspaceで84.375%のformal integrated successを達成した。さらに、checkpointをDGX Sparkへ移行し、実機G1上でtask-ready transitionと最初のbounded Stage 2 model-derived hand commandまで確認した。

今回の結果は、pure end-to-end RLではなく、learned policyとgeometric controller、supervisory controlを組み合わせたhybrid systemです。

今後は、offlineで設計した+3 cm lift targetを無物体で検証した後、軽量な空ボトルを使用した固定立位・監視下の最小pick-and-liftへ進む予定です。

Simulationの高いsuccess rateをそのまま実機性能とみなさず、observation semantics、action mapping、contact condition、安全なreturn behaviorを一つずつ確認しながら進めます。

この記事をシェアする

関連記事