{
  "id": "unitree_h1_walk",
  "name": "Unitree H1 velocity walking",
  "robotId": "unitree/h1",
  "model": "unitree_h1_10dof",
  "task": "Velocity tracking on flat ground (forward, lateral, yaw rate)",
  "license": "BSD-3-Clause",
  "licenseUrl": "https://github.com/unitreerobotics/unitree_rl_gym/blob/276801e46c5d433564f24658bac64f254b7d2d4b/LICENSE",
  "source": {
    "repo": "https://github.com/unitreerobotics/unitree_rl_gym",
    "ref": "276801e46c5d433564f24658bac64f254b7d2d4b",
    "checkpoint": "deploy/pre_train/h1/motion.pt",
    "checkpointSha256": "44a0fbceb81f3877833ae9a398d039bea1759cb0d3c8188181013885f70589eb",
    "reference": "deploy/deploy_mujoco/deploy_mujoco.py",
    "config": "deploy/deploy_mujoco/configs/h1.yaml",
    "trainConfig": "legged_gym/envs/h1/h1_config.py",
    "framework": "legged_gym (Isaac Gym) + rsl_rl PPO, ActorCriticRecurrent (LSTM 64, MLP 32, ELU)"
  },
  "export": {
    "from": "TorchScript PolicyExporterLSTM (hidden/cell state kept as module buffers)",
    "to": "ONNX opset 17 with the LSTM state as explicit inputs/outputs; weights copied unchanged",
    "sha256": "7312dae2c0ed88169e9568870830943052b0b90dc7a6375bc28d4ee9e4ef4bcf",
    "parity": "max |a_torch - a_onnx| < 5e-6 over 200 stateful random steps (onnxruntime 1.x CPU)"
  },
  "hardware": {
    "documented": true,
    "note": "unitree_rl_gym's deploy_real config for Unitree H1 loads this same checkpoint (h1.yaml policy_path) and the deploy guide shows it on the physical robot.",
    "url": "https://github.com/unitreerobotics/unitree_rl_gym/blob/276801e46c5d433564f24658bac64f254b7d2d4b/deploy/deploy_real/README.md"
  },
  "onnx": {
    "file": "policy.onnx",
    "obs": "obs",
    "action": "actions",
    "recurrent": {
      "inputs": [
        "h_in",
        "c_in"
      ],
      "outputs": [
        "h_out",
        "c_out"
      ],
      "shape": [
        1,
        1,
        64
      ]
    }
  },
  "sim": {
    "dt": 0.002,
    "decimation": 10,
    "loop": "after-step",
    "init": "qpos0"
  },
  "joints": [
    "left_hip_yaw_joint",
    "left_hip_roll_joint",
    "left_hip_pitch_joint",
    "left_knee_joint",
    "left_ankle_joint",
    "right_hip_yaw_joint",
    "right_hip_roll_joint",
    "right_hip_pitch_joint",
    "right_knee_joint",
    "right_ankle_joint"
  ],
  "pd": {
    "kp": [
      150,
      150,
      150,
      200,
      40,
      150,
      150,
      150,
      200,
      40
    ],
    "kd": [
      2,
      2,
      2,
      4,
      2,
      2,
      2,
      2,
      4,
      2
    ],
    "targetVel": 0,
    "output": "motor-ctrl"
  },
  "defaultAngles": [
    0,
    0,
    -0.1,
    0.3,
    -0.2,
    0,
    0,
    -0.1,
    0.3,
    -0.2
  ],
  "actionScale": 0.25,
  "obs": [
    {
      "term": "base_ang_vel",
      "scale": 0.25,
      "size": 3
    },
    {
      "term": "projected_gravity",
      "size": 3
    },
    {
      "term": "command",
      "scale": [
        2.0,
        2.0,
        0.25
      ],
      "size": 3
    },
    {
      "term": "joint_pos_rel",
      "scale": 1.0,
      "size": 10
    },
    {
      "term": "joint_vel",
      "scale": 0.05,
      "size": 10
    },
    {
      "term": "last_action",
      "size": 10
    },
    {
      "term": "gait_phase",
      "period": 0.8,
      "size": 2
    }
  ],
  "obsSize": 41,
  "commands": {
    "init": [
      0.5,
      0.0,
      0.0
    ],
    "trained": {
      "vx": [
        -1.0,
        1.0
      ],
      "vy": [
        -1.0,
        1.0
      ],
      "wz": [
        -1.0,
        1.0
      ]
    },
    "ui": {
      "vx": [
        -0.6,
        1.0
      ],
      "vy": [
        -0.5,
        0.5
      ],
      "wz": [
        -0.8,
        0.8
      ]
    }
  },
  "notes": [
    "The reference script runs PD on every 2 ms physics step: tau = kp*(target - q) - kd*qdot, written straight to the motor ctrl; MuJoCo clamps it to each joint's actuatorfrcrange.",
    "The policy runs after every 10th step on the post-step state (50 Hz). gait phase = (steps*dt mod 0.8)/0.8, steps counted from reset.",
    "Base angular velocity is qvel[3:6] of the free joint (body frame). Projected gravity uses the reference formula on qpos[3:7] (w,x,y,z).",
    "Training used heading mode (yaw-rate command recomputed from heading error); the policy input is still (vx, vy, yaw rate).",
    "Replay check: this runtime (MuJoCo WASM + onnxruntime-web in Node) and the reference script (MuJoCo 3.14 Python + TorchScript) give the same base trajectory to the centimetre over 30 s at [0.5, 0, 0] (x 13.80 m, y -0.21 m)."
  ]
}
