hey, found a fun one.
Value::Quatf / Quatd / Quath end up with a different element order depending on whether they came from .usda or .usdc. So the same scene file in both formats gives different rotations, and Pixar-authored binaries (Isaac Sim, Omniverse robotics assets, anything saved by usdcat) come out with their rotations wrong.
Why: Pixar's GfQuat<T> declares _imaginary (Vec3) before _real (scalar), so the in-memory layout is [x, y, z, w]. The C++ USDC code (pxr/usd/sdf/crateFile.cpp:223) marks GfQuat as bitwise-RW and just memcpy's the struct to disk → on-disk bytes are [x, y, z, w]. But USDA text uses (real, i, j, k) = (w, x, y, z), and the crate's USDA parser (src/usda/parser.rs:1433) stores the parsed tuple verbatim → array is (w, x, y, z). Same Rust type, two conventions.
Hit this loading the Agilebot GBT-C5A robot (Isaac Sim asset, USDC) — every link came out tilted into a wall. Took a probe to figure out it wasn't my code, it was the byte order.
Fix coming in a follow-up PR. Just opening this so others searching for the same symptom can find it.
hey, found a fun one.
Value::Quatf/Quatd/Quathend up with a different element order depending on whether they came from.usdaor.usdc. So the same scene file in both formats gives different rotations, and Pixar-authored binaries (Isaac Sim, Omniverse robotics assets, anything saved byusdcat) come out with their rotations wrong.Why: Pixar's
GfQuat<T>declares_imaginary(Vec3) before_real(scalar), so the in-memory layout is[x, y, z, w]. The C++ USDC code (pxr/usd/sdf/crateFile.cpp:223) marksGfQuatas bitwise-RW and just memcpy's the struct to disk → on-disk bytes are[x, y, z, w]. But USDA text uses(real, i, j, k)=(w, x, y, z), and the crate's USDA parser (src/usda/parser.rs:1433) stores the parsed tuple verbatim → array is(w, x, y, z). Same Rust type, two conventions.Hit this loading the Agilebot GBT-C5A robot (Isaac Sim asset, USDC) — every link came out tilted into a wall. Took a probe to figure out it wasn't my code, it was the byte order.
Fix coming in a follow-up PR. Just opening this so others searching for the same symptom can find it.