Motion data formats#
Source clip formats, the per-clip NPZ written by conversion, the dataset layout and the mirroring transform. How to prepare a dataset: Prepare motion data.
Dataset layout#
data/<robot>/<dataset>/
*.csv | *.pkl source clips (or under raw/, preferred when it has clips)
npz/<clip>.npz converted clips — what training loads
npz/<clip>_mirror.npz mirrored copies (--mirror)
<dataset>.npz optional stacked bundle (--cache-motion-bundle)
Only READMEs, samples/ and .gitkeep files under data/ are version-controlled;
converted npz/ folders and bundles stay local. Extension robots keep their data under
the extension’s project_root.
Source formats#
Formats are defined in wbc_mjlab.motion.motion_formats; the converter picks one from the
file extension, or --format <name>.
Format |
Extension |
Content |
|---|---|---|
|
|
LAFAN / retarget CSV, no header, one row per frame:
|
|
|
GMR / |
Joint values follow the robot model’s joint order and count; a mismatch fails conversion
(expected N joint DOFs … got M).
Converted clip (NPZ)#
wbc-mjlab-data-to-npz runs forward kinematics on the robot model and writes one NPZ per
source clip. Arrays (time T, joints J, model bodies B):
Key |
Shape · meaning |
|---|---|
|
scalar — export rate (default 50 Hz, |
|
|
|
|
|
|
|
|
Bodies follow the model’s body order. Training selects the tracked keybodies through
MotionCommandCfg.body_names. A stacked bundle (--cache-motion-bundle) concatenates the
clips and stores segment starts and lengths so adaptive sampling can draw across the library.
With --debias-z, each clip is shifted vertically so the lowest foot sole touches the
floor (the robot’s foot_body_names / foot_sole_z).
Mirroring#
--mirror writes <clip>_mirror.npz next to each clip: the sagittal reflection, computed
after FK (motion/motion_mirror.py) from the robot’s RobotSymmetryConfig (joint swap
pairs and signs; G1: robots/g1/symmetry.py).
Channel |
Transform |
|---|---|
|
Swap left / right joint pairs; negate roll / yaw axes |
|
Swap left / right bodies; flip world y |
|
Swap bodies; negate quaternion x and z |
|
Swap bodies; negate x and z (axial vector under reflection) |
|
Unchanged |
Sources whose name already ends in _mirror are skipped, so re-converting doesn’t produce
_mirror_mirror clips. Robots without a symmetry config (including robots added in the
Studio) can’t be mirrored.
Motion source flags (train / play)#
Flag |
Loads |
|---|---|
|
|
|
|
|
That file |
|
Write / reuse |