Skip to content

Fix float scale reads in UsdFrameView through Fabric - #7385

Merged
kellyguo11 merged 3 commits into
isaac-sim:developfrom
NeoZng:fix/usd-frame-view-float-scale
Sep 3, 2026
Merged

kellyguo11 merged 3 commits into
isaac-sim:developfrom
NeoZng:fix/usd-frame-view-float-scale

Conversation

@NeoZng

@NeoZng NeoZng commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Description

UsdFrameView._get_local_scales_impl() stores authored USD scale values in a Vt.Vec3dArray. A legal xformOp:scale may return a Gf.Vec3h, Gf.Vec3f, or Gf.Vec3d, but USD's Python bindings do not implicitly convert a differently typed Gf vector during Vt.Vec3dArray item assignment. In particular, an authored float3 scale raises TypeError when a FabricFrameView first seeds its matrices from USD.

This change converts the three numeric components explicitly to Gf.Vec3d before inserting them into the existing Vt.Vec3dArray. It deliberately preserves both sides of the current contract: the USD-side intermediate remains double precision, while the public ProxyArray returned to FrameView consumers remains wp.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:

  • reads legal half3, float3, and double3 scale ops through UsdFrameView and verifies the existing FP32 public output contract;
  • initializes a production PhysX FabricFrameView from an authored float3 Sphere through the first get_world_poses() call, then verifies finite, correctly typed pose and scale results.

No additional dependencies are required.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Release backport

  • Backport this pull request to the active release branch after it merges into develop

Checklist

Docker and GPU tests run on demand. Push the commits you want tested, then
comment run-ci on the pull request.

@github-actions github-actions Bot added bug Something isn't working isaac-lab Related to Isaac Lab team labels Aug 27, 2026
@NeoZng
NeoZng marked this pull request as ready for review August 27, 2026 15:52
@NeoZng
NeoZng requested a review from a team August 27, 2026 15:52

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-apps

greptile-apps Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR normalizes legal half-, float-, and double-precision USD scale vectors to Gf.Vec3d at the existing staging boundary, preventing Fabric initialization from rejecting float3 scales.

  • Preserves the existing float32 Warp and Torch ProxyArray contract.
  • Adds precision coverage for USD frame views and an end-to-end Fabric initialization regression test.
  • Adds the corresponding changelog fragments and contributor entry.

Confidence Score: 5/5

The 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

Filename Overview
source/isaaclab/isaaclab/sim/views/usd_frame_view.py Explicitly converts all three authored scale components to Gf.Vec3d before assigning them to the existing Vt.Vec3dArray; no actionable regression was identified.
source/isaaclab/test/sim/test_views_xform_prim.py Adds focused half3, float3, and double3 coverage while asserting the existing float32 output contract.
source/isaaclab_physx/test/sim/test_views_xform_prim_fabric.py Adds an end-to-end float3 scale regression test for Fabric initialization with cleanup consistent with the module fixtures.

Reviews (1): Last reviewed commit: "Fix float scale reads in UsdFrameView" | Re-trigger Greptile

@AntoineRichard AntoineRichard left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]>
@NeoZng

NeoZng commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

that's definitely a better choice. fix done:) @AntoineRichard

@AntoineRichard

Copy link
Copy Markdown
Collaborator

Thanks @NeoZng! @ooctipus @kellyguo11 this one looks good to me, could you guys take a look :)

@kellyguo11

Copy link
Copy Markdown
Contributor

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Sep 3, 2026
@kellyguo11

Copy link
Copy Markdown
Contributor

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Sep 3, 2026
@kellyguo11
kellyguo11 merged commit f5f7ff6 into isaac-sim:develop Sep 3, 2026
47 of 48 checks passed
kellyguo11 added a commit that referenced this pull request Sep 4, 2026
# 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]>
@NeoZng
NeoZng deleted the fix/usd-frame-view-float-scale branch November 3, 2026 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants