Skip to content

Fix for regression where Dexsuite robot arm only appears in env_0 for Newton + IsaacRTX#6204

Open
rilei-nvidia wants to merge 1 commit into
isaac-sim:developfrom
rilei-nvidia:newton-isaac-rtx-usd-replication
Open

Fix for regression where Dexsuite robot arm only appears in env_0 for Newton + IsaacRTX#6204
rilei-nvidia wants to merge 1 commit into
isaac-sim:developfrom
rilei-nvidia:newton-isaac-rtx-usd-replication

Conversation

@rilei-nvidia

@rilei-nvidia rilei-nvidia commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Description

Fix for regression where Dexsuite robot arm only appears in env_0 for Newton + IsaacRTX

When using the Newton physics backend, USD prims were not being replicated into the cloned environments.
I've added calls to queue_usd_replication before each of the queue_newton_physics_replication sites. This fixes the rendering correctness tests.

However, when training with the kit visualizer:

./isaaclab.sh train --rl_library rsl_rl \
    --task Isaac-Lift-KukaAllegro-Camera \
    presets=newton_mjwarp,isaacsim_rtx_renderer,rgb64,single_camera \
    --seed 42 \
    --num_envs 4 \
    --max_iterations 100 \
    --visualizer kit

Only env_0's robot is visible - but that seems to be a separate and intentional design choice by the authoring of the omni:scenePartition attribute/primvar on each env's Scope prim and on the camera (which controls which env is visible):
https://github.com/isaac-sim/IsaacLab/blob/develop/source/isaaclab_physx/isaaclab_physx/renderers/isaac_rtx_renderer.py#L182

Using the physx,isaacsim_rtx_renderer,rgb64,single_camera preset exhibits the same behavior where only env_0 is visible in the viewport.

Screenshots

Before the addition of the queue_usd_replication calls to the IsaacLab newton physics integration, we will notice that the robot and table USD prims for env 1-3 are not present in the outliner. After the addition of the calls, they are:

Before After
image image

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the changelog and the corresponding version in the extension's config/extension.toml file
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label Jun 17, 2026
@rilei-nvidia rilei-nvidia force-pushed the newton-isaac-rtx-usd-replication branch from 6cf4b27 to a4288b4 Compare June 17, 2026 00:52
@rilei-nvidia rilei-nvidia marked this pull request as ready for review June 17, 2026 00:52
@rilei-nvidia rilei-nvidia changed the title Draft: Fix for regression where Dexsuite robot arm only appears in env_0 for Newton + IsaacRTX Fix for regression where Dexsuite robot arm only appears in env_0 for Newton + IsaacRTX Jun 17, 2026
@rilei-nvidia rilei-nvidia requested a review from huidongc June 17, 2026 00:52
@greptile-apps

greptile-apps Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This draft PR fixes a regression in the Newton physics backend where USD prims were only being replicated into env_0 instead of all cloned environments. The fix aligns the Newton asset constructors with their PhysX counterparts by adding a queue_usd_replication(cfg) call before each queue_newton_physics_replication(cfg) call.

  • Adds queue_usd_replication(cfg) to the __init__ of Newton Articulation, RigidObject, and RigidObjectCollection, exactly mirroring the call sequence already present in the PhysX equivalents (queue_usd_replicationqueue_physx_replication).
  • Updates the eight dexsuite_kuka_hetero golden images for the Newton + IsaacRTX render path to reflect correct multi-environment USD prim population.

Confidence Score: 4/5

The three one-line additions mirror an established pattern from the PhysX backend and cannot cause duplicate replication because replicate() deduplicates by taking the union of row sets keyed on id(cfg). The golden images are correctly updated to reflect the now-populated multi-environment scene.

The fix is targeted and correct. The only open item is a cosmetic import placement in articulation.py that the pre-commit formatter will catch; none of the unchecked checklist items block correctness of this change.

No files require special attention beyond the import ordering nit in articulation.py.

Important Files Changed

