SafeFlow: Real-Time Text-Driven Humanoid Whole-Body Control via Physics-Guided Rectified Flow and Selective Safety Gating

arXiv cs.RO / 3/26/2026

💬 OpinionSignals & Early TrendsIdeas & Deep AnalysisModels & Research

Key Points

  • The paper introduces SafeFlow, a text-driven humanoid whole-body control framework designed to avoid physically infeasible or unsafe motions that often occur with kinematics-only generators.
  • SafeFlow uses Physics-Guided Rectified Flow Matching in a VAE latent space to improve real-robot executability and applies Reflow to reduce sampling compute for real-time control.
  • A three-stage Safety Gate selectively blocks risky outputs by detecting semantic out-of-distribution prompts via a Mahalanobis score in text-embedding space, filtering unstable generations using a directional sensitivity discrepancy metric, and enforcing hard joint/velocity kinematic constraints.
  • Experiments on the Unitree G1 claim higher success rate, better physical compliance, and faster inference than diffusion-based prior approaches while preserving diverse motion expressiveness.
  • The work targets robustness to out-of-distribution user inputs by integrating explicit physics-aware objectives and layered safety checks before trajectories reach a low-level motion tracking controller.

Abstract

Recent advances in real-time interactive text-driven motion generation have enabled humanoids to perform diverse behaviors. However, kinematics-only generators often exhibit physical hallucinations, producing motion trajectories that are physically infeasible to track with a downstream motion tracking controller or unsafe for real-world deployment. These failures often arise from the lack of explicit physics-aware objectives for real-robot execution and become more severe under out-of-distribution (OOD) user inputs. Hence, we propose SafeFlow, a text-driven humanoid whole-body control framework that combines physics-guided motion generation with a 3-Stage Safety Gate driven by explicit risk indicators. SafeFlow adopts a two-level architecture. At the high level, we generate motion trajectories using Physics-Guided Rectified Flow Matching in a VAE latent space to improve real-robot executability, and further accelerate sampling via Reflow to reduce the number of function evaluations (NFE) for real-time control. The 3-Stage Safety Gate enables selective execution by detecting semantic OOD prompts using a Mahalanobis score in text-embedding space, filtering unstable generations via a directional sensitivity discrepancy metric, and enforcing final hard kinematic constraints such as joint and velocity limits before passing the generated trajectory to a low-level motion tracking controller. Extensive experiments on the Unitree G1 demonstrate that SafeFlow outperforms prior diffusion-based methods in success rate, physical compliance, and inference speed, while maintaining diverse expressiveness.