I trained ROLF on an Apple Silicon Mac. The easiest way to run it is with uv.
git clone https://github.com/JamelHammoud/rolf.git
cd rolf
uv run rolfYou can press R to reset and randomize the ball & robot position.
If you get the robot to stay on its feet across putts, tell me!
The policy was trained with PPO from Stable-Baselines3, using MuJoCo on CPU. It runs at 50 Hz and adds small corrections to a fixed Unitree balance policy. Each step reads the robot pose, club, ball, cup, contacts, feet, and balance state, then controls 29 body joints and both hands.
Training rewarded the result of the putt, including a clean strike, useful ball speed, distance to the cup, grip, planted feet, and balance. The robot was never given a recorded swing to copy. Ball position, stance, club and ball mass, rolling friction, and grip friction were randomized during training.
unitree_rl_mjlab and Unitree's G1 URDF were used as well.
The policy at seed 0 can sink the putt while keeping balance!
Most other random seeds aren't as successful :(
ROLF is simulation-only and hasn't been tested with a real robot... yet.