Filename Overview
source/isaaclab_newton/isaaclab_newton/assets/articulation/articulation.py Adds queue_usd_replication(cfg) before queue_newton_physics_replication(cfg) in init; import placed after the _HAS_NEWTON_ACTUATORS module-level expression rather than in the first isaaclab import block.
source/isaaclab_newton/isaaclab_newton/assets/rigid_object/rigid_object.py Adds queue_usd_replication(cfg) before queue_newton_physics_replication(cfg) in init; import placement and call site are consistent with the PhysX counterpart.
source/isaaclab_newton/isaaclab_newton/assets/rigid_object_collection/rigid_object_collection.py Adds queue_usd_replication(source_rigid_object_cfgs[rigid_body_name]) inside the per-object loop, correctly using the original (pre-copy) cfg object to match how replicate() looks up rows by id(cfg).
source/isaaclab_newton/changelog.d/newton-isaac-rtx-usd-replication.rst New changelog fragment correctly describes the fix across all three Newton asset classes.
source/isaaclab_tasks/test/golden_images/dexsuite_kuka_hetero/newton-isaacsim_rtx_renderer-rgb.png Golden image updated (LFS pointer); larger file size is expected since the corrected scene now includes robot and table prims in all environments.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    participant Caller
    participant NewtonAsset as Newton Asset __init__
    participant BaseAsset as BaseAsset.__init__
    participant RepQueue as REPLICATION_QUEUE
    participant Replicate as replicate()

    Caller->>NewtonAsset: Articulation(cfg) / RigidObject(cfg)
    NewtonAsset->>BaseAsset: super().__init__(cfg)
    BaseAsset-->>NewtonAsset: (spawns USD prim)
    NewtonAsset->>RepQueue: queue_usd_replication(cfg) NEW
    NewtonAsset->>RepQueue: queue_newton_physics_replication(cfg)
    Note over RepQueue: Both (cfg, UsdReplicateContext) and (cfg, NewtonReplicateContext) are queued

    Caller->>Replicate: "replicate(plan, stage=stage)"
    Replicate->>RepQueue: drain queue
    Replicate->>Replicate: group by BackendCtxCls, union row sets
    Replicate->>Replicate: UsdReplicateContext.replicate() copies USD prims to env_1..N
    Replicate->>Replicate: NewtonReplicateContext.replicate() copies physics data to env_1..N
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
    participant Caller
    participant NewtonAsset as Newton Asset __init__
    participant BaseAsset as BaseAsset.__init__
    participant RepQueue as REPLICATION_QUEUE
    participant Replicate as replicate()

    Caller->>NewtonAsset: Articulation(cfg) / RigidObject(cfg)
    NewtonAsset->>BaseAsset: super().__init__(cfg)
    BaseAsset-->>NewtonAsset: (spawns USD prim)
    NewtonAsset->>RepQueue: queue_usd_replication(cfg) NEW
    NewtonAsset->>RepQueue: queue_newton_physics_replication(cfg)
    Note over RepQueue: Both (cfg, UsdReplicateContext) and (cfg, NewtonReplicateContext) are queued

    Caller->>Replicate: "replicate(plan, stage=stage)"
    Replicate->>RepQueue: drain queue
    Replicate->>Replicate: group by BackendCtxCls, union row sets
    Replicate->>Replicate: UsdReplicateContext.replicate() copies USD prims to env_1..N
    Replicate->>Replicate: NewtonReplicateContext.replicate() copies physics data to env_1..N
Loading

Comments Outside Diff (1)

  1. source/isaaclab_newton/isaaclab_newton/assets/articulation/articulation.py, line 28-34 (link)

    P2 The new import is placed after the _HAS_NEWTON_ACTUATORS module-level expression rather than in the first isaaclab import block above it (where from isaaclab.actuators, from isaaclab.assets, and from isaaclab.sim already live). In the PhysX counterpart queue_usd_replication sits in that first block. Isort's force_sort_within_sections rule will flag this once ./isaaclab.sh --format is run — moving it up keeps both files consistent and avoids a pre-commit failure.

    Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Reviews (1): Last reviewed commit: "isaaclab_newton: Added calls to queue_us..." | Re-trigger Greptile

@huidongc huidongc requested a review from ooctipus June 17, 2026 02:17
@huidongc

Copy link
Copy Markdown
Collaborator

I am not the best to review this pr. Let's ask @ooctipus .

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

Labels

isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants