Skip to main content
Back

Tsinghua's LATENT Teaches a Humanoid Robot to Rally Tennis at 96.5% Accuracy

A Unitree G1 humanoid learns competitive tennis rallies from just five hours of primitive motion clips, not full match capture, and transfers to reality.

Pro

  • LATENT trains a Unitree G1 to play tennis using only 5 hours of primitive motion clips in a 3x5m capture area.
  • Hierarchical pipeline: motion tracker, distilled latent skill space with learned state-conditioned prior, then RL high-level planner.
  • Key idea Latent Action Barrier constrains RL exploration using Mahalanobis distance around the prior mean.
  • Hits 96.5% forehand success in sim and 90.9% forehand success in real-world rallies against humans.
  • Beats AMP, ASE, PULSE and MotionVAE; PPO and MotionVAE fail to converge on the task.
  • Code available at GalaxyGeneralRobotics/LATENT; project page here.

Teaching a humanoid robot to play tennis sounds like a party trick, but the constraints hidden inside it are brutal. Balls travel between 15 and 30 meters per second, the racket touches the ball for only a few milliseconds, and a player has to sprint across a court at 6 m/s while still keeping balance. A team from Tsinghua, Peking University, Galbot, Shanghai Qi Zhi Institute, and Shanghai AI Lab has now pushed a Unitree G1 through that gauntlet with a system called LATENT, which stands for Learning Athletic humanoid TEnnis skills from imperfect human motioN daTa.

The headline result: the robot can sustain multi-shot rallies against real human opponents, hitting forehands and backhands, and covering both forecourt and backcourt in the real world. In simulation, the policy hits an incoming ball to within 2.5 meters of a target location 96.5% of the time on forehand and 82.1% on backhand. That is more than 20 points above the strongest prior baseline the authors tested.

Why tennis broke the usual robot learning recipe

Most humanoid skill learning today leans on one of two data sources: teleoperation, where a human puppeteers the robot, or full motion capture of a person performing the target activity. Tennis blocks both. You cannot teleoperate a robot fast enough to return a serve, and capturing a real match cleanly is a nightmare because the action spans a full court, lasts many rallies, and depends on wrist motions that are too small and fast for most rigs to record precisely.

A prior approach, Vid2Player3D, pulled kinematic data from broadcast videos, but it needed a chain of pose estimators plus unrealistic physics like unlimited joint torque and residual root forces to stay upright. Those tricks make simulation look nice but do not survive contact with real hardware.

LATENT sidesteps the whole problem by admitting the data will be imperfect. Five amateur players were recorded performing isolated primitives - forehand, backhand, lateral shuffle, crossover step - inside a compact 3m x 5m capture volume, which is roughly 17 times smaller than a real court. Five hours were collected with no manual editing or labeling, then retargeted to the Unitree G1 with Loco-MuJoCo. The insight is that the fragments contain enough prior about how humans move to bootstrap the athletic behavior, even though they never show a full point being played.

Grid of close-up images showing the Unitree G1 humanoid performing forehand, backhand, footwork and serves during real-world rallies

Three stages, and two ideas that matter

The pipeline is hierarchical and runs in three stages:

  1. Motion tracker pretraining. A PPO policy learns to imitate the retargeted primitives inside MuJoCo. Crucially, the tracker is trained without control signals for the right (racket-holding) wrist and with random perturbations applied to that joint, so it stays stable when a higher-level controller later injects its own wrist commands.
  2. Latent action space via online distillation. The tracker is distilled into an encoder-decoder with a variational information bottleneck, similar in spirit to PULSE. Instead of matching a fixed Gaussian prior, LATENT learns a state-conditioned prior so the distribution of plausible actions can shift between, say, sprinting and swinging.
  3. High-level policy learning. A planner conditioned on robot state, root pose, and ball state outputs two things at once: a latent action for the whole body, plus a direct wrist correction. The latent gets decoded through the frozen skill decoder into low-level joint targets.

Two design choices carry most of the weight. The first is hybrid action correction. Because motion capture cannot record the exact wrist angle at ball contact, and retargeting adds more error, the planner is allowed to bypass the latent space for the racket wrist and command it directly. The lower body stays inside the natural motion manifold; the wrist gets to do whatever it needs to.

