Skip to content

Minor Updates & Patches to Visualizers - #5610

Merged
matthewtrepte merged 22 commits into
isaac-sim:developfrom
matthewtrepte:mtrepte/update_and_debug_viz
May 20, 2026
Merged

matthewtrepte merged 22 commits into
isaac-sim:developfrom
matthewtrepte:mtrepte/update_and_debug_viz

Conversation

@matthewtrepte

@matthewtrepte matthewtrepte commented May 13, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Contains a few minor updates and patches to visualizers.

  • Disable default browser launch to Rerun & Viser visualizers
  • Add explicit logging urls to Rerun & Viser which appear before simulation loop
  • Reduce visualizer num sim steps in unit tests
  • Unskip all visualizer cartpole integration tests
  • Add focal length to visualizer cfg, for flexibility, align default visualizer cams, and add more consistency to tests
  • Expand pausing checks for Kit & Rerun tests
  • Fix frozen robot bodies in newton visualizers with physx
  • Add a save visualizer test captures mode to visualizer cartpole unit test (disabled by default)
  • Re-enable visualization markers when no visualizer is launched
  • Fix Newton Visualizer visualization marker regression
  • Expose remote desktop config for Viser Visualizer
  • Align Viser Visualizer docs with other visualizers
  • Update docs to reflect the changes

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Documentation update

Screenshots

Please attach before and after screenshots of the change if applicable.

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 bug Something isn't working documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team labels May 13, 2026

@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

Summary

This PR improves visualizer UX by disabling automatic browser launch and introduces a unified RL training infrastructure.

Commit Range Reviewed

  • Previous SHA: 95017233e23a886c6f5ce7ebd2b86a0f5ed9b9c8
  • Current SHA: dc105496cc7574163c3e7df15adf8a811decb66b

Incremental Changes (Latest Review)

The new commits add significant RL training infrastructure:

1. Unified CLI Entrypoints (scripts/reinforcement_learning/train.py, play.py)

  • Adds --rl_library dispatch to select RL framework (rl_games, rsl_rl, skrl, sb3, rlinf)
  • Clean separation via common.py shared utilities

2. Per-Library Implementations (new train_<lib>.py and play_<lib>.py)

  • Consistent argument parsing via add_common_train_args()
  • Deprecation warnings added to old standalone scripts

3. URDF/MJCF Converter Updates

  • Refactored to delegate to Isaac Sim importer pipeline
  • New config options: robot_type, run_asset_transformer, debug_mode, actuator gain overrides

4. CLI Updates (isaaclab/cli/__init__.py, utils.py)

  • Added train and play console script entry points
  • Script alias resolution for isaaclab -p train.py

5. Newton Cloner Fix (isaaclab_newton/cloner/newton_replicate.py)

  • Fixed boundary-safe path prefix matching in _rename_builder_labels

Previous Review Comments

The three inline comments from the initial review remain actionable (files unchanged in this commit range):

  • simulation_cfg.py - Docstring/default mismatch for use_fabric
  • test_simulation_context_visualizers.py - open_browser KeyError bug
  • base_visualizer.py - WARNING log level for informational URL

New Changes Assessment

✅ No new critical issues in the incremental changes.


Incremental review update: May 15, 2026

if app is not None and app.is_running():
# Keep app pumping for viewport/UI updates only; physics is owned by SimulationContext.
# Disable playSimulations around app.update() so Kit does not advance its own physics here.
# Newton is not driven by Kit's player loop, so avoid toggling the setting; the Kit

@matthewtrepte matthewtrepte May 13, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

todo(mtrepte): look into why this is necessary to fix play/pause with newton physics
i don't think we should need to toggle kit physics with using newton physics

@greptile-apps

greptile-apps Bot commented May 13, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR makes several focused improvements to the Isaac Lab visualizer stack: browser auto-launch is disabled by default for Rerun and Viser (replaced by a highlighted URL in startup logs), visualization markers are re-enabled when rendering is active but no standalone visualizer is launched, and Kit-visualizer play/pause behaviour is fixed for Newton physics.

  • open_browser=False default – both RerunVisualizerCfg and ViserVisualizerCfg flip their default; a new _log_viewer_url banner in BaseVisualizer surfaces the URL at WARNING level so it is always visible.
  • visualization_markers.py fix – _ensure_backends_initialized now checks sim.is_rendering so USD markers work when no external visualizer is launched.
  • NewtonManager timeline controls – play, pause, stop, and wait_for_playing class methods added; KitVisualizer skips the playSimulations guard when the Newton backend is active so Kit's own timeline UI remains functional.

