When a robot possesses more degrees of freedom than a task requires, multiple trajectories can achieve the same objective using distinct motion styles. Compositional robot control aims to preserve a selected style while simultaneously executing an independent task command, effectively balancing these potentially competing objectives. In this paper, we present CODES, a framework for compositional robot control that discovers a coherent style repertoire from diverse recordings and composes it with independent commands. First, motion retargeting maps the recordings to motions executable by the target robot; next, weakly supervised consensus encoding and density-based clustering identify styles within and across recordings without a prescribed count; finally, reinforcement learning trains a policy to compose the discovered styles with independent commands. We evaluate CODES on a Unitree Go2 quadruped across two simulators and physical hardware. Compared to baselines, CODES significantly improves kinematic coherence. Furthermore, our controller successfully tracks velocity commands that generalize beyond the support of the recorded data, exhibiting robust and distinguishable style characteristics during both cross-simulator and real-world hardware deployments. Project website: https://www.proroklab.org/compositional-motion-styles/
Figures & tables
Fig. 1: Learning and composing motion styles for quadruped control. (A) Motions are retargeted to a common representation compatible with the robot’s kinodynamics; (B) a weakly-supervised method based on consensus affinity and HDBSCAN identifies a style repertoire; and (C) a policy trained with reinforcement learning composes a style reference from the repertoire and an independent task command for robot control. This makes recorded motion characteristics available under independently selected commands.
Method
K
Keff
Loc. K
Coverage (%)
Core switches (/min)
CODES (ours)
16
10.19
12
72.8
1.36
Loss ablations
No coarse ( λ+=λ−=0 )
15
8.92
10
90.8
0.79
Separation only ( λ+=0 )
15
7.40
9
91.3
1.01
Uniform attraction ( αy=1 )
7
3.42
7
95.9
0.00
No reconstruction ( λx=λΔ=0 )
3
1.20
3
93.6
0.00
TABLE I: Decomposition Ablations and Baselines
Method
Coverage (%)
Silhouette ↑
Cross-recording AUC ↑
CODES (ours)
72.8
0.329
0.832
No coarse terms
90.8
0.264
0.826
VQ-VAE
100.0
-0.043
0.562
Coverage and balance controls
CODES, full coverage
100.0
0.246
0.790
VQ-VAE, balanced
100.0
0.022
0.680
TABLE II: Coherence in a Common Kinematic Space
Fig. 2: Command and style fidelity across forward and lateral velocity sweeps, with the other commanded components set to zero. (a) Fraction of three trials satisfying the completion and tracking criteria. (b) Mean reference consensus cosine, shown on an asinh scale clipped below −0.1 . In reviewed rollouts, values near 0.5 usually retain recognizable reference posture and limb coordination, whereas values near 0 show weaker resemblance; this learned score is not a calibrated perceptual distance. Orange outlines show estimated recorded support; crosses mark early termination. Tracking extends beyond support, but reference resemblance decreases.
Fig. 3: Style switching on hardware under a fixed task command. Deployment of the CODES policy on the Unitree Go2 at a constant 0.5 m/s forward command with zero lateral and yaw-rate components, while the selected reference switches among C04, C00, C14, and C11. The colored band indicates the active style, and dashed lines the switch instants. The policy, reference bank, and state estimation run onboard, without external motion capture or offboard inference. The top row shows a time-lapse composite of the traversal, with numbered markers at successive instants of the run. The panels below report, from top to bottom, the estimated and commanded forward velocity vx ; the reference consensus cosine of Eq. ( 21 ) with respect to the active reference; the base-relative height Δz of the four feet (FL, FR, RL, RR); and the kinematically inferred contact states. The command is identical across all four segments, while foot-swing amplitude, contact timing, and base posture differ, indicating that the reference changes how the command is executed rather than which command is tracked. Videos of the hardware execution are provided on the project website.
Dictionary
K
Median Exy (m/s) ↓
Complete (%) ↑
Success (%) ↑
CODES (ours)
16
0.114
98.1
74.2
No coarse terms
15
0.106
99.3
89.8
VQ-VAE
17
0.142
99.2
66.8
TABLE III: Command Fidelity in Simulation against Baselines
Robotic foundation models offer a promising path toward general-purpose humanoid robot control, often through hierarchical architectures. However, their effectiveness depends on the command interface between the planner and the controller, which must support accurate execution while remaining easy to predict, and ideally allow new behaviors to be composed from prior ones. In this work, we introduce spectral skills, a latent representation of this interface that meets these requirements through predictive representation learning. By design, spectral skills compactly encode short motion segments and are learned by predicting subsequent motion rather than reconstructing the encoder input. On a 29-DoF humanoid, a controller conditioned on spectral skills reduces global tracking error by 62% relative to the state of the art. The same frozen controller chains independently encoded skills without a separate transition policy. It also composes new behaviors by adding orthogonal directions to any compatible base skill, producing combinations unseen in the training data. We demonstrate tracking, chaining, and composition, as well as control through a language-conditioned planner, on Unitree G1 hardware. Project page: https://spectral-skill.github.io
Reinforcement learning has become the prevailing approach to humanoid locomotion control: policies transfer reliably from simulation to hardware and recover gracefully from disturbances. Motion quality, however, still lags behind: task-only rewards often converge to stiff, asymmetric gaits, while motion imitation methods improve appearance but become more sensitive to external disturbances because reference signals can oppose the transient poses needed to regain balance. We propose Predictive Style Matching, in which an offline predictor maps the robot's lower-body state history and velocity commands to interpretable upper-body joint and gait targets that shape the rewards during training. Because the targets are state-conditioned rather than time-indexed and the predictor is used only at training time, the deployed controller inherits the proprioceptive interface and inference cost of a task-only RL baseline. On the Unitree G1, in both simulation and hardware, PSM reduces upper-body style error by roughly an order of magnitude over task-only RL while preserving its fall-recovery rate, whereas the motion-imitation baseline attains the lowest style error but fails to recover from disturbances about five times as often.
Moscow Institute of Physics and Technology (MIPT), Dolgoprudny, Moscow Region, Russia · Innopolis University, Innopolis, Russia · Sber Robotics Center, Moscow, Russia
While velocity-commanded RL policies are effective for controlling quadrupeds, they are a limited interface for humanoids that need to perform complex whole-body motions. Furthermore, RL tracking policies for whole-body motions typically have limited information about the desired future motion, preventing them from performing controlled deviations to achieve long-term task success; such information is particularly relevant when a controller must prepare for transitions between behaviors. We address these challenges using concise motion representations that can be generated by a high-level controller, given a behavior label or text command. These representations can be fed directly into a tracking policy to provide a detailed motion reference. Our method exhibits a high degree of flexibility in performing real-world robot motions such as dancing, fighting, or walking based on conditional information. At matched capacity, our adopted stochastic motion tokenizer reconstructs motions from the Unitree G1 at a level that exceeds state-of-the-art approaches such as finite scalar quantization (FSQ) and the vector-quantized autoencoder (VQ-VAE). The resulting discrete interface conditions whole-body tracking policies that execute generated dance, fight, and walk motions lasting 16.8 s each and a 35 s fight-to-dance sequence on a physical Unitree G1.
Michael Drolet, Oleg Arenz, Jan Peters
Technical University of Darmstadt · German Research Center for AI (DFKI) · Robotics Institute Germany (RIG)