Sohaib Kaidali

← All work  ·  McGill Mobile Robotics Lab

Can one neural network walk five different robots?

Yes. One policy drives five two-legged robots with 12 to 31 joints. My part was the shared network design for bipeds, adding the Unitree H2, and fixing the ways it learned to cheat.

My role
Contributor to the lab's Hetero-IsaacLab code: biped environment and H2 integration
When
2026
Stack
Isaac Lab, RSL-RL (PPO), PyTorch
Code
GitHub
Cassie, Digit, G1, H1 and H2 in the same simulation, all driven by the same network. Arrows show commanded and actual velocity.

The problem

A walking policy is normally trained for one robot. Change the robot and you start over. If one network could walk many bodies, a new robot could start from what the others already know.

The difficulty is that the bodies don't match. Cassie has 12 motors and no arms. The H2 has 31. A network has a fixed number of inputs and outputs.

What I built

One layout that fits every robot

I mapped every robot's joints onto one shared list ("left knee" means the same slot on all of them). A robot that lacks a joint leaves its slot empty. A masked network (MaskedMLP) ignores empty inputs and blocks learning signals from empty outputs, so a robot without arms doesn't teach the network anything wrong about arms.

Adding the H2

The H2 is the newest and largest robot in the set. Its first training runs failed in three ways:

Motor gains from physics, not from guessing

Each joint has a stiffness and damping setting. Instead of hand-tuning 31 pairs, I computed them from each motor's inertia, with a target response speed and damping, inside the limits the real motor can deliver. With that and a symmetry reward, the difference between left and right steps fell from 17.5% to 4.0%.

A crash that only showed up after hours

Training occasionally died with NaN values. The cause was an angle computed with arccos, whose slope is infinite when two orientations are identical. I replaced it with a distance that has no such point.

The H2 on rough terrain after the fixes.

Results

MeasureBeforeAfter
Left/right step difference (H2)17.5%4.0%
Forward lean (H2)62°upright
False "fell over" resets per training iteration~450
Robots on one policy45

What I learned

This walking work is what the pole-balancing project was built on.

← Pole on a walking humanoidUnderwater robot →