Humanoid Golf

Taking a Unitree G1 to the Stanford Driving Range

We taught a Unitree G1 humanoid to play golf. The G1 is 1.32 m tall the perfect fit for a 5-8 year old kids’ 7-iron. The swings were fully learned in simulation and deployed onto hardware.

Training the policies

Creating the reference swing We tried a lot of different options for creating target motion, including using mocap data, human video to motion, and even training from Rory Mcilroy swing. Eventually we designed swings from scratch. The embodiement gap from humans to humanoid robot at these high speeds was too difficult for any existing retargetting software.

Learning to follow it. We trained our policy from the reference using RL (PPO) in mjlab. Our reward function specifies following the reference, hitting the ball in the centre of the face with the face square, clubhead speed, and not falling or shuffling the feet.

A field of 1,024 simulated G1 robots, each mid-swing with a golf club
Many copies of the policy train.

We first testing the policy without any club.

Oct 12: bare-hand air swings, three face-on and one from the side.

Our first real swing. Here we show a video from our very first full swing in lab. However we needed to add additional domain randomization in the club interia properties to prevent the robot from tipping over.

Our first swing
Four plots comparing the robot and simulation for the swing: centre of mass, foot tilt, lead arm joints and lead wrist torque
The same swing, robot against simulation: the centre of mass drifts behind the heels after impact (top left), and the lead arm is the first thing to diverge (bottom left).

Taking the humanoid to the range

4× slow motion. Click is the real impact sound

Behind the scenes

Not every swing was successful

A whiff, a swing at an empty tee, a ball that rolled off the tee (and got hit anyway), a tip-over at address, a clean hit followed by a fall, and the team checking in. “We’re good.”

Acknowledgements

Thanks to Daniel Morton and Pranit Mohnot of the Stanford Autonomous Systems Lab for helping us run the tests.