Skip to content
Robotics.world

Research

PAC-MAN: Perception-Aware CBF-RL for Whole-Body Safety in Humanoid Dodgeball

A humanoid robot facing an incoming thrown ball must see the threat, move every threatened body part out of the way, and stay upright — all within a fraction of a second, and using only sensors it…

The paper’s first page · arXiv:2607.28623
arXiv
2607.28623 · Preprint · not peer-reviewed
Published
2026-07-30 · revised · 2026-09-29
Authors
Lizhi Yang, Junheng Li, Aaron D. Ames

In plain words

A humanoid robot facing an incoming thrown ball must see the threat, move every threatened body part out of the way, and stay upright — all within a fraction of a second, and using only sensors it actually carries. Control barrier functions can express whole-body collision safety mathematically, but they normally assume accurate knowledge of where the ball is, which onboard cameras rarely provide.

AI summary

Overview

Research area: Legged/humanoid robotics — safety-critical reinforcement learning, control barrier functions (CBFs), and onboard perception for whole-body reactive motion.

Technical level: Intermediate to Advanced. The core ideas are accessible, but the method assumes familiarity with reinforcement learning, control barrier functions, and sim-to-real transfer.

Scope: The paper presents PAC-MAN, a perception-aware CBF-RL framework that trains a humanoid to dodge thrown balls using only onboard depth and proprioception, and studies how much safety structure a policy can internalize given the quality of its perception.

What This Paper Is About

A humanoid robot facing an incoming thrown ball must see the threat, move every threatened body part out of the way, and stay upright — all within a fraction of a second, and using only sensors it actually carries. Control barrier functions can express whole-body collision safety mathematically, but they normally assume accurate knowledge of where the ball is, which onboard cameras rarely provide. The paper asks how the strength of the safety mechanism must be matched to the information the robot's perception can supply, and tests the answer by deploying a policy on a real Unitree G1.

Key Contributions

  1. A perception-aware CBF-RL framework for whole-body humanoid reaction. It pairs deployment-realistic observations (segmentation-masked depth from a head-mounted camera plus proprioception) with two levels of barrier structure over every body link: Link-CBF, a lightweight per-link clearance reward used only in training, and Joint-CBF, a stronger joint-space projection that can either shape training or remain active at test time as a privileged runtime filter.

  2. An any-link contact benchmark with matched perception and safety variants. The evaluation scores success only if the ball touches no body link and the robot does not fall, across a state oracle, a fixed camera, and an oracle-aimed active gimbal, in both a reset regime and a deployment loop where the robot walks back to its station between throws.

  3. Evidence that the right barrier depends on observability. Joint-CBF benefits from accurate ball state and oracle-aimed tracking, degrades when used only as training guidance under a fixed camera, and recovers with a gimbal or a privileged runtime filter; Link-CBF stays effective with a fixed camera and no runtime filter.

  4. Zero-shot hardware deployment. The fixed-camera Link-CBF policy runs on the Unitree G1 using only onboard depth and proprioception, dodging 19 of 20 throws (95%), with semantic segmentation letting the same policy evade different balls (a soccer ball and a foam ball are shown).

Main Findings

  • Onboard sensing costs only a few points. Trained with the same Link-CBF reward, the fixed-camera policy reaches 90% success in the reset regime and 89% in the deployment regime, on par with the state oracle's 88% and 93% under the same reward, despite seeing the ball only as conservative masked depth.

  • The privileged oracle sets a nearby ceiling. The oracle's best configurations reach 96% to 99%, fewer than ten points above the deployed policy. A static frozen-statue robot survives only 4% of throws, which sets the on-target floor.

  • The runtime filter is the strongest mode at every perception level. The +filter column is best in every row of the results table: 99% (state oracle, reset), 97% (fixed camera, reset), 97% (gimbal, reset), 98% (oracle, deployment), 90% (fixed camera, deployment), 95% (gimbal, deployment). This mode reads ground-truth ball states, which the onboard vision stack does not provide.

  • Without a runtime filter the ranking flips. On the fixed camera, Link-CBF is best in both regimes (90% reset, 89% deployment), above the no-barrier baseline (86% in both) and well above bare Joint-CBF, which drops to 76% in the deployment regime.

  • Joint-CBF's failure is attributed to perception. Keeping the joint-space CBF as an online filter lifts the fixed camera to 90%–97%; giving the policy a better view works too, with the oracle-aimed gimbal raising Joint-CBF deployment success from 76% to 90%.

  • Fall rates are zero throughout the simulation comparison table, so the differences are about contact avoidance rather than balance failure.

  • Hardware transfer works. Against 20 hand-thrown balls, the deployed policy dodged 19 (95%), with 1 hit and 0 falls. The one hit occurred on throw 4; the other throws cleared the per-link keep-out shell by 0.05 to 1.7 m.

  • A matched comparison to prior work. Against SMP under an omnidirectional throw distribution (360°, 8–10 m, 12–15 m/s in the codebase) with oracle observations, PAC-MAN scores 98% in the reset regime, in line with the roughly 99% reported there.

  • Barrier structure can only be internalized as far as perception allows. The authors frame this as the central design implication: match the strength of the safety structure to the available information.

