RoboticsResearchHubVN/blinkReactor
About
Physics-aware humanoid motion retargeting: an open reproduction of ReActor trained with a differentiable world model (InstantTrack/SuperMimic) on mjlab + MuJoCo Warp. Verified on the Unitree G1.
AI & Machine LearningMeasured star growth
- in 24h
- Collecting history
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalblinkReactor
Physics-aware humanoid motion retargeting for the Unitree G1, trained on one GPU, with robot motions ready for a motion-tracking controller and live editing in Blender.
blinkReactor is an open-source reproduction of ReActor (physics-aware motion
retargeting by bilevel optimization). Its tracking policy is trained with the world-model training loop of
InstantTrack and
BlinkMimic instead of model-free RL: one differentiable world model, and
a policy learned by backpropagation through imagined rollouts, on mjlab /
MuJoCo Warp. The output is the simulated robot motion of every clip, which tools/export_retarget.py writes as
reference motions for InstantTrack.
- Reproducible benchmark on public data. LAFAN1 human motion (49 clips, 3.1 h) → G1, 3 seeds per method, every
training and evaluation log in
results/, and one script that rebuilds every table and figure. - Recommended recipe (
retarget_ema_prox): ReActor plus a policy EMA and a proximal anchor on the target offsets. Against the ReActor recipe it lowers the body position error vs the human motion from 11.7 to 10.9 cm, the orientation error from 12.0 to 8.7°, and the residual assistance force from 1.27 to 0.42 % of the robot's weight, with 0 of 49 clips failing, in 40k iterations (about 3 h on one RTX 5090). - Motions for the real robot (
retarget_real): retargeting with Unitree's joint friction and self-collisions. Self-penetrating frames drop from 26.8 to 0.6 %, 0 failed clips on LAFAN1 and on AMASS DanceDB, and an InstantTrack policy trained for 15 minutes on them survives 178 of 180 sim-to-sim runs on Unitree's G1 model. - Scale. One policy for all 11,296 AMASS clips (42 h of motion) in 8.5 h on one RTX 5090 (v1.0, one run).
The recommended recipe (`retarget_ema_prox`, seed 1, final checkpoint) on three LAFAN1 clips (dance2_subject2, fight1_subject3, sprint1_subject2), simulated in MuJoCo Warp under evaluation conditions, 6 s from 20 s into each clip. Solid: the simulated G1. Blue: the targets g_t(p) of its 14 tracked bodies, drawn at the robot's horizontal position (the global drift is reported separately in the tables).
Contents
- Results
- How it works
- Training presets
- Setup
- Motion data
- Train and evaluate
- Live editing in Blender
- Motion tracking
- Tests
- Repository layout
- Known limitations
- Acknowledgements
- Citation
- License
Results
LAFAN1 human motion → G1 (main benchmark)
LAFAN1 is public motion capture (Ubisoft La Forge,
5 subjects). The 49 clips that a free-standing robot can perform on flat ground (3.1 h; the ground, fallAndGetUp
and obstacles clips are excluded) are converted from BVH with the same SPARK calibration as AMASS
(Motion data). Every run trains for 40,000 iterations with the upper level from iteration 4,000, then
the final checkpoint plays every clip once from its first frame, with no randomization or noise. 3 seeds per method,
on two RTX 5090 machines.
The normalized return measures the robot against its own targets g_t(p), and the upper level moves those targets
towards what the robot does, so a higher return can mean easier targets rather than a closer retarget. The tables
therefore compare every run with the same nominal targets g_t(0), the SPARK-calibrated human motion
(tools/retarget_metrics.py):
| method (preset) | failed clips | body position error (cm) | body orientation error (°) | root drift (cm) | residual force (% of weight) | foot slip (cm/s) |
|---|---|---|---|---|---|---|
ReActor recipe (retarget) |
0 / 0 / 0 | 11.65 ± 0.34 | 12.0 ± 2.2 | 40.0 ± 1.1 | 1.27 ± 1.25 | 23.4 ± 29.7 |
+ policy EMA (retarget_ema) |
0 / 0 / 0 | 11.36 ± 0.14 | 9.8 ± 0.2 | 29.7 ± 1.0 | 0.39 ± 0.06 | 6.1 ± 0.1 |
+ proximal anchor (retarget_ema_prox, recommended) |
0 / 0 / 0 | 10.93 ± 0.23 | 8.7 ± 0.4 | 32.5 ± 5.1 | 0.42 ± 0.09 | 6.5 ± 0.4 |
+ orientation-only anchor (retarget_ema_proxori) |
0 / 0 / 0 | 11.13 ± 0.17 | 9.0 ± 1.0 | 34.6 ± 6.2 | 0.44 ± 0.14 | 6.3 ± 0.1 |
InstantTrack v1.4 loop (blinkreactor_it) |
0 / 0 / 0 | 11.19 ± 0.12 | 9.8 ± 0.1 | 33.8 ± 1.1 | 0.43 ± 0.02 | 6.3 ± 0.1 |
Mean ± sd over 3 seeds, RMS over the control steps after each clip's warm-up. Body position error: the 14 tracked
bodies relative to the pelvis (shape). Root drift: global pelvis position. Residual force: the mean root force that
the policy's residual wrench adds. The full report, with returns, wall-clock times and the training curves, is
results/report.md.
- The policy EMA matters most. The ReActor recipe evaluates the online policy, whose training is noisy: one of
its seeds leans on the residual force (2.7 % of the weight) and slides its feet (58 cm/s). Evaluating an
exponential moving average of the policy (
--pi_ema 0.995, as in InstantTrack) lowers the orientation error and the root drift on every seed, and the three seeds agree closely. - The proximal anchor keeps the upper level honest. Without it, the orientation offsets p_ori run to their bounds
for nearly every body: the upper level absorbs the policy's tracking bias into the targets.
--ul_prox 1adds a quadratic penalty on p to the upper-level loss, so p only moves where the robot really cannot follow. It gives the lowest body position and orientation errors; its root drift is within the seed spread of the others. - The InstantTrack training loop does not improve the final quality here. Its systems flags make each iteration
faster, but at equal iterations
blinkreactor_itis not closer to the human motion thanretarget_ema_prox(body position, orientation, drift) and drifts more thanretarget_ema. The ablation ladder fromretargettoblinkreactor_itis in the report.
Is the upper level right? On robot-to-robot LAFAN1 (tools/lafan1_to_skeleton.py: the reference is the public G1
retarget itself, so the ideal offsets are p = 0 and every error is measurable), 20k iterations, 3 seeds:
| upper level | ‖p_pos‖ (m) | ‖p_ori‖ (rad) | body position error (cm) | body orientation error (°) | root drift (cm) |
|---|---|---|---|---|---|
| bounds only, as ReActor | 0.020 | 0.088 (bound 0.1) | 4.40 ± 0.33 | 9.2 ± 0.3 | 31.1 ± 4.4 |
+ proximal anchor --ul_prox 1 |
0.006 | 0.021 | 3.71 ± 0.12 | 7.4 ± 0.1 | 29.0 ± 2.0 |
With the anchor the offsets stay near their ideal value and the robot ends closer to the reference on every measure.