The second is the Latent Action Barrier (LAB). Without a constraint, the RL policy tends to exploit the latent space by hopping between primitives frame to frame, which technically completes the task but produces jittery, unnatural motion. LAB forces the residual latent action to stay within a Mahalanobis-distance ball around the learned prior mean, scaled by the prior's per-dimension standard deviation. In code terms, the decoded action ends up looking like this:

mu, sigma = prior(state)            # state-conditioned prior
residual = tanh(planner_latent)     # bounded exploration
z = mu + lambda_scale * sigma * residual
action_body = decoder(state, z)
action_full = concat(action_body, wrist_correction)
Polar plots comparing exploration behavior of PPO, Residual Prior, AMP and LAB in the latent skill manifold

How it compares to the usual suspects

The authors ran head-to-head experiments against vanilla PPO, MotionVAE (the Vid2Player3D approach), AMP, ASE, and PULSE, averaged over 10,000 trials in MuJoCo.

MethodForehand SRBackhand SRDistance Error (forehand)
PPOfails to convergefails to convergeN/A
MotionVAEfails to convergefails to convergeN/A
AMP41.3%36.8%4.71 m
ASE63.5%55.2%3.62 m
PULSE71.9%63.4%3.01 m
LATENT96.5%82.1%1.32 m

PPO from scratch and the MotionVAE pipeline never converged, mirroring the accumulated-error problem where a shaky motion generator feeds a tracker that then falls over. Ablations show both key ideas earn their keep: removing wrist correction drops forehand success rate to 82%, and removing the Latent Action Barrier keeps success rate high but doubles the joint smoothness cost, meaning the robot succeeds while flailing.

The sim-to-real bill

Getting a policy off the simulator and onto real hardware for a task this dynamic is where most tennis-robot demos quietly die. LATENT relies on aggressive domain randomization on both robot and ball dynamics - friction, armature, body and racket mass, center of mass, ball-ground restitution, tangential damping, and an air-drag coefficient sampled from a uniform range. On the perception side, the ball position is smoothed across a four-frame sliding window before velocity is estimated with finite differences, because even small position noise wrecks velocity estimates at 20+ m/s.

The real-world numbers hold up. Across 20 consecutive human-robot rallies, LATENT succeeds 90.9% of the time on forehand and 77.8% on backhand, versus 16.7% and 25.0% without dynamics randomization. In robot-robot self-play in simulation, two copies of the policy can trade up to 25 consecutive shots.

The catch is the hardware setup. Real-world deployment used more than 50 motion capture cameras at 2048x2048 and 120 Hz over a 19x15 meter capture area, with reflective tape on the ball itself acting as a passive marker. According to the repo, the three-week experiment period cost roughly 50,000 USD in motion capture rental. This is not something you reproduce in a garage yet, and the authors flag on-board vision as the obvious next step.

What is actually released

The official implementation is on GitHub under the GalaxyGeneralRobotics organization. As of the initial release, it includes:

  • The motion tracking codebase, built on JAX, Brax, and MuJoCo Playground, with multi-GPU support.
  • A subset of the retargeted human tennis motion data, plus a preprocessing pipeline that aligns capture frequency to 50 Hz and can synthesize a smooth transition step from the default pose to the first motion frame using QP-based inverse kinematics.
  • Training and evaluation scripts for the tennis tracker, with and without domain randomization, and a Brax-to-ONNX converter for deployment.

Still on the roadmap: the full tennis motion dataset, pretrained trackers, the DAgger online distillation code, the pretrained latent action model, the high-level tennis policy training code, and the sim-to-real scripts. So the pieces you can run today are the foundation of the pipeline, not yet the end-to-end tennis-playing agent.

Where this is actually useful

The immediate contribution is tennis, but the framing generalizes. Any task where you can capture short, clean fragments of a skill but cannot easily record the full task - soccer footwork, parkour, martial arts, dance - runs into the same imperfect-data problem. The Latent Action Barrier gives a concrete recipe for using those fragments as a soft prior without letting a reward-hungry RL policy warp them into unnatural motion, and the wrist-correction pattern shows how to keep a policy locked to the human manifold except where precision demands otherwise.

The clear limits: the current task is returning randomly launched balls to targets, not playing points with strategy, and the deployment still needs external mocap. Bridging both gaps, with onboard vision and multi-agent self-play, is where this line of work has to go if humanoid athletes are going to leave the lab.