Methodology in Plain English

The robot is trained in simulation to map a small, ball-only depth image plus its own joint and body readings to 29 joint-position targets, tracked by PD actuators at 50 Hz. During training only, the simulator knows exactly where the ball is and where every robot link is, so it can compute how close the ball is to each body part and turn violations into a reward penalty — this is the barrier guidance. Two versions are studied: a light per-link clearance penalty (Link-CBF) and a stronger whole-body constraint that projects the desired joint velocity onto a safe half-space (Joint-CBF). A third option keeps that projection running at test time as a filter, which requires accurate ball states.

To make the evasions look like real dodges rather than arbitrary flailing, an adversarial motion prior compares the policy's motion to a reference set of human clips — crouching, leaning, sidestepping, leaping, standing — totaling 1 minute and 43 seconds retargeted to the Unitree G1.

Perception is deliberately restricted to what hardware can provide. In simulation, the ball is segmented, all other pixels are pushed to the far plane, and the image is pooled to 16×9, then stacked at sparse temporal offsets (the last frames 0, 3, 8, and 18 at 50 Hz) so the policy can sense looming and lateral motion. Training randomizes this feed with dropouts and jitter to mimic real perception failures. Two perception upgrades are tested: a fixed head camera (102° horizontal and 57° vertical field of view, tilted 20° up) and a 1-DoF pitch gimbal (±30°, nominal 0°) driven by an oracle that points it at the ball.

Training uses PPO with the AMP discriminator from rsl_rl, 8192 parallel environments, and 20k iterations in mjlab. On the physical robot, a head-mounted ZED Mini supplies depth, and an EfficientTAM tracker initialized from a clicked foreground point segments the ball in RGB at about 60 Hz — above the 50 Hz control rate. Filters reject implausible masks and suppress non-closing clusters, and if the track is lost the policy receives an all-far frame rather than a false threat.

Why This Matters

The paper reframes safety-layer design as a joint problem with perception rather than a separate module bolted onto a controller. It distinguishes internalizing barrier structure inside a learned policy — limited by what the policy can infer — from enforcing a barrier online, which requires accurate threat state at runtime. That distinction is directly useful for anyone deciding whether to ship a runtime safety filter on a real robot.

Real-world applications:

  • Humanoid robots sharing space with moving objects and people, where transient hazards arrive with sub-second warning and whole-body, not just base, avoidance matters.
  • Warehouse and collaborative industrial cells, where unexpected flying or falling items must be evaded without losing balance.
  • Sports and entertainment robotics, including ball interception, keeping, and striking tasks where sub-second ball prediction is already a studied problem.
  • Inspection and service robots in cluttered, dynamic environments, where a single egocentric depth camera is the only exteroception available.

Industry relevance: the work gives a concrete recipe for choosing between reward-shaping-only safety and runtime filtering based on sensor quality, and demonstrates zero-shot transfer from simulation to a commercially available humanoid using onboard sensing alone — a practical bar for deployment. The authors state they will release the benchmark and training pipeline.

Future Directions

  • Closing the perception-to-CBF loop. The oracle-aimed gimbal is a simulation ceiling; driving a physical gimbal from the existing segmentation track, or building an accurate online ball-state estimator, would make the stronger Joint-CBF runtime filter deployable.

  • Making Joint-CBF work without privileged state. Since Joint-CBF only succeeded with a gimbal or ground-truth ball states, a natural question is what observation quality is sufficient to internalize it as reward guidance alone.

  • Dodging while walking. The current task recovers to a stance between throws; extending to evasion during locomotion removes the recovery window the benchmark relies on.

  • Generalizing the segmentation front end. The tracker can be initialized on any object of interest, which opens the question of how far the same policy transfers across object shapes, sizes, and speeds beyond the two balls shown.

Target Audience

Robotics researchers and graduate students working on safety-critical learning, control barrier functions, humanoid whole-body control, and sim-to-real transfer. It is also valuable to practitioners deciding between reward-shaped safety and runtime safety filters for a deployed legged or humanoid platform, and to readers interested in how perception quality constrains what a learned policy can be made safe against.

Authors’ abstract

We present PAC-MAN, a perception-aware CBF-RL framework that couples control-barrier safety with deployment-realistic onboard sensing for whole-body humanoid dodgeball. The deployed policy sees the ball only as segmentation-masked depth from a head-mounted camera, while training-time CBF guidance represents clearance to every body link, and an adversarial motion prior regularizes the resulting evasive reflexes. We evaluate on a controlled any-link contact benchmark with…

The full abstract on arXiv
Read the original paper

Related papers