I am preparing a multi-robot dataset for training a vision-language-action model in PyTorch.
Different sources use different action representations, including joint positions, joint velocities, Cartesian poses, and end-effector delta poses.
I am considering storing the original action representation together with:
- Coordinate frame
- Units
- Rotation format
- Control frequency
- Gripper encoding
- Validity mask
For PyTorch users working with heterogeneous robotics data:
- Do you normalize actions before Dataset or inside the training pipeline?
- Do you keep robot-specific metadata as model inputs?
- How do you handle unsupported action dimensions?
- Do you store converted actions alongside the original representation?
- How do you keep the conversion reproducible across dataset revisions?
I am especially interested in practical patterns that support cross-embodiment training without hiding the original robot-specific semantics.
I’d keep the original actions unchanged and handle normalization as a separate step. With different robot platforms, trying to force everything into one action format too early can lead to losing important information.
For PyTorch, I think a practical approach is to standardize units, coordinate frames, and rotation formats during preprocessing, then apply numerical normalization during training.
I’d also keep robot-specific metadata, especially the action type and control frequency, since the same values can mean different things across platforms.
For unsupported dimensions, padding with a validity mask makes sense, as long as those dimensions are excluded from the loss calculation.
Storing converted actions alongside the originals can save processing time, but I’d version the conversion logic and normalization parameters so the results stay reproducible.
One thing worth watching is control frequency. A delta pose at 10 Hz isn’t directly comparable to one at 50 Hz, even if both use the same representation.
Ryan’s split is right: keep the raw actions, standardize frames/units/rotations in a versioned preprocess, and do numerical normalization in the training pipeline.
Two things I’d add for cross-embodiment work:
-
Compute normalization statistics per embodiment, not on the mixed dataset. A 7-DoF arm and a 20-DoF humanoid in one z-score will let the higher-dimensional robot dominate the mean and std, and the smaller one ends up over-scaled. Store those stats (and the conversion script hash) in a manifest next to the converted file so a dataset revision can be reproduced or bisected.
-
Frequency is not only a comparability problem, as Ryan said; it also changes the meaning of a delta. I convert delta poses to a time-normalized unit (for example metres or radians per second) during preprocess, then the 10 Hz and 50 Hz sources share a scale. Padding plus a validity mask is still the right way to handle unsupported dimensions, and those masked dims must stay out of the loss.
A single shared action vector with a mask is enough to start. If the policy struggles to transfer, a small per-robot action head (or a feature-wise transform conditioned on robot id) usually helps more than forcing a richer shared space.
Per-embodiment statistics plus a validity mask cover most of this, and the thread already has the right shape. Two details that decide whether the conversion actually survives revisions:
-
Fit normalization stats on the action distribution your policy will actually produce at inference, not the recorded dataset distribution. Logged demos are usually slower and smoother than rollouts, so z-scores fitted on demos compress the fast part of the action space exactly where errors matter most. A quick check that catches this: plot the histogram of each normalized dimension after a few evaluation episodes - values pinned near ±3 mean the stat range was too narrow and clipping is silently distorting actions.
-
Make the conversion reversible per sample, not just reproducible in aggregate. Store the inverse transform (or its hash plus the stats file) alongside each episode so you can round-trip raw → converted → raw and assert the error stays under a tolerance, e.g. 1e-4 for joint positions in radians. Rotation conversions are where this usually fails first: a quaternion-to-axis-angle round trip that looks fine per sample can flip sign conventions across datasets, and nothing downstream notices because the loss still decreases.
On keeping robot metadata as model inputs: feeding control frequency or gripper encoding as continuous features is rarely worth it early. A one-hot embodiment id conditioning a small action head (as virse.marketing suggests) plus fixed time-normalized deltas tends to transfer better than making the network learn the conversion itself.
How many embodiments are in the mixed set, and do any of them have actions recorded at multiple control rates within the same episode?
The distinction between reproducible and reversible conversion is important. I’d store the per-embodiment statistics, conversion version, and inverse transform in the manifest, then validate a raw → converted → raw round trip per sample.
I also agree that normalization statistics should be checked against rollout data, not only demonstrations. I’d monitor the normalized action histograms for clipping and saturation during evaluation.
The mixed dataset is still being finalized, so I don’t want to assume a fixed embodiment count yet. If one episode contains multiple control rates, I’d preserve native timestamps and convert deltas to time-normalized quantities before resampling rather than aligning them by frame index.
A shared action vector with a small robot-specific action head seems like a sensible first baseline.
One pattern I’d add: keep a small per-episode manifest object and have the Dataset return raw actions plus that object; do padding, masking, and normalization in collate_fn or a transform. That keeps raw semantics untouched and lets you add embodiments without changing stored tensors. Since the embodiment count isn’t fixed yet, map each robot descriptor to an embedding with a reserved unknown slot rather than a fixed-size one-hot. Also assert the round trip per sample and log normalized histograms by embodiment, not only globally.