Sim-to-Real Transfer on the Unitree G1: Domain Randomization & Dynamic Push Recovery

Deploying reinforcement learning (RL) policies directly onto a physical humanoid biped platform like the Unitree G1 is notoriously prone to the reality gap. In simulation, contact physics are idealized, actuator dynamics are instantaneous, and sensor readings have minimal covariance noise. On real hardware, motor thermal states shift internal winding resistance, bus latencies fluctuate over CAN/Ethernet, and physical foot-ground impacts produce high-frequency vibrations that degrade IMU state estimates.

Here is how we closed that gap at FEV India to achieve reliable zero-shot dynamic walking and balance stabilization on physical hardware.


1. Domain Randomization Strategy

Rather than attempting to model physical hardware down to the sub-millimeter, we envelope real-world parameter variance during parallelized training in physics simulators (such as NVIDIA Isaac Sim / Isaac Lab):

  • Ground Friction Coefficient: Uniformly sampled across $[0.3, 1.25]$ to simulate slick epoxy factory flooring, carpet, and rough concrete.
  • Payload & Center of Mass (CoM): Base mass randomized by $\pm 2.5\text{ kg}$ and CoM position displaced by up to $\pm 35\text{ mm}$ along the longitudinal and lateral axes.
  • Actuator Latency: Injected variable transport delays between $10\text{ ms}$ and $35\text{ ms}$ into the policy action execution queue to mirror physical bus queuing.
  • Joint Damping & Stiffness: Joint stiffness ($K_p$) and damping ($K_d$) randomized by $\pm 15\%$ around nominal gains to prevent policies from overfitting to razor-sharp PD controller responses.
  • python
    # Domain Randomization configuration excerpt randomization_params = { 'static_friction': ('uniform', 0.35, 1.2), 'base_mass_offset': ('uniform', -2.0, 2.5), # kg 'action_delay_steps': ('randint', 1, 4), # 20ms steps 'joint_friction': ('uniform', 0.85, 1.15), 'push_velocity_magnitude': ('uniform', 0.2, 0.8) # m/s impulse }

    2. Multi-Tiered Safety Architecture

    A runaway policy on a quadruped might result in a rolled chassis; on a 35kg bipedal humanoid, an uncontrolled joint snap can destroy planetary reduction gears or crack knee links. We enforce a hardware-level safety interceptor between the neural policy and joint drivers:

  • 1.Kinematic Workspace Boundaries: Software limit envelopes preventing joint self-collisions between thighs, calves, and the Inspire dexterous hand.
  • 2.Dynamic Torque Clamps: Instantaneous motor current monitoring that shuts down joint power if torque demand exceeds $85\%$ of peak rated capacity for more than $20\text{ ms}$.
  • 3.IMU Divergence Watchdog: If pitch or roll exceeds $28^\circ$ from vertical, the controller automatically triggers a compliant squat-and-catch safe fall reflex.

  • 3. Results on Physical Hardware

    Across over 40 physical push-recovery trials:

  • Lateral Impulse Rejection: The G1 successfully recovered balance from lateral pushes up to $0.6\text{ m/s}$ without triggering emergency falls.
  • Terrain Transition: Clean transition from polished vinyl flooring onto $15\text{ mm}$ textured obstacles without re-tuning gain matrices.
  • The key takeaway: A policy that anticipates physical imperfection in simulation is the only policy that survives on real hardware.