Skip to content

fix(robotwin): preserve native wxyz quaternion convention in EEF paths - #63

Open
rockyyh wants to merge 1 commit into
OpenWAM-Official:mainfrom
rockyyh:codex/fix-robotwin-quaternion-order
Open

rockyyh wants to merge 1 commit into
OpenWAM-Official:mainfrom
rockyyh:codex/fix-robotwin-quaternion-order

Conversation

@rockyyh

@rockyyh rockyyh commented Nov 6, 2026

Copy link
Copy Markdown

Native RoboTwin endpose/HDF5 quaternions are scalar-first wxyz, but the EEF path interpreted them as xyzw. For example, the native identity quaternion [1,0,0,0] became rot6d for Rx(180°). This change preserves the physical rotation when loading training actions, computing statistics, encoding live proprio, and decoding actions for RoboTwin.

Fixes #62.

The change is limited to the RoboTwin EEF convention and its documentation/tests. Shared xyzw helpers retain their behavior for other benchmarks. The normalization-stat shard namespace is bumped so resuming statistics computation cannot mix old and corrected EEF representations. Tests use independent physical rotation matrices (identity, ±quaternions, 90°/180° rotations, and a mixed-axis rotation), check both arms/positions/grippers, and cover legacy shard exclusion; existing RoboTwin fixtures now store native wxyz.

Checkpoint compatibility: this deliberately corrects the EEF representation; it is not a drop-in runtime fix for checkpoints trained with the former convention. Those checkpoints need their matching legacy revision until explicitly migrated or retrained. The README documents this and the need to regenerate final normalization statistics. No checkpoint migration or GPU evaluation is claimed.

Validation (CPU, Python 3.12 on macOS):

  • Targeted RoboTwin convention/dataloader/proprio and RoboCasa365 interface tests: 63 passed.
  • The 17 new regression cases all fail against unmodified upstream 0c9ed80d80af1d0c5f4148afe65cc7f462ec3995 and all pass with this fix.
  • 100 additional random physical-rotation encode/decode checks passed.
  • make compile and full-repository Ruff lint passed.
  • make all: 2116 passed, 18 skipped, 41 deselected, 1 failed. The sole failure, tests/test_speed_preset.py::test_shell_launcher_defers_preset_and_automatically_selects_gpu_count, also fails unchanged on the upstream base on this macOS host (' 2' != '2', from the launcher GPU-count string). Neither that test nor the launcher is modified here.
  • git diff --check passed. GPU/model evaluation was not run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RoboTwin EEF quaternion convention mismatch: native wxyz interpreted as xyzw

1 participant