Repository navigation
Fix float scale reads in UsdFrameView through Fabric - #7385
Conversation
Signed-off-by: Zeng Qingcheng <[email protected]>
There was a problem hiding this comment.
Isaac Lab Review Bot
The patch narrowly fixes legal half3/float3 scale reads by converting authored scale components to Gf.Vec3d at the Vt.Vec3dArray assignment boundary.
- Design and architecture: Precision normalization remains localized to the USD backend and preserves the existing staging, Fabric initialization, and ProxyArray paths. Authored USD attribute types are not modified.
- API: The method signature, [N, 3] result shape, wp.float32/torch.float32 dtype contract, device behavior, and legacy scale delegate remain unchanged. Appropriate changelog fragments cover the production fix and test-only PhysX package change.
- Implementation: The explicit component conversion supports half3, float3, and double3 values while retaining the existing FP32 output contract. Regression coverage exercises all legal USD scale precisions and the Fabric initialization path. The lack of an explicit CUDA-availability guard in the USD-side test is a minor residual test-environment consideration dependent on test_devices() behavior, not a demonstrated merge issue.
No blocking issues. No inline issue met the actionable-evidence threshold; the assessment above records the review feedback.
Automated review; human maintainers own approval decisions.
Greptile SummaryThe PR normalizes legal half-, float-, and double-precision USD scale vectors to
Confidence Score: 5/5The PR appears safe to merge; no concrete correctness, lifecycle, or security regressions were identified. The conversion is localized to the incompatible USD vector-assignment boundary, preserves the existing downstream representation, and is covered across all legal USD scale precisions and the affected Fabric initialization path. Important Files Changed
Reviews (1): Last reviewed commit: "Fix float scale reads in UsdFrameView" | Re-trigger Greptile |
There was a problem hiding this comment.
AI-assisted review (OpenAI Codex).
Thank you @NeoZng for the focused fix and the strong regression coverage.
I found no blocking correctness issues. Normalizing the value at the UsdFrameView boundary is the right design: it fixes direct USD scale reads and Fabric initialization without rewriting the authored xformOp:scale precision or changing the public FP32 result.
One non-blocking simplification: OpenUSD already provides Gf.Vec3d conversion constructors from Gf.Vec3h and Gf.Vec3f, so the production hunk can be reduced to:
scales[idx] = Gf.Vec3d(prim.GetAttribute("xformOp:scale").Get())OpenUSD reference: https://openusd.org/release/api/vec3d_8h_source.html#l00075
I validated this exact alternative locally on throwaway branch review/pr-7385-minimal-cast:
- Red phase: the original assignment failed for half3 and float3, while double3 passed; Fabric initialization failed through
_sync_fabric_from_usd_initial(). - Green phase on CPU: USD 3/3 passed; Fabric 1/1 passed.
- Green phase on cuda:0: USD 3/3 passed; Fabric 1/1 passed.
uv run isaaclab -f: all hooks passed.
The current component-wise implementation is correct and safe; this is only a suggestion to make the production change strictly minimal.
Co-authored-by: Antoine RICHARD <[email protected]> Signed-off-by: Zeng Qingcheng <[email protected]>
|
that's definitely a better choice. fix done:) @AntoineRichard |
|
Thanks @NeoZng! @ooctipus @kellyguo11 this one looks good to me, could you guys take a look :) |
|
run-ci |
|
run-ci |
# Description Backports the following merged `develop` PRs to `release/3.0.0`: - #7220 — prune unused Docker volumes on package-test runners - #7169 — cache the resolved OVRTX Warp device - #6889 — move the OVPhysX collider cache out of the Python interpreter directory - #7345 — document the registered XR camera PiP tasks - #7050 — update and reorganize the LEAPP documentation - #7473 — register external RSL-RL tasks before agent discovery - #7467 — update the China storage profile to Isaac Sim 6.1 - #7385 — accept legal float scale values when seeding Fabric frame views from USD - #7517 — use lazy exports in `isaaclab_rl` The duplicate #7517 in the original request is included once. Seven source commits replayed cleanly. Two required release-specific reconciliation: - #7169 retains the release branch's mapped OVRTX write path, which was removed separately on `develop`, while resolving and caching one Warp device for render-product IDs, mappings, and CUDA streams. - #7050 preserves the #7494 export-backend clarification that is already present on the release branch while applying the broader LEAPP documentation overhaul. No new dependencies are added. ## Type of change - Bug fix (non-breaking change which fixes an issue) - Performance improvement - Documentation update - CI/infrastructure update ## Release backport - [ ] <!-- backport-active-release --> This PR already targets the active release branch; do not backport it again. ## Validation - `uv run --no-project --with pytest python -m pytest -q .github/actions/run-package-tests/test_cleanup_docker_storage.py` — 10 passed - Nine isolated `isaaclab_rl` namespace/lazy-import regression cases passed - Resolved-device OVRTX mapping behavior check passed with Warp 1.16.0 - `uv run --no-project python -m compileall -q` on all changed Python modules and tests - `uv run --no-project python tools/changelog/cli.py check` against the exact `upstream/release/3.0.0` base - `pre-commit==4.6.2 run --all-files` passed all available hooks - `git diff --check upstream/release/3.0.0..HEAD` The full project test environment and documentation build cannot resolve on this macOS/arm64 host because the release lockfile supports Linux and Windows only. The Git LFS hook was also unavailable because `git-lfs` is not installed; none of the changed paths are LFS-tracked. Linux CI remains authoritative for simulator, OVRTX, Fabric, and full documentation validation. ## Checklist - [x] I have read and understood the contribution guidelines - [x] I have run the available formatting and static checks - [x] I have included the corresponding documentation changes - [x] Each touched source package includes its original changelog fragment - [x] Every backported commit records its source commit with `cherry picked from commit` - [x] The original contributors are preserved as commit authors --------- Signed-off-by: Zeng Qingcheng <[email protected]> Co-authored-by: myurasov-nv <[email protected]> Co-authored-by: Peter Verswyvelen <[email protected]> Co-authored-by: pv-nvidia <[email protected]> Co-authored-by: hujc <[email protected]> Co-authored-by: hougantc-nvda <[email protected]> Co-authored-by: Frank Lai NV <[email protected]> Co-authored-by: peterd-NV <[email protected]> Co-authored-by: Sheikh Dawood <[email protected]> Co-authored-by: Zeng Qingcheng <[email protected]> Co-authored-by: Antoine RICHARD <[email protected]> Co-authored-by: Mustafa H <[email protected]>
Description
UsdFrameView._get_local_scales_impl()stores authored USD scale values in aVt.Vec3dArray. A legalxformOp:scalemay return aGf.Vec3h,Gf.Vec3f, orGf.Vec3d, but USD's Python bindings do not implicitly convert a differently typedGfvector duringVt.Vec3dArrayitem assignment. In particular, an authoredfloat3scale raisesTypeErrorwhen aFabricFrameViewfirst seeds its matrices from USD.This change converts the three numeric components explicitly to
Gf.Vec3dbefore inserting them into the existingVt.Vec3dArray. It deliberately preserves both sides of the current contract: the USD-side intermediate remains double precision, while the publicProxyArrayreturned to FrameView consumers remainswp.float32/torch.float32. USD, Fabric, and OVPhysX callers therefore continue to receive the existing FP32 result. No authored USD type is rewritten, and pose composition, FK, scale writers, and world-scale behavior are unchanged.Regression coverage:
half3,float3, anddouble3scale ops throughUsdFrameViewand verifies the existing FP32 public output contract;FabricFrameViewfrom an authoredfloat3Sphere through the firstget_world_poses()call, then verifies finite, correctly typed pose and scale results.No additional dependencies are required.
Type of change
Release backport
developChecklist
Docker and GPU tests run on demand. Push the commits you want tested, then
comment
run-cion the pull request.pre-commitchecks with./isaaclab.sh --formatsource/<pkg>/changelog.d/for every touched package (do not editCHANGELOG.rstor bumpextension.toml— CI handles that)CONTRIBUTORS.mdor my name already exists there