Confidence Score: 3/5

Two concrete defects should be fixed before merging: a docstring that misreports the use_fabric default, and a test assertion that will always raise KeyError at runtime.

The use_fabric docstring change inverts the documented default relative to the actual field value. The test assertion on captured["init"]["open_browser"] will always raise KeyError because open_browser is never inserted into that dict. The rest of the changes are solid.

source/isaaclab/isaaclab/sim/simulation_cfg.py (docstring default) and source/isaaclab/test/sim/test_simulation_context_visualizers.py (failing assertion) need attention before merge.

Important Files Changed

Filename Overview
source/isaaclab/isaaclab/sim/simulation_cfg.py Docstring for use_fabric updated to say "Default is False" but the field is still initialised to True — incorrect documentation.
source/isaaclab/test/sim/test_simulation_context_visualizers.py New assertion captured["init"]["open_browser"] is False will raise KeyError because the fake class and the real implementation never pass open_browser to NewtonViewerViser.
source/isaaclab/isaaclab/visualizers/base_visualizer.py Added _log_viewer_url static method and changed init-table to logger.debug; URL box uses logger.warning for visibility, which is semantically misleading for an informational message.
source/isaaclab_visualizers/isaaclab_visualizers/rerun/rerun_visualizer.py Adds open_browser opt-in via monkey-patching rr.serve_web_viewer and logs the viewer URL; also fixes quote(safe=':/') for cleaner URLs. Bare print() bypasses logger.
source/isaaclab_visualizers/isaaclab_visualizers/viser/viser_visualizer.py Removes log-suppression wrapper; open_browser now handled by a conditional _open_viser_web_viewer call post-construction. Bare print() bypasses logger.
source/isaaclab_newton/isaaclab_newton/physics/newton_manager.py Adds play, pause, stop, and wait_for_playing class methods wrapping the Kit timeline interface; guarded by _get_kit_timeline_and_app which gracefully handles missing Kit imports.
source/isaaclab_visualizers/isaaclab_visualizers/kit/kit_visualizer.py Records _physics_backend at init time and skips the playSimulations guard when backend is Newton, preserving Kit timeline play/pause semantics.
source/isaaclab/isaaclab/markers/visualization_markers.py Adds is_rendering check to _ensure_backends_initialized so USD markers are usable when no standalone visualizer is launched.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Visualizer launch] --> B{open_browser?}
    B -- True --> C[Open browser tab]
    B -- False --> D[Log URL box at WARNING level]
    D --> E[User Ctrl-clicks URL]
    C --> F[Viewer ready]
    E --> F

    G[VisualizationMarkers._ensure_backends_initialized] --> H{sim available?}
    H -- No --> I[_ensure_kit_backend]
    H -- Yes --> J{sim.is_rendering OR kit visualizer active?}
    J -- Yes --> I
    J -- No --> K{Newton visualizer active?}
    K -- Yes --> L[_ensure_newton_backend]
    K -- No --> M[No backend initialized]
Loading