Reproduce: bash tools/download_data.sh --lafan1, convert (Motion data), then for each preset and seed
PRESET_NAME=retarget_ema_prox bash scripts/train.sh runs/lafan1_human/retarget_ema_prox_s0 \
--motion_dir data/lafan1_human_g1 --seed 0 --iterations 40000 --lr_decay_iters 40000 --ul_start 4000
uv run python -m blinkreactor.evaluate --run_dir runs/lafan1_human/retarget_ema_prox_s0 --motion_dir data/lafan1_human_g1
uv run python -m blinkreactor.evaluate --run_dir runs/lafan1_human/retarget_ema_prox_s0 --motion_dir data/lafan1_human_g1 \
--ckpt runs/lafan1_human/retarget_ema_prox_s0/ckpt_040000.pt --record rec.npz
uv run python tools/retarget_metrics.py rec.npz --motion_dir data/lafan1_human_g1 --out runs/lafan1_human/retarget_ema_prox_s0/metrics
uv run python tools/make_report.py --collect # results/report.md, results/learning_curves.png
AMASS (v1.0, one run)
One run (seed 0, preset retarget): 96,000 iterations on one RTX 5090, with the upper level fitting the target offsets
p from iteration 9,600 on. Other jobs shared the GPU, so the wall-clock time is an upper bound. The evaluation plays
every clip once from its first frame, with no randomization or noise. A clip fails if the rollout triggers a
termination: root height error > 1 m or root orientation error > 45° against the g_t pelvis. The training logs of this
run are not part of the release, and the return is measured against g_t(p) (see above), so this table shows coverage,
not accuracy.
| AMASS subset | clips | normalized return | failed |
|---|---|---|---|
| KIT | 4006 | 0.961 | 3 |
| CMU | 1982 | 0.916 | 28 |
| BMLmovi | 1863 | 0.957 | 0 |
| GRAB | 1340 | 0.972 | 0 |
| Eyes Japan | 750 | 0.935 | 1 |
| ACCAD | 247 | 0.899 | 0 |
| HDM05 | 215 | 0.907 | 1 |
| DanceDB | 151 | 0.762 | 1 |
| HUMAN4D | 148 | 0.923 | 0 |
| DFaust | 129 | 0.933 | 0 |
| Transitions | 103 | 0.928 | 0 |
| CNRS | 79 | 0.875 | 2 |
| MoSh | 77 | 0.951 | 0 |
| TCDHands | 62 | 0.920 | 0 |
| SFU | 44 | 0.846 | 1 |
| TotalCapture | 37 | 0.927 | 0 |
| PosePrior | 35 | 0.828 | 0 |
| HumanEva | 28 | 0.942 | 0 |
| all | 11,296 | 0.944 (median clip 0.964) | 37 |
25 of the 37 failures come from three acrobatic CMU subjects (85, 88 and 90: flips, cartwheels, breakdance). BMLrub, EKUT, crawling, lying and stair clips are excluded, as in the converter's defaults. This run predates the training-set filter (Filtering the training set): the 147 clips that its elevated-support check rejects scored 0.86 here, against 0.95 for the clips it keeps.
Motion conversion. tools/convert_motions.py turns a human dataset into the policy's motion files. It is
vectorized over frames, about 30–60× faster per clip than the reference converter, and matches its output to float
tolerance (tools/test_convert.py).
| Dataset | Clips | Time | Workers |
|---|---|---|---|
| AMASS (SMPL-X stage-II) | 11,296 | 27 s (5.2 min with the CPU shared) | 24 |
| BONES-SEED, SMPL version | 2,000 | 10 s | 24 |
| BONES-SEED, SOMA rig (BVH) | 200 | 10 s | 8 |
Live editing. An edit in Blender reruns the whole clip in simulation. The rollout runs as CUDA graphs of 10 control steps (measured while another training job shared the GPU):
| Clip | Frames (50 Hz) | Simulation | Round trip (Blender → robot motion) |
|---|---|---|---|
| CMU 88_03 (AMASS) | 148 | 0.8 s | – |
| kick_back_001__A494 (BONES-SEED, SOMA) | 388 | 1.9 s | 2.0 s |
Lowering the kick of kick_back_001__A494 in Blender lowered the robot's kick too: at the kick frame the target foot
height dropped from 0.36 to 0.22 m, and the simulated foot from 0.39 to 0.24 m.
Retargeting for the real robot
The default retargeting robot (g1_retarget) has frictionless joints and no self-collisions, so its motions can be
physically consistent for the model and still not for the hardware: arms that pass through the torso, knees through
each other, jumps that only a frictionless robot reaches. g1_retarget_real adds what a tracking controller on the
real G1 has to deal with, and the preset retarget_real (retarget_ema_prox on that robot) retargets with it:
- Joint friction: Unitree's nominal friction model of each G1 motor (unitree_rl_lab
unitree_actuators.py,Fs tanh(qd / Va) + Fd qd), as MuJoCo friction loss and joint damping: N7520-14.3 (hip pitch, hip yaw, waist yaw) Fs 1.6 N m / Fd 0.16 N m s/rad, N7520-22.5 (hip roll, knee) 2.4 / 0.24, N5020-16 and W4010-25 (arms, ankles, waist roll and pitch) 0.6 / 0.06. - Self-collisions: box proxies at 85 % of each collision mesh's bounding box, arms against the trunk and thighs, and each leg's shin and foot against the other's (mesh-mesh contacts run MuJoCo Warp out of memory with 4,096 worlds).
| motion set | failed clips | body position error (cm) | body orientation error (°) | root drift (cm) | residual force (% of weight) |
|---|---|---|---|---|---|
| LAFAN1, 49 clips (24k iterations) | 0 / 49 | 10.7 | 9.6 | 46.8 | 0.41 |
| AMASS DanceDB, 149 clips, 3.3 h (40k iterations) | 0 / 149 | 9.1 | 12.0 | 29.1 | 0.22 |
One seed each, same metrics as above (vs the nominal targets g(0)); logs in
results/runs/real/. On LAFAN1 the body shape is as close to the human motion as with
retarget_ema_prox (10.9 cm, 3 seeds); the root drifts more (46.8 vs 32.5 cm). What changes is what the motions ask of the robot. Measured with the same self-collision boxes,
the frames with a self-penetration drop from 26.8 % of the retarget_ema_prox motions to 0.6 %, and the highest jump
of the set (fight1_subject3 at 139 s) from 40 to 25 cm of pelvis rise.
Downstream, an InstantTrack policy for the real G1 (joint friction, self-collisions, domain randomization, 0-20 ms
command delay) trained for 15 minutes on these motions fails on none of the 48 exported LAFAN1 clips, nor of the 149
DanceDB clips, and in a sim-to-sim sweep on Unitree's own G1 model (5 clips, 9 conditions, 4 seeds) survives 178 of
180 runs, against 165 of 180 with the retarget_ema_prox motions. These are simulation results; the motions have not
been tracked on hardware yet.
Residual force. --wrench_anneal start,end (experimental) ramps the residual wrench to zero during training so
that the exported motions need no assistance at all. In both runs tried, training collapsed once the gain reached
zero, also with the wrench gated out of the actions that the world model learns from, so retarget_real keeps the
small residual force. tools/export_retarget.py --max_wrench_pct still drops the clips that rely on it.
PRESET_NAME=retarget_real bash scripts/train.sh runs/real/dancedb_s0 --motion_dir data/amass_g1/DanceDB --seed 0 \
--iterations 40000 --lr_decay_iters 40000 --ul_start 4000
How it works
Retargeting by kinematics alone produces motions that a robot cannot perform: feet slide, the body leans past its support, contacts float or penetrate. ReActor retargets through physics instead. A policy makes the simulated robot track task-space targets built from the human motion, and an upper level adjusts those targets to what the robot can follow. blinkReactor implements this as follows.
| Part | What blinkReactor does |
|---|---|
| Human calibration | Each subject's skeleton is calibrated to the G1 in a shared T-pose (SPARK human-URDF calibration, reimplemented and vectorized over frames), then forward kinematics of every frame gives the human reference m_t of 14 tracked bodies. No joint angles are retargeted. |
| Targets | g_t(p): the human reference plus nominal SPARK offsets plus learned offsets p (a position and orientation offset per body, and a height offset p_z per clip). |
| Bilevel optimization | Every --ul_every iterations, an Adam step on p minimizes the distance between the targets and the states the simulated robot reaches, projected onto bounds. The targets are rewritten in place, so compiled functions and CUDA graphs stay valid. |
| Tracking policy | The world-model trainer of InstantTrack / BlinkMimic: a 2048×3 SiLU/LayerNorm world model predicting frame-local increments, and a policy optimized by backpropagation through imagined rollouts. |
| Reward | ReActor's (survival plus L2 tracking terms, normalized so that 1 is perfect, plus regularizers), and a state-based foot-stumble penalty, because the world model has no contact forces. |
| Residual wrench | The policy also outputs a 6-D root wrench in the pelvis heading frame, L1-penalized, as in ReActor. |
| Episodes | Each episode starts at the robot's default pose, with the reference paused for 50 steps while a phase variable ramps the body-tracking terms in. |
| Memory | Targets live on the GPU, static parts in pinned CPU memory, so all of AMASS (7.6 M frames, about 8.5 GB) trains on one GPU. |
Foot-stumble penalty. Each foot's toe and heel points (the G1 collision spheres) get a smooth ground-contact weight. When only the toe or only the heel is down, the penalty is that point's squared horizontal speed. A scuffing edge is penalized; a toe pivoting during toe-off is not.
Training presets
All presets are flags of python -m blinkreactor.train (scripts/presets.sh). With no flags,
train.py is the SuperMimic baseline, and every change is a flag, so all presets share the simulator, the MDP and the
evaluator.
| Preset | What it is | Status |
|---|---|---|
retarget_ema_prox |
Recommended, default of scripts/train.sh. retarget plus a policy EMA (--pi_ema 0.995, the evaluated and exported policy) and a proximal anchor on the target offsets (--ul_prox 1). |
LAFAN1, 3 seeds |
retarget_real |
retarget_ema_prox on g1_retarget_real (Unitree's joint friction, self-collisions), for motions that a controller on the real robot tracks (Retargeting for the real robot). |
LAFAN1 and AMASS DanceDB, 1 seed |
retarget |
The ReActor recipe on SuperMimic: supermimic_vibed's world model and training configuration, 96k iterations, Adam at 2e-4, 500 world-model-only iterations, upper level from 10 % of training, one step every 10 iterations. | LAFAN1, 3 seeds; AMASS, 1 seed |
retarget_ema, retarget_ema_proxori |
retarget + EMA; and + EMA with the anchor on p_ori only (--ul_prox_pos 0). |
LAFAN1, 3 seeds |
blinkreactor |
retarget on the InstantTrack v1.4 training loop: CUDA graphs for the updates and the collection step, static-shape compilation, collection, world-model and critic updates overlapped with the policy update on side CUDA streams, batched goal encoding, checkpoints written off the training clock. Same objective; the overlapped updates read networks one update round older. |
LAFAN1, 1 seed |
blinkreactor_ema, blinkreactor_muon |
Steps of the ablation ladder from blinkreactor to blinkreactor_it. |
LAFAN1, 1 seed |
blinkreactor_it |
blinkreactor plus the InstantTrack algorithm flags that apply to retargeting: policy EMA, Muon on the policy and the world model, failure-weighted resets, and an evaluation-guided reset allocation with an active sweep of 372 probe worlds. |
LAFAN1, 3 seeds |
instanttrack, supermimic |
Joint-space motion tracking on LAFAN1 (Motion tracking). | see InstantTrack |
The presets run 96k iterations, sized for AMASS; the LAFAN1 benchmark overrides this with --iterations 40000 --lr_decay_iters 40000 --ul_start 4000. On LAFAN1 the InstantTrack systems flags raise the policy-phase speed from
3.3 to 4.1 iterations per second; the full report lists the measured it/s of every run.
The InstantTrack v1.4 trainer features were ported to the retargeting task with these changes:
- Batched goal encoding follows the warm-up: the goal frames of all imagined steps advance only once the reference
is unpaused (
tools/test_retarget_cpu.pychecks them against the step-by-step rollout). - Overlapped collection also carries the wrench and foot-stumble statistics. The upper-level step waits for the side-stream collection before it rewrites the targets.
- Reference-action skip (
--pi_ref_skip) is not available, because retargeting has no reference joint angles.
Setup
Linux x86-64, an NVIDIA GPU with a driver for CUDA 12.8 (tested on an RTX 5090), uv and
git. Also ffmpeg for videos, and Blender 4.2+ for live editing. The stack is locked in uv.lock:
mjlab 1.6.0, Warp 1.16.0, torch 2.9.0.
git clone https://github.com/RoboticsResearchHubVN/blinkReactor.git
cd blinkReactor
uv sync --extra convert # .venv with mjlab, MuJoCo Warp, Warp, torch 2.9.0 (CUDA 12.8), scipy, joblib
bash tools/download_data.sh # Unitree G1 description -> data/g1_description, MJCF asset
The human motion data and body models need a registration with their owners and are not redistributed:
SMPL-X body models (SMPLX_{NEUTRAL,MALE,FEMALE}.npz) from smpl-x.is.tue.mpg.de,
AMASS from amass.is.tue.mpg.de, and BONES-SEED from
bones-studio/seed.
Motion data
# AMASS, SMPL-X stage-II fits (*_stageii.npz)
uv run python tools/convert_motions.py --dataset amass --src <AMASS> --out data/amass_g1 --smplx_models <smplx_dir> --compact
# BONES-SEED, SONIC's SMPL version (smpl_filtered/*.pkl)
uv run python tools/convert_motions.py --dataset bones_seed --src <bones-seed>/smpl_filtered --out data/bones_g1 \
--smplx_models <smplx_dir> --compact
# BONES-SEED, the SOMA rig (soma_uniform/bvh/<date>/*.bvh); no SMPL-X model needed
uv run python tools/convert_motions.py --dataset bones_seed_soma --src <bones-seed>/soma_uniform/bvh --out data/bones_soma_g1 --compact
# LAFAN1 BVH (bash tools/download_data.sh --lafan1); no registration, no SMPL-X model
uv run python tools/convert_motions.py --dataset lafan1 --src data/lafan1_bvh --out data/lafan1_human_g1 --compact
Each clip becomes one npz file: the calibrated human skeleton of the 14 tracked bodies and the SPARK nominal constants, with no joint angles. The converter works in three steps:
- Calibrate each subject's skeleton to the G1 in a shared T-pose (SPARK human-URDF calibration).
- Forward kinematics of every frame on the calibrated links.
- Resample to 50 Hz.
- AMASS. BMLrub, EKUT, crawling, lying and stair clips are skipped by default (
--exclude). - BONES-SEED, SMPL. Each clip is rotated into a Z-up world and uses a neutral SMPL-X with betas 0. The
_Mclips are mirrored copies. - BONES-SEED, SOMA. The SOMA joints are mapped to the 22 SMPL-X body joints with a fixed per-joint frame
correction (
sources.SOMA_K), fit bytools/fit_soma_frames.pyon 60 clips released in both versions. The two versions' robot targets differ by 1.3–4.2 cm and 2.5–8.9° per body, most at the shoulders and elbows, because the SMPL version was fit separately. - LAFAN1. LAFAN1's rest pose is not a T-pose, so its joint frames are mapped to the SMPL-X convention with a fixed
per-joint rotation (
sources.LAFAN1_K), fit bytools/fit_lafan1_frames.pyagainst the public G1 retarget of the same clips (3 parameters per joint; the motion itself comes from the BVH). The clip's height offset puts the median stance ankle at the robot's ankle height (--nom_z stance, the default for LAFAN1), since its clips do not all touch the floor at the same height. Theground,fallAndGetUpandobstaclesclips are skipped by default. --compactkeeps only what training reads. Files are about 7× smaller: 2.9 GB for AMASS, about 52 GB for all 131k BONES-SEED SMPL clips.- Resuming. Existing outputs are skipped, so an interrupted run resumes. Failing clips go to
<out>/failed.txt. - GPU memory. Training keeps about 1.1 KB per frame on the GPU, so all of AMASS (7.6 M frames) needs about 8.5 GB. All of BONES-SEED (about 140 M frames) does not fit; train on a subset.
Filtering the training set
tools/filter_motions.py removes clips that a free-standing humanoid cannot perform on
flat ground, after SuperMimic's BONES-SEED filter (Liao et al. 2026, Appendix E). Rejected clips are deleted from the
motion directory, and filter_report.csv there lists every clip's verdict, so run it after each conversion
(--dry_run only writes the report). Clips the filter cannot check are reported and kept.
uv run python tools/filter_motions.py --motion_dir data/amass_g1 # --keywords bones_seed for BONES-SEED
- Exclusions. The converter's AMASS defaults: BMLrub, EKUT, crawling, lying and stairs (
--exclude; give it with no values to filter everything that was converted). - Name filter. Clips that use terrain or objects the robot does not have: stairs, slopes, seesaws, beams,
handrails, tables, chairs, stools, benches, stepping stones, gaps, obstacles, ladders, climbing. For BONES-SEED,
SuperMimic's list (SONIC's keywords plus
box_,jump_off_50cm,look_over_fence). Lying, crawling, kneeling, handstands and cartwheels are kept. - Elevated support, on the robot targets as training sees them: the lowest target stays above 0.20 m for at least 2 s (standing or walking on something). The paper uses 0.6 s; in AMASS the shorter stretches are jumps and flips, which are hard but valid.
SuperMimic's other two checks are available but off by default, since the clips they flag in AMASS are trainable:
ground penetration (--penetration) and floating feet (--floating). The inputs here are link-origin
targets, so each clip's floor is estimated from its ankle stance level, and every height is raised by the ankle
link's 0.035 m above the sole.
| AMASS stage | Clips |
|---|---|
| converted with the default exclusions | 11,296 |
| after the name filter | 10,722 |
| after the elevated-support check | 10,575 (39.7 h) |
The filter takes about 20 s for all of AMASS.
Train and evaluate
export BLINKREACTOR_SKELETON_DIR=data/amass_g1 # default motion directory (or --motion_dir)
uv run python tools/test_retarget.py --motion_dir data/amass_g1/CMU # targets, warm-up, wrench, mirror, feet checks
bash scripts/train.sh logs/rt_all --motion_dir data/amass_g1 # PRESET_NAME=retarget_ema_prox (default) | retarget | ...
uv run python tools/eval_batch.py --run_dir logs/rt_all # each checkpoint with its own p
uv run python -m blinkreactor.evaluate --run_dir logs/rt_all --ckpt logs/rt_all/ckpt_096000.pt --record rt.npz
uv run python tools/render.py rt.npz rt.mp4 --robot g1_retarget --seconds 0 # robot + targets g_t(p)
uv run python tools/retarget_metrics.py rt.npz --motion_dir data/amass_g1 # errors vs g(0) and g(p), wrench, slip
uv run python tools/export_retarget.py rt.npz --out_dir retargeted/ --csv_dir retargeted_csv/ --max_wrench_pct 2
--clips_file restricts training (and blinkreactor.evaluate) to the listed clips: one name per line, relative to
--motion_dir, without .npz. Without it, every .npz under --motion_dir is used.
Stopping at convergence. Run the evaluator next to training:
uv run python -m blinkreactor.evaluate --run_dir logs/rt_all --watch --converge --sample 1000 --max_clip_s 20
It evaluates every checkpoint on a fixed, seeded sample of 1,000 training clips of at most 20 s, under evaluation
conditions, and appends each result to eval.csv. Training has converged when the last 5 evaluations (--patience)
improve on the best before them by less than 0.002 (--min_delta), and not before iteration 20,000
(--converge_after). The evaluator then writes CONVERGED.json with the best checkpoint's iteration and training
time, and train.py saves a final checkpoint and stops at its next log step (--no_stop_on_converged keeps it
going).
Retargeted motions. tools/export_retarget.py writes the simulated robot motion of every clip at 50 Hz: root
pose, joint positions, the residual wrench that was applied, whether the rollout survived the clip, and the learned
offsets p. --csv_dir also writes every clip that survived as a motion-tracking reference in the LAFAN1 G1 CSV format
that InstantTrack reads (30 fps rows of root position, root
quaternion xyzw and the 29 joint angles, in the same joint order), named after the source clip. --max_wrench_pct
skips clips whose mean residual force exceeds that share of the robot's weight, since a tracking controller gets no
such help; manifest.txt lists every clip's verdict. With the recommended preset (seed 1), 48 of the 49 LAFAN1 clips
pass at 2 %.
Live editing in Blender
uv run python -m blinkreactor.live --ckpt logs/rt_all/ckpt_096000.pt # server on 127.0.0.1:8765 (about 1 GB GPU)
uv run python tools/pack_blender_addon.py # -> dist/blinkreactor_live.zip
Install the zip in Blender under Edit > Preferences > Add-ons > Install from Disk. On a Wayland session whose GNOME
crashes Blender at start-up, launch it with WAYLAND_DISPLAY= blender. Then, in the 3D viewport sidebar (N), the
blinkReactor tab:
- Connect. The robot's meshes come from the server.
- Load a human clip. AMASS builds the SMPL-X armature and skinned body from
SMPLX_<gender>.npz(an armature from the SMPL-X Blender add-on works too). SOMA BVH imports a BONES-SEEDsoma_uniformclip. - Retarget. With Live on, every keyframe edit reruns the rollout after a short debounce, and a newer edit cancels a running one. The first result stays as a translucent ghost; Set Ghost freezes the current one instead.
How it works:
- Sending the clip. The add-on reads the action's F-curves for every frame and runs the armature's forward kinematics in numpy (about 50 ms for 1,000 frames). It sends each joint's world rotation relative to its rest pose, plus the pelvis path.
- Converting. The server builds the robot skeleton from these (
SkeletonClip.from_world+ the SPARK calibration), exactly as the offline converters do. - Simulating. The server tracks the clip from its first frame in one simulated world.
- Learned offsets. Clip names the training clip whose learned height offset p_z is used; other clips use the median.
- Without Blender.
python -m blinkreactor.live --ckpt ... --offline clip.bvh|clip_stageii.npz --out traj.npzruns the same path on one clip.
Constraints and drivers on the armature are not evaluated. The SOMA rig is bones only, with no body mesh.
Motion tracking
The joint-space motion-tracking task of InstantTrack is kept in the same code base: bash tools/download_data.sh --lafan1, then PRESET_NAME=instanttrack bash scripts/train.sh logs/track_s0 trains the InstantTrack v1.4
configuration on the 40 LAFAN1 clips. Its results and the comparison with SuperMimic are in the
InstantTrack README.
Tests
| Command | Needs | Checks |
|---|---|---|
PYTHONPATH=src CUDA_VISIBLE_DEVICES= uv run python tools/test_retarget_cpu.py |
CPU only, no data | batched goals vs the step-by-step rollout (warm-up included), targets g_t(p), one upper-level step (bounds, in-place rewrite) |
uv run python tools/test_retarget.py --motion_dir data/amass_g1/CMU |
GPU, converted clips | targets vs ReActor's formula, warm-up, residual wrench, left-right mirror, upper level, foot-stumble points vs MuJoCo |
uv run python tools/test_convert.py --dataset amass --src <AMASS> --ref <reference npz> --smplx_models <dir> |
reference files | converter output vs a reference converter, every key |
uv run python tools/test_env.py |
GPU, LAFAN1 | motion tracking: FK vs the simulator, state round trip, reward on reference playback |
Repository layout
| Path | Contents |
|---|---|
src/blinkreactor/retarget.py |
retargeting task: skeleton reference and targets g_t(p), ReActor reward and terminations, upper level |
src/blinkreactor/skeleton/ |
SPARK calibration and forward kinematics (spark.py), AMASS / BONES-SEED / SOMA readers (sources.py) |
src/blinkreactor/train.py |
world-model trainer (SuperMimic + InstantTrack v1.4 loop), bilevel steps for retargeting |
src/blinkreactor/evaluate.py |
evaluation of checkpoints, convergence watch, trajectory recording |
src/blinkreactor/live/ |
live retargeting server for the Blender add-on, and offline single-clip retargeting |
src/blinkreactor/g1/, g1_retarget/, g1_retarget_real/ |
Unitree G1 robot spec for motion tracking, for retargeting, and for retargeting with joint friction and self-collisions |
src/blinkreactor/*.py (other) |
simulator wrapper, MDP, world model and policy networks, optimizers, replay buffer, rotations |
blender_addon/ |
Blender add-on (tools/pack_blender_addon.py packs it) |
tools/ |
data conversion and filtering, evaluation, retargeting metrics, report, rendering, export, tests |
results/ |
LAFAN1 benchmark: per-run evaluation and training logs, metrics, report.md, learning curves |
scripts/ |
training presets and launcher |
media/ |
the GIF of this README |
Known limitations
- Root drift. Over long clips the global pelvis position drifts about 30 cm (RMS) from the human motion, even on robot-to-robot data where the reference is perfectly feasible, so it comes from the tracking policy rather than the retarget. Body shape and orientation are tracked much more closely; the exported motion is the robot's own, physically consistent path.
- Residual assistance. The exported motions were simulated with the residual root wrench (0.4 % of the robot's
weight on average with the recommended recipe). Use
--max_wrench_pctto drop clips that rely on it. - Seeds and scale. The LAFAN1 benchmark has 3 seeds per main method and 1 for the ladder steps. The AMASS result
is one run of the v1.0 recipe, without logs; of the newer recipes only
retarget_realhas been run on AMASS, on the DanceDB subset (149 clips, one seed). - Evaluation noise. The return of one checkpoint varies by about ±0.05 between evaluator runs; the metrics vs g(0) vary much less.
- The world model has no contact forces, so foot contact is shaped by a state-based penalty only.
- The retargeted motions have been tracked in simulation (sim-to-sim on Unitree's G1 model) but not yet on hardware.
Acknowledgements
The retargeting formulation (parameterized targets, bilevel optimization of the offsets, the reward and the residual wrench) is that of ReActor (Müller et al., 2026), and the human calibration that of SPARK (Wang et al., 2026). The tracking policy is trained with the world-model training loop of InstantTrack and of BlinkMimic by Fuyi Chen, which build on supermimic_vibed by Chong Zhang, an unofficial reimplementation of SuperMimic (Liao et al., 2026). The converter's output is checked against a reference converter built on the human calibration of GMR. The training-set filter follows SuperMimic's (Appendix E). Simulation runs on mjlab, MuJoCo, MuJoCo Warp and NVIDIA Warp.
Data. AMASS (Mahmood et al., ICCV 2019) and SMPL-X (Pavlakos et al., CVPR 2019) are under non-commercial research
licenses; BONES-SEED under the Bones Studio license, with its SMPL version
from SONIC (Luo et al., 2025) and its SOMA rig from NVIDIA SOMA-X; LAFAN1
(Ubisoft La Forge) under CC BY-NC-ND 4.0. None of them is included here. Checkpoints, videos and GIFs trained on or
rendered from these datasets, including media/reactor_hero.gif, inherit their terms and are not covered by this
repository's MIT License.
Citation
@misc{blinkreactor2026,
title = {blinkReactor: Physics-Aware Humanoid Motion Retargeting with a Differentiable World Model},
author = {{RoboticsResearchHubVN}},
year = {2026},
url = {https://github.com/RoboticsResearchHubVN/blinkReactor}
}
Please also cite the methods and code it reproduces and builds on:
@article{muller2026reactor,
title = {ReActor: Reinforcement Learning for Physics-Aware Motion Retargeting},
author = {M{\"u}ller, David and Serifi, Agon and Christen, Sammy and Grandia, Ruben and Knoop, Espen and B{\"a}cher, Moritz},
journal = {arXiv preprint arXiv:2605.06593},
year = {2026}
}
@article{wang2026spark,
title = {SPARK: Skeleton-Parameter Aligned Retargeting on Humanoid Robots with Kinodynamic Trajectory Optimization},
author = {Wang, Hanwen and Liao, Qiayuan and Zhang, Bike and Ren, Kunzhao and Sreenath, Koushil and Xiong, Xiaobin},
journal = {arXiv preprint arXiv:2603.11480},
year = {2026}
}
@article{liao2026supermimic,
title = {SuperMimic: Scaling Humanoid Whole-Body Control with One Differentiable World Model},
author = {Liao, Qiayuan and Shao, Yiyang and Long, Junfeng and Zakka, Kevin and Horowitz, Roberto and Abbeel, Pieter and Sreenath, Koushil},
journal = {arXiv preprint arXiv:2610.28480},
year = {2026}
}
@misc{instanttrack2026,
title = {InstantTrack: Whole-Body Motion Tracking for the Unitree G1 in Minutes on One GPU},
author = {Dao, Huy Quang},
year = {2026},
version = {1.4.1},
doi = {10.5281/zenodo.24461144},
url = {https://github.com/Huy-Quang-Dao/instantTrack}
}
@misc{blinkmimic2026,
title = {BlinkMimic: Whole-Body Motion Tracking for the Unitree G1 in Minutes on One GPU},
author = {Chen, Fuyi},
year = {2026},
url = {https://github.com/fuyichen0725/blinkmimic}
}
@misc{zhang2026supermimicvibed,
title = {supermimic\_vibed: An Unofficial Reimplementation of SuperMimic},
author = {Zhang, Chong},
year = {2026},
url = {https://github.com/zita-ch/supermimic_vibed}
}
@article{joao2025gmr,
title = {Retargeting Matters: General Motion Retargeting for Humanoid Motion Tracking},
author = {Araujo, Joao Pedro and Ze, Yanjie and Xu, Pei and Wu, Jiajun and Liu, C. Karen},
journal = {arXiv preprint arXiv:2510.02252},
year = {2025}
}
@inproceedings{mahmood2019amass,
title = {{AMASS}: Archive of Motion Capture as Surface Shapes},
author = {Mahmood, Naureen and Ghorbani, Nima and Troje, Nikolaus F. and Pons-Moll, Gerard and Black, Michael J.},
booktitle = {International Conference on Computer Vision (ICCV)},
pages = {5442--5451},
year = {2019}
}
@inproceedings{pavlakos2019smplx,
title = {Expressive Body Capture: {3D} Hands, Face, and Body from a Single Image},
author = {Pavlakos, Georgios and Choutas, Vasileios and Ghorbani, Nima and Bolkart, Timo and Osman, Ahmed A. A. and Tzionas, Dimitrios and Black, Michael J.},
booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
pages = {10975--10985},
year = {2019}
}
@misc{bonesseed2026,
title = {{BONES-SEED}: Skeletal Everyday Embodiment Dataset},
author = {{Bones Studio}},
year = {2026},
url = {https://huggingface.co/datasets/bones-studio/seed}
}
@article{luo2025sonic,
title = {{SONIC}: Supersizing Motion Tracking for Natural Humanoid Whole-Body Control},
author = {Luo, Zhengyi and Yuan, Ye and Wang, Tingwu and Li, Chenran and Chen, Sirui and Casta{\~n}eda, Fernando and Cao, Zi-Ang and Li, Jiefeng and Minor, David and Ben, Qingwei and Da, Xingye and Ding, Runyu and Hogg, Cyrus and Song, Lina and Lim, Edy and Jeong, Eugene and He, Tairan and Xue, Haoru and Xiao, Wenli and Wang, Zi and Yuen, Simon and Kautz, Jan and Chang, Yan and Iqbal, Umar and Fan, Linxi and Zhu, Yuke},
journal = {arXiv preprint arXiv:2511.07820},
year = {2025}
}
@article{saito2026soma,
title = {{SOMA}: Unifying Parametric Human Body Models},
author = {Saito, Jun and Li, Jiefeng and de Ruyter, Michael and Guerrero, Miguel and Lim, Edy and Hassani, Ehsan and Blanco Ribera, Roger and Moon, Hyejin and Dadela, Magdalena and Di Lucca, Marco and Wang, Qiao and Li, Xueting and Kautz, Jan and Yuen, Simon and Iqbal, Umar},
journal = {arXiv preprint arXiv:2603.16858},
year = {2026}
}
@misc{zakka2026mjlab,
title = {mjlab: A Lightweight Framework for GPU-Accelerated Robot Learning},
author = {Zakka, Kevin and Liao, Qiayuan and Yi, Brent and Le Lay, Louis and Sreenath, Koushil and Abbeel, Pieter},
year = {2026},
eprint = {2601.22074},
archivePrefix = {arXiv},
primaryClass = {cs.RO}
}
@inproceedings{todorov2012mujoco,
title = {MuJoCo: A physics engine for model-based control},
author = {Todorov, Emanuel and Erez, Tom and Tassa, Yuval},
booktitle = {IEEE/RSJ International Conference on Intelligent Robots and Systems},
pages = {5026--5033},
year = {2012}
}
License
MIT (LICENSE). Code derived from other projects keeps their MIT notices; see THIRD_PARTY_NOTICES.md. Data-derived files are excluded; see Acknowledgements.
Explore related projects
Loading…