Comments Outside Diff (1)

  1. source/isaaclab_visualizers/isaaclab_visualizers/rerun/rerun_visualizer.py, line 697-698 (link)

    P2 Bare print() bypasses the logging subsystem

    print() writes directly to stdout, which will not respect any log-level filters, structured logging formatters, or output redirection set up by the caller (e.g. redirect_stdout, pytest's output capture, or log shipping sidecar processes). The same pattern also appears in viser_visualizer.py at the NewtonViewerViser construction site. Using logger.info("\n") or a blank line inside the _log_viewer_url banner itself would keep all output in the logging pipeline.

Reviews (1): Last reviewed commit: "lint/changelog frags/clean" | Re-trigger Greptile

Comment on lines +205 to +206
use_fabric: bool = True
"""Enable/disable reading of physics buffers directly. Default is True.
"""Enable/disable reading of physics buffers directly. Default is False.

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.

P1 The docstring says "Default is False" but use_fabric is initialised to True. This will mislead users who rely on documentation or IDE tooltips to understand the default behaviour.

Suggested change
use_fabric: bool = True
"""Enable/disable reading of physics buffers directly. Default is True.
"""Enable/disable reading of physics buffers directly. Default is False.
use_fabric: bool = True
"""Enable/disable reading of physics buffers directly. Default is True.

visualizer._create_viewer(record_to_viser="record.viser", metadata={"num_envs": 8})

assert captured["set_model"] == "dummy-model"
assert captured["init"]["open_browser"] is False

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.

P1 Test will fail with KeyError – open_browser is never captured

_FakeNewtonViewerViser.__init__ (lines 491-508) builds captured["init"] from its explicitly declared parameters (port, label, verbose, share, record_to_viser, metadata). It does not accept an open_browser argument, and the real ViserVisualizer._create_viewer does not pass open_browser to NewtonViewerViser at all — the flag is consumed locally to decide whether to call _open_viser_web_viewer. Therefore captured["init"]["open_browser"] will raise KeyError every time this parametrized test runs.

Comment on lines +332 to +341
logger.warning(
"\n%s\n%s\n%s\n%s\n%s\n%s server running at: %s\n",
f"╭{'─' * left_rule_width}{title}{'─' * right_rule_width}╮",
f"│{' ' * (label_width + 4)}╷{' ' * (value_width + 4)}│",
f"│ {'HTTP':<{label_width}} │ {viewer_url:<{value_width}} │",
f"│{' ' * (label_width + 4)}╵{' ' * (value_width + 4)}│",
f"╰{'─' * inner_width}╯",
visualizer_label.capitalize(),
viewer_url,
)

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.

P2 Informational URL banner logged at WARNING level

_log_viewer_url emits the startup URL box via logger.warning(...). In production log aggregators (e.g. Grafana, CloudWatch, ELK) WARNING-level entries are surfaced as alerts or counted toward error budgets. The intent is clearly informational; logger.info would achieve the same goal for operators who have their log level at INFO, and the print() call placed just before the invocation already guarantees terminal visibility.

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!

@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

Summary

This PR makes sensible UX improvements to visualizers: disabling auto-browser launch by default (preferring URL logging), adding Viser remote access configuration, fixing marker initialization when rendering without standalone visualizers, and adding play/pause controls.


✅ Latest Commit Review: cdf8f246 ("prep for review")

This commit improves the scene data provider integration across visualizers:

1. LGTM: Scene Data Provider Passthrough ✅

NewtonManager.get_state() now accepts an optional scene_data_provider parameter:

def get_state(cls, scene_data_provider=None) -> State:
    cls.update_visualization_state(scene_data_provider)
    return cls.get_state_0()

This enables proper backend detection without relying solely on global PhysicsManager._sim state.

2. LGTM: Backend Detection Improvement ✅

_backend_is_newton() now checks the provider's backend type directly when available:

def _backend_is_newton(cls, scene_data_provider=None) -> bool:
    if scene_data_provider is not None:
        return isinstance(scene_data_provider.backend, NewtonSceneDataBackend)
    # fallback to global sim check

3. LGTM: Internal Attribute Renaming ✅

PhysX-specific naming generalized for clarity:

  • _physx_visualization_scene_data → _visualization_scene_data
  • _physx_visualization_mapping → _visualization_mapping

4. LGTM: Visualizer Updates ✅

All visualizers (Newton, Rerun, Viser) now pass their scene data provider to get_state():

self._state = NewtonManager.get_state(self._scene_data_provider)

5. LGTM: Test Coverage ✅

  • Unit tests updated with new method signatures
  • Mock lambdas now accept scene_data_provider=None
  • Integration tests verify provider passthrough

6. Minor: Code Formatting ✅

  • Import ordering (isort-style) in several files
  • Line break cleanup in test assertions

Previous Review Summary

  • ✅ Merge conflict resolved
  • ✅ Focal length configuration
  • ✅ KitVisualizer camera ownership
  • ✅ Headless test mode

Verdict: ✅ Ready for merge. Clean provider-aware refactor with comprehensive test updates.

Updated: 2026-05-19T00:47:00Z
Head SHA: cdf8f24
Previous SHA: 1e13eac

Rebase the PR onto current develop and keep only the branch-specific visualizer changes.
@matthewtrepte
matthewtrepte force-pushed the mtrepte/update_and_debug_viz branch from 852a9c7 to 9afef86 Compare May 18, 2026 21:17

@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 — Update

✅ New Commits Review (since cbff0e8)

Five new commits pushed (plus develop merges):


1. Develop Merge ✅ (3793f82)

Standard merge commit pulling latest develop changes. No concerns.


2. CI Image Unpin + Error Message Tweak ✅ (3eb9f1c)

  • Unpins the Isaac Sim image version for CI
  • Tweaks error message in visualizer test

Good CI hygiene — tracking latest develop image and improving diagnostics.


3. Test Reorganization ✅ (23adaf9)

Moves updated visualizer integration tests into a separate new PR to merge back after Isaac Sim CI is moved to latest develop.

Rationale: Avoids CI flakiness on the pinned image while allowing core visualizer fixes to merge now. Follow-up PR will restore full coverage.


4. Skip Flaky Test ✅ (0dbbe0e)

@pytest.mark.skip(reason="ViewerGL frame motion is flaky on the current pinned Isaac Sim CI image.")
def test_cartpole_newton_visualizer_viewergl_rgb_motion(...):

Temporary skip with clear reason documented. Appropriate given the upstream CI image constraints.


5. Final Develop Merge ✅ (46272e6)

Standard merge commit. No conflicts.


Summary

All new commits are CI/test housekeeping:

  1. Develop syncs (2 merge commits)
  2. CI image unpin for stability
  3. Test deferral to follow-up PR (strategic)
  4. Flaky test skip (documented reason)

Core visualizer fixes from original review remain intact. The approach of splitting flaky tests into a follow-up PR is pragmatic.


Verdict: ✅ Ready for merge.

Updated: 2026-05-19T23:35:00Z
Head SHA: 46272e6
Previous SHA: cbff0e8


🔄 Update (fd1e6b1a)

New commit adds a performance optimization for apply_external_force_torque:

Zero-Wrench Fast Path ✅

# Skip force application if the wrench ranges are zero
if force_range[0] == 0.0 and force_range[1] == 0.0 and torque_range[0] == 0.0 and torque_range[1] == 0.0:
    return

What it does:

  • Adds early return when force_range and torque_range are both exactly (0.0, 0.0)
  • Avoids unnecessary sampling + WrenchComposer overhead for no-op configurations

Why it matters:

  • Many tasks declare the event term but apply no disturbance (common default)
  • PR #5265 introduced a per-step regression for these cases
  • This restores H1, G1, and Anymal-C Velocity-Rough throughput

Assessment:

  • ✅ Clean, minimal change
  • ✅ Well-documented changelog entry
  • ✅ No behavior change for non-zero ranges
  • ✅ Addresses real performance regression

Verdict: ✅ Still ready for merge.

Updated: 2026-05-20T00:34:00Z
Head SHA: fd1e6b1
Previous SHA: 46272e6

@kellyguo11 kellyguo11 moved this from In progress to In review in Isaac Lab May 19, 2026
@matthewtrepte
matthewtrepte merged commit cd1ba91 into isaac-sim:develop May 20, 2026
64 of 65 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in Isaac Lab May 20, 2026
@pv-nvidia pv-nvidia mentioned this pull request Oct 9, 2026
6 of 8 tasks
ooctipus added a commit that referenced this pull request Oct 12, 2026
# Description

On GPU PhysX, the first camera observation from `env.reset()` showed
rigid bodies at their spawn pose. The state observations were correct. A
physics step made the image correct.

Fixes #8428. This PR includes the regression test from #8427 (commit by
@Jean-Francois-Lafleche).

## Root cause

The renderer is correct. Fabric is stale. After the first `env.reset()`
on `cuda:0`, the cube has these x positions:

| Source | x [m] |
| --- | --- |
| PhysX tensor view (`root_view.get_transforms()`) | -0.20 (reset pose)
|
| Fabric `omni:fabric:worldMatrix` | -0.35 (spawn pose) |
| Rendered silhouette | spawn pose |

The cause is the Fabric re-synchronization in `PhysxManager.play()`
(#5178, #5610). The sequence is:

1. `SimulationContext.reset()` calls `PhysxManager.play()` on the
initial stop-to-play transition.
2. `play()` calls `_sync_fabric_after_resume()`, which detaches and
re-attaches the `omni.physx.fabric` stage.
3. After the re-attach, `force_update()` ignores poses written through
the GPU tensor API until the next `simulate()`.
4. `ManagerBasedEnv.reset()` writes the reset pose through the GPU
tensor API. `forward()` calls `force_update()`, but Fabric keeps the
spawn pose.

These checks confirm the sequence:

* With `_re_sync_fabric()` disabled, the first reset frame shows the
reset pose at step 0.
* A raw `simulate()` before `env.reset()` also fixes the frame. The same
call at the end of `PhysxManager.reset()`, before `play()`, does not.
* `fabric.update()`, `fabricUseGPUInterop=false`, and an extra
detach/attach with `force_update()` do not fix the frame.
* The CPU pipeline is not affected.
* After the first physics step, later resets publish correctly without a
step. This is why the test from #7891 passes.

## Change

`PhysxManager.play()` now re-syncs Fabric only when the timeline resumes
from pause. A fresh stop-to-play transition does not need the #4279
workaround.

The #4279 workaround is still necessary on Isaac Sim 6.1. With the
re-sync removed completely, the Kit pause/resume test fails: the robot
stays frozen after resume (12 changed pixels, at least 100 required).

## Remaining PhysX defect

This PR avoids the defect at start-up only. The defect itself is in
`omni.physx.fabric` 110.3.2. After `detach_stage()` and
`attach_stage()`, `force_update()` does not publish GPU tensor API pose
writes until the next `simulate()`. The `force_update()` docstring says
that it updates Fabric "even if simulation did not run", so this
behavior is a PhysX defect. Thus, this sequence still returns a stale
first frame:

```python
sim.pause()
sim.play()      # re-attaches Fabric
env.reset()     # reset poses do not reach Fabric before a physics step
```

A PhysX ticket for this defect will be filed and linked in #8428. When
PhysX fixes it, Isaac Lab can remove the re-sync condition in `play()`.
If PhysX also fixes the #4279 resume freeze, Isaac Lab can remove the
detach/attach workaround.

## Validation

Isaac Sim 6.1.0.0, RTX A6000, driver 595.91.07:

| Test | Before | After |
| --- | --- | --- |
| `test_first_frame_textured_rendering.py` | first-reset test failed
(IoU 0.370) | 2 passed |
| `test_visualizer_integration_physx.py` (Kit pause/resume, #4279) | — |
passed |
| `test_simulation_context.py` | — | 26 passed |
| `test_simulation_context_kit.py` | — | 4 passed |

`test_visualizer_tiled_integration_physx.py` fails in my container with
`Canvas must be an instance of HeadlessCanvas` (pyglet). It fails the
same way without this change.

## Type of change

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

## Release backport

- [ ] <!-- backport-active-release --> 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.

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`uv run isaaclab --format`
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have validated the changed behavior with focused coverage and
applied the [test-audit
criteria](https://github.com/isaac-sim/IsaacLab/blob/develop/skills/developer/test-audit/SKILL.md)
to any test changes
- [x] I have added a changelog fragment under
`source/<pkg>/changelog.d/` for every touched package (do **not** edit
`CHANGELOG.rst` or bump package versions — CI handles that)
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

---------

Signed-off-by: JF Lafleche <[email protected]>
Co-authored-by: JF Lafleche <[email protected]>
Co-authored-by: pv-nvidia <[email protected]>
Co-authored-by: Octi Zhang <[email protected]>
pv-nvidia added a commit to pv-nvidia/pv-isaac-lab that referenced this pull request Oct 22, 2026
On GPU PhysX, the first camera observation from `env.reset()` showed
rigid bodies at their spawn pose. The state observations were correct. A
physics step made the image correct.

Fixes isaac-sim#8428. This PR includes the regression test from isaac-sim#8427 (commit by
@Jean-Francois-Lafleche).

The renderer is correct. Fabric is stale. After the first `env.reset()`
on `cuda:0`, the cube has these x positions:

| Source | x [m] |
| --- | --- |
| PhysX tensor view (`root_view.get_transforms()`) | -0.20 (reset pose)
|
| Fabric `omni:fabric:worldMatrix` | -0.35 (spawn pose) |
| Rendered silhouette | spawn pose |

The cause is the Fabric re-synchronization in `PhysxManager.play()`
(isaac-sim#5178, isaac-sim#5610). The sequence is:

1. `SimulationContext.reset()` calls `PhysxManager.play()` on the
initial stop-to-play transition.
2. `play()` calls `_sync_fabric_after_resume()`, which detaches and
re-attaches the `omni.physx.fabric` stage.
3. After the re-attach, `force_update()` ignores poses written through
the GPU tensor API until the next `simulate()`.
4. `ManagerBasedEnv.reset()` writes the reset pose through the GPU
tensor API. `forward()` calls `force_update()`, but Fabric keeps the
spawn pose.

These checks confirm the sequence:

* With `_re_sync_fabric()` disabled, the first reset frame shows the
reset pose at step 0.
* A raw `simulate()` before `env.reset()` also fixes the frame. The same
call at the end of `PhysxManager.reset()`, before `play()`, does not.
* `fabric.update()`, `fabricUseGPUInterop=false`, and an extra
detach/attach with `force_update()` do not fix the frame.
* The CPU pipeline is not affected.
* After the first physics step, later resets publish correctly without a
step. This is why the test from isaac-sim#7891 passes.

`PhysxManager.play()` now re-syncs Fabric only when the timeline resumes
from pause. A fresh stop-to-play transition does not need the isaac-sim#4279
workaround.

The isaac-sim#4279 workaround is still necessary on Isaac Sim 6.1. With the
re-sync removed completely, the Kit pause/resume test fails: the robot
stays frozen after resume (12 changed pixels, at least 100 required).

This PR avoids the defect at start-up only. The defect itself is in
`omni.physx.fabric` 110.3.2. After `detach_stage()` and
`attach_stage()`, `force_update()` does not publish GPU tensor API pose
writes until the next `simulate()`. The `force_update()` docstring says
that it updates Fabric "even if simulation did not run", so this
behavior is a PhysX defect. Thus, this sequence still returns a stale
first frame:

```python
sim.pause()
sim.play()      # re-attaches Fabric
env.reset()     # reset poses do not reach Fabric before a physics step
```

A PhysX ticket for this defect will be filed and linked in isaac-sim#8428. When
PhysX fixes it, Isaac Lab can remove the re-sync condition in `play()`.
If PhysX also fixes the isaac-sim#4279 resume freeze, Isaac Lab can remove the
detach/attach workaround.

Isaac Sim 6.1.0.0, RTX A6000, driver 595.91.07:

| Test | Before | After |
| --- | --- | --- |
| `test_first_frame_textured_rendering.py` | first-reset test failed
(IoU 0.370) | 2 passed |
| `test_visualizer_integration_physx.py` (Kit pause/resume, isaac-sim#4279) | — |
passed |
| `test_simulation_context.py` | — | 26 passed |
| `test_simulation_context_kit.py` | — | 4 passed |

`test_visualizer_tiled_integration_physx.py` fails in my container with
`Canvas must be an instance of HeadlessCanvas` (pyglet). It fails the
same way without this change.

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

- [ ] <!-- backport-active-release --> Backport this pull request to the
active release branch after it merges into `develop`

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

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`uv run isaaclab --format`
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have validated the changed behavior with focused coverage and
applied the [test-audit
criteria](https://github.com/isaac-sim/IsaacLab/blob/develop/skills/developer/test-audit/SKILL.md)
to any test changes
- [x] I have added a changelog fragment under
`source/<pkg>/changelog.d/` for every touched package (do **not** edit
`CHANGELOG.rst` or bump package versions — CI handles that)
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

Conflict: source/isaaclab_visualizers/test/golden_images/anymal_d/physx-kit-tiled.png keeps the
release version. The release refreshed this golden for the published 6.2 checkerboard (isaac-sim#8685),
and the version from PR 8433 predates that refresh. The test
test_visualizer_golden[physx-anymal_d-kit-tiled] passes with the kept golden.

---------

Signed-off-by: JF Lafleche <[email protected]>
Co-authored-by: JF Lafleche <[email protected]>
Co-authored-by: pv-nvidia <[email protected]>
Co-authored-by: Octi Zhang <[email protected]>
(cherry picked from commit 4eccae0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation infrastructure isaac-lab Related to Isaac Lab team isaac-mimic Related to Isaac Mimic team

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant