Skip to content

Expand Visualizer Tests and Patch Visualizer Bugs - #5103

Merged
matthewtrepte merged 46 commits into
isaac-sim:developfrom
matthewtrepte:mtrepte/update_viz_2
Apr 21, 2026
Merged

matthewtrepte merged 46 commits into
isaac-sim:developfrom
matthewtrepte:mtrepte/update_viz_2

Conversation

@matthewtrepte

@matthewtrepte matthewtrepte commented Mar 24, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Tests

Newton Visualizer

  • Fix "Pause/Resume Rendering" button
  • Change "Pause/Resume Training" to "Pause/Resume Simulation"

Kit Visualizer

  • Fix recording in headless mode
  • Resolve overlapping camera cfg behavior in ViewerCfg and KitVisualizerCfg (will likely need another PR + design to streamline the cfgs)

Rerun Visualizer

  • Fix issue when launching rerun + newton physics without KitVisualizer

RTX Renderer

  • Fix stale image issue after resets which require Kit Visualizer's continuous app updates to avoid
  • Fix strange wrist camera orientation offset issue

Else

  • Rename camera_position/camera_target_position fields to eye/lookat across the board

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (existing functionality will not work without user modification)
  • 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 the isaac-lab Related to Isaac Lab team label Mar 24, 2026
@greptile-apps

greptile-apps Bot commented Mar 24, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR expands visualizer test coverage with Cartpole integration tests (non-black frame and motion checks), adds regression tests from #5056, and fixes several bugs: the Newton viewer "Pause/Resume" button labels, stale RTX images after resets, Rerun launching without KitVisualizer, Kit headless recording, and overlapping ViewerCfg/KitVisualizerCfg camera config. It also renames camera_position/camera_target_position fields to eye/lookat across the board and adds a deprecation warning to ViewerCfg.

  • The PR checklist shows Changelog and extension.toml version bump are unchecked. Per AGENTS.md, every change targeting source/ must ship with new version headings in the relevant CHANGELOG.rst files and matching version bumps in config/extension.toml.
  • The eye/lookat rename is a breaking API change; AGENTS.md requires deprecating old names before removal.

Confidence Score: 5/5

Safe to merge; all findings are P2 style/UX concerns with no correctness or data-integrity issues.

No P0 or P1 issues found. The is_training_paused()/playSimulations interaction was already flagged in a prior thread. Remaining items — missing render_product cleanup, browser-open skipped for new Rerun server, missing SimulationContext guard at test start, and missing CHANGELOG/version bump — are all P2 quality concerns that do not affect runtime correctness.

source/isaaclab_visualizers/test/test_visualizer_cartpole_integration.py (test isolation and resource cleanup), source/isaaclab_visualizers/isaaclab_visualizers/kit/kit_visualizer.py (is_training_paused flag overlap)

Important Files Changed

Filename Overview
source/isaaclab_visualizers/test/test_visualizer_cartpole_integration.py New integration test suite for all four visualizer backends × two physics backends; well-structured with helpers and parametrize, but missing SimulationContext.clear_instance() at test start and render_product cleanup in the Kit test.
source/isaaclab_visualizers/isaaclab_visualizers/kit/kit_visualizer.py Rewrites step() to guard playSimulations around app.update(); is_training_paused() now reads the same setting, creating a brief window where it returns True during every step() call.
source/isaaclab_physx/isaaclab_physx/renderers/isaac_rtx_renderer_utils.py Adds ensure_isaac_rtx_render_update() with per-step dedup key to fix stale RTX images after resets; correctly skips when KitVisualizer is already pumping app.update().
source/isaaclab/isaaclab/envs/common.py Adds DeprecationWarning to ViewerCfg.post_init whenever any field deviates from its default, directing users to configure viewport via KitVisualizerCfg/NewtonVisualizerCfg instead.
source/isaaclab/isaaclab/visualizers/visualizer_cfg.py Renames camera_position/camera_target_position to eye/lookat; no backward-compat shim for the renamed fields.
source/isaaclab_visualizers/isaaclab_visualizers/rerun/rerun_visualizer.py Fixes rerun initialization without KitVisualizer; open_browser only fires when connecting to an existing server to avoid premature browser open before the server is ready.
source/isaaclab/test/sim/test_simulation_context_visualizers.py New unit tests for SimulationContext visualizer orchestration with good fake/monkeypatch coverage for training-pause, rendering-pause, app-pumping dedup, and CLI handling.
source/isaaclab_physx/isaaclab_physx/renderers/kit_viewport_utils.py New helper set_kit_renderer_camera_view() extracted from SimulationContext to keep the core backend-agnostic.

Sequence Diagram

sequenceDiagram
    participant Env as DirectRLEnv
    participant SC as SimulationContext
    participant PM as PhysicsManager
    participant KitViz as KitVisualizer
    participant RTX as ensure_rtx_render_update()
    participant App as omni.kit.app

    Env->>SC: step(render=True)
    SC->>PM: step()
    SC->>SC: render()
    SC->>PM: pre_render()
    SC->>SC: update_visualizers(dt)
    SC->>KitViz: is_training_paused()?
    KitViz-->>SC: reads /app/player/playSimulations
    SC->>KitViz: step(dt)
    KitViz->>App: set playSimulations=False
    KitViz->>App: app.update()
    KitViz->>App: set playSimulations=True
    SC->>PM: after_visualizers_render()
    Note over PM,RTX: PhysxManager calls ensure_rtx_render_update()
    RTX->>SC: check any viz.pumps_app_update()?
    alt KitVisualizer active
        RTX-->>PM: skip - KitViz already pumped
    else No KitVisualizer
        RTX->>App: set playSimulations=False
        RTX->>App: app.update()
        RTX->>App: set playSimulations=True
    end
Loading

Reviews (2): Last reviewed commit: "Merge branch 'develop' into mtrepte/upda..." | Re-trigger Greptile

Comment thread source/isaaclab/setup.py Outdated
@@ -22,6 +22,7 @@
"torch>=2.10",
"onnx>=1.18.0", # 1.16.2 throws access violation on Windows
"prettytable==3.3.0",
"munch",

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 munch dependency has no version constraint

All other dependencies in this file are pinned or have minimum version bounds (e.g. torch>=2.10, prettytable==3.3.0). An unpinned munch can silently pull in a breaking release. Consider adding a lower bound that has been verified to work:

Suggested change
"munch",
"munch>=4.0.0",

Comment on lines 105 to 113
try:
import omni.kit.app

from isaaclab.app.settings_manager import get_settings_manager

app = omni.kit.app.get_app()
if app is not None and app.is_running():
# Keep app pumping for viewport/UI updates only.
# Simulation stepping is owned by SimulationContext.
settings = get_settings_manager()
settings.set_bool("/app/player/playSimulations", False)
# Pump Kit/UI events only; SimulationContext owns physics stepping.
app.update()
settings.set_bool("/app/player/playSimulations", True)
except (ImportError, AttributeError) as exc:
logger.debug("[KitVisualizer] App update skipped: %s", exc)

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 Physics double-stepping risk without the old playSimulations guard

The removed code blocked Kit from advancing physics during app.update() by temporarily setting /app/player/playSimulations to False. The guard was clearly broken — step() toggled the flag back to True immediately, so the old is_training_paused() could never observe False — but removing it entirely means Kit is now free to tick physics during app.update() when the timeline is in "playing" state, which could cause double-stepping alongside SimulationContext.

In practice Isaac Sim's app.update() should not independently step physics (physics ownership is expected to live in SimulationContext), and the new is_training_paused() correctly checks the timeline transport state rather than the now-gone setting. However, if a regression appears where physics advances twice per simulation step, this is the first place to investigate.

It would be worth adding a short comment here explaining why the guard was removed (it was effectively a no-op), so future readers don't re-introduce it.

@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 — PR #5103

Summary

This PR addresses two visualizer bugs and expands test coverage with non-black-frame integration tests. The changes span 5 files:

  1. simulation_context.py — Adds viz.step(0.0) when rendering is paused, keeping the visualizer event loop responsive so UI controls (e.g. "Resume Rendering") remain interactive.
  2. setup.py — Adds munch as a dependency for the Newton visualizer.
  3. test_simulation_context_visualizers.py — Adds a dedicated unit test for the rendering-paused fix and updates an existing test assertion.
  4. kit_visualizer.py — Rewrites step() to use carb.settings directly (replacing get_settings_manager), and conditionally skips app.update() when playSimulations is already falsy. Rewrites is_training_paused() to use omni.timeline instead of the settings flag.
  5. test_visualizer_smoke_logs.py — Adds ~174 lines of integration test infrastructure and two new parametrized tests (test_kit_visualizer_non_black_viewport_frame, test_newton_visualizer_non_black_viewer_frame) that load a Cartpole camera scene and assert non-black rendered output.

Design Assessment

Rendering-paused fix (simulation_context.py): ✅ Sound approach. Calling viz.step(0.0) with zero dt while rendering is paused keeps event loops responsive without advancing simulation time. The fix targets the root cause — previously the continue statement completely skipped the visualizer, leaving its UI unresponsive. The zero-dt convention is already established for the training-pause loop on the adjacent line.

Kit visualizer step() rewrite: ✅ Good improvement. Replacing get_settings_manager() with direct carb.settings access removes an unnecessary abstraction layer. The conditional should_restore logic avoids the previous bug where app.update() was unconditionally called even when simulations weren't playing, which caused the Play/Pause button to erroneously unpause the physics.

Kit visualizer is_training_paused() rewrite: ✅ Correct. Using omni.timeline transport state is semantically accurate — the old implementation checked the /app/player/playSimulations settings flag which could be transiently toggled by step() itself, creating false positives for training pause detection. Timeline transport state is the authoritative source.

Non-black-frame tests: ⚠️ Reasonable intent but CI shows these new tests are fragile in shared GPU CI environments. The CUDA OOM and illegal memory access errors causing test failures are likely caused by test process isolation issues (GPU state leaking between test cases), not by logic bugs in this PR.


Architecture Impact

  • Low risk. The simulation_context.py change is a one-line addition inside an existing code path.
  • The kit_visualizer.py changes replace one internal API (get_settings_manager) with another (carb.settings), reducing coupling. The timeline-based pause detection is more robust.
  • Adding munch to setup.py is a new runtime dependency — this is appropriate if Newton visualizer requires it, but the version should ideally be pinned (see Finding #1).

Implementation Verdict

Approve with findings. The bug fixes are correct and well-targeted. The test infrastructure is solid. However, the new integration tests have CI reliability issues that should be addressed before merge.


Test Coverage

Area Coverage
Rendering-paused viz.step(0.0) ✅ Dedicated unit test + updated existing test assertion
Kit step() conditional update ⚠️ Covered by integration smoke test, but no dedicated unit test mocking carb.settings
Kit is_training_paused() timeline ⚠️ No unit test for the new timeline-based implementation
Non-black frame detection helpers ✅ Exercised by integration tests
Non-black viewport tests 🔴 3/3 new integration test parametrizations failing in CI

CI Status

Job Status Notes
isaaclab_visualizers 🔴 FAIL 3 new tests fail: test_kit_visualizer_non_black_viewport_frame[newton] (CUDA OOM during render product allocation), test_newton_visualizer_non_black_viewer_frame[physx] and [newton] (CUDA illegal memory access during SimulationContext init — GPU state corrupted by prior test)
isaaclab (core) [1-3/3] 🔴 FAIL Failures in test_non_headless_launch, test_first_frame_textured_rendering, test_ray_caster_camera — unrelated to this PR
isaaclab_physx 🔴 FAIL Likely pre-existing, unrelated
isaaclab_tasks [3/3] 🔴 FAIL Likely pre-existing, unrelated
environments_training 🔴 FAIL Likely pre-existing, unrelated
pre-commit ✅ PASS
license-check ✅ PASS

Findings

Finding 1 — munch dependency is unpinned

File: source/isaaclab/setup.py, line 25
Severity: Low
Issue: munch is added without a version pin. Every other dependency in this section has an explicit version or minimum version constraint. An unpinned munch could cause unexpected breakage if a future major version introduces breaking API changes.
Suggestion: Pin to a minimum version, e.g. "munch>=4.0.0" or "munch==4.0.0".

Finding 2 — Kit step() skips app.update() when playSimulations is already falsy

File: source/isaaclab_visualizers/isaaclab_visualizers/kit/kit_visualizer.py, lines 108-119
Severity: Medium
Issue: The new logic only calls app.update() inside if should_restore, meaning when playSimulations is already False, app.update() is never called at all. The old code unconditionally called app.update() (after disabling playSimulations). This behavioral change means the Kit viewport will not pump UI events when simulation is already paused, which could prevent viewport refresh in paused-then-rendering scenarios.

# Current:
should_restore = bool(previous_play_simulations)
if should_restore:
    settings.set_bool(play_simulations_path, False)
    app.update()
if should_restore:
    settings.set_bool(play_simulations_path, True)

# Consider instead:
should_restore = bool(previous_play_simulations)
if should_restore:
    settings.set_bool(play_simulations_path, False)
app.update()  # Always pump UI events
if should_restore:
    settings.set_bool(play_simulations_path, True)

Alternatively, if the intent is specifically to skip app.update() when paused, document this behavior with a comment explaining why.

Finding 3 — New integration tests are not resilient to GPU state corruption from prior tests

File: source/isaaclab_visualizers/test/test_visualizer_smoke_logs.py
Severity: Medium
Issue: The CI failures show that test_newton_visualizer_non_black_viewer_frame[physx] and [newton] fail with torch.AcceleratorError: CUDA error: an illegal memory access during SimulationContext.__init__ — this is GPU state corruption carried over from the preceding test_kit_visualizer_non_black_viewport_frame[newton] failure (CUDA OOM in render product allocation). Since all tests run in a single process (required by Kit app lifetime), a CUDA error in one test poisons all subsequent GPU operations.
Suggestion: Consider adding pytest.mark.order to run the non-black frame tests last, or adding a CUDA device reset/sync check at the start of each test. Alternatively, mark these as @pytest.mark.xfail(reason="Requires dedicated GPU resources") until the CI environment is stabilized, so they don't block the PR pipeline.

Finding 4 — PR description mentions a known TODO that is not addressed

Severity: Info
Issue: The PR body states: "TODO: fix Unpause behavior, currently body transforms remain stale after Unpausing... recent regression". This indicates a known remaining bug in the Kit visualizer's pause/unpause lifecycle. This is fine as a known limitation, but consider filing a tracking issue so it doesn't get lost.


Review by 🤖 Isaac Lab Review Bot — 4a42c18b

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Apr 1, 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 — Follow-up

New commits (4a42c18b→053adbd4): renamed camera_position/camera_target → eye/lookat across the codebase, simplified Kit step(), and merged develop.

One new issue found in the rename.

Comment thread source/isaaclab/isaaclab/envs/common.py Resolved
@matthewtrepte
matthewtrepte requested a review from xyao-nv as a code owner April 3, 2026 00:16
@github-actions github-actions Bot added the isaac-mimic Related to Isaac Mimic team label Apr 3, 2026
@kellyguo11 kellyguo11 moved this to In progress in Isaac Lab Apr 17, 2026
@kellyguo11

Copy link
Copy Markdown
Contributor

are the changes in #5056 still required with this PR?

@matthewtrepte

matthewtrepte commented Apr 17, 2026 •

Copy link
Copy Markdown
Collaborator Author

are the changes in #5056 still required with this PR?

i think its covered by this PR, and i added Pascal's unit tests here from his PR, and they pass

perhjaps @michaellin6 can confirm

@github-project-automation github-project-automation Bot moved this from In progress to Done in Isaac Lab Apr 17, 2026
@matthewtrepte matthewtrepte reopened this Apr 17, 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 makes substantive improvements to the visualizer subsystem: renames camera_position/camera_target → eye/lookat across configs, fixes headless video recording by routing Kit app-loop pumping through PhysicsManager.after_visualizers_render(), adds a ViewerCfg deprecation path, decouples viewport camera control from visualizer broadcasting, and replaces the deleted smoke tests with comprehensive cartpole integration tests that verify non-black frames and motion detection.

The architecture changes are well-motivated — separating Kit-specific rendering from the backend-agnostic SimulationContext, adding render_generation to fix stale-frame dedup, and introducing pumps_app_update() to avoid double-pumping. A few issues are worth addressing before merge.

Design Assessment

Design is sound. The separation of Kit-specific rendering into isaaclab_physx (via kit_viewport_utils.py and after_visualizers_render) keeps SimulationContext backend-agnostic. The pumps_app_update() protocol is a clean way to prevent double-rendering. The ViewerCfg deprecation with __post_init__ field-diffing is thorough. The new integration tests are a significant quality improvement over the deleted smoke tests.

Minor concerns detailed in inline comments.

Test Coverage

  • Bug fix regression tests: ✅ test_render_pumps_app_update_without_visualizer and test_render_skips_app_update_when_visualizer_pumps_it directly cover the headless video fix from PR #5056
  • Integration tests: ✅ Comprehensive cartpole integration tests cover Kit, Newton, Rerun, and Viser visualizers with non-black frame and motion-detection assertions
  • Deprecation warning: ✅ test_config_update_via_constructor updated to expect DeprecationWarning
  • Paused visualizer behavior: ✅ test_update_visualizers_skips_zero_dt_for_paused_app_pumping_visualizer covers the new paused-but-pumping path
  • Gap: No unit test for ViewerCfg.__post_init__ deprecation warning edge cases in isolation (e.g. list vs tuple equivalence in _viewer_cfg_value_matches_default)

CI Status

⚠️ Multiple CI checks failing — appears to be a Docker base image build failure cascading to downstream test suites, not caused by this PR's changes. pre-commit and Build Wheel pass.

Verdict

Minor fixes needed

The approach is correct and well-architected. The inline comments identify a few issues — mostly around error handling robustness and a cross-module dependency concern. None are blocking correctness for the primary use cases.

) -> tuple[tuple[float, float, float], tuple[float, float, float]]:
"""Resolve camera pose from cfg eye/lookat fields."""
del visualizer_name
eye = tuple(float(v) for v in getattr(self.cfg, "eye"))

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.

🔵 Suggestion: getattr(self.cfg, "eye") without a default is equivalent to self.cfg.eye — both raise AttributeError if missing. Direct attribute access is clearer and lets type checkers validate it.

Suggested change
eye = tuple(float(v) for v in getattr(self.cfg, "eye"))
eye = tuple(float(v) for v in self.cfg.eye)

"""Resolve camera pose from cfg eye/lookat fields."""
del visualizer_name
eye = tuple(float(v) for v in getattr(self.cfg, "eye"))
lookat = tuple(float(v) for v in getattr(self.cfg, "lookat"))

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.

Same as above:

Suggested change
lookat = tuple(float(v) for v in getattr(self.cfg, "lookat"))
lookat = tuple(float(v) for v in self.cfg.lookat)

import isaacsim.core.utils.viewports as isaacsim_viewports

isaacsim_viewports.set_camera_view(eye=list(eye), target=list(target), camera_prim_path=str(camera_prim_path))
except Exception as exc:

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.

🟡 Warning: This bare except Exception silently downgrades all errors to DEBUG level. If the camera prim path is wrong or the viewport state is invalid, the user gets no visible feedback — the camera just silently stays in the wrong position.

Consider splitting expected vs unexpected failures:

Suggested change
except Exception as exc:
except (ImportError, ModuleNotFoundError) as exc:
logger.debug("[kit_viewport] Renderer camera update skipped (no Kit): %s", exc)
except Exception as exc:
logger.warning("[kit_viewport] Renderer camera update failed: %s", exc)

try:
ensure_isaac_rtx_render_update()
except Exception as exc:
logger.debug("[isaac_rtx] Skipping Kit app-loop pump in render(): %s", exc)

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.

🟡 Warning: Same concern — except Exception with logger.debug in the --video headless recording path means Fabric sync errors, USD context corruption, etc. would silently produce stale/black frames with no user-visible indication.

Since the user explicitly requested --video, a failure here directly impacts their output:

Suggested change
logger.debug("[isaac_rtx] Skipping Kit app-loop pump in render(): %s", exc)
logger.warning("[isaac_rtx] Kit app-loop pump failed in render() — video frames may be stale: %s", exc)

self._env.sim.set_camera_view(eye=cam_eye, target=cam_target)
# set the renderer viewport camera view (does not broadcast to visualizers)
# Kit-specific helper lives in isaaclab_physx
from isaaclab_physx.renderers.kit_viewport_utils import set_kit_renderer_camera_view

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.

🟡 Warning: This introduces a hard import from isaaclab (core) → isaaclab_physx (backend-specific package). ViewportCameraController lives in the core package but now depends on isaaclab_physx.renderers.kit_viewport_utils at call time.

This is mitigated by the has_kit() guard at the env level (the controller is only created when Kit is present), but the import will raise ModuleNotFoundError in a pure-Newton deployment that somehow reaches this code path. The previous self._env.sim.set_camera_view() was backend-agnostic.

Consider wrapping with a fallback:

try:
    from isaaclab_physx.renderers.kit_viewport_utils import set_kit_renderer_camera_view
    set_kit_renderer_camera_view(eye=cam_eye, target=cam_target, camera_prim_path=self.cfg.cam_prim_path)
except (ImportError, ModuleNotFoundError):
    pass  # Kit-only; Newton-only deployments skip viewport camera

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.

is this whole class applicable to other visualizer/sensors? I think we may want to look at decoupling this class between the controller and viewport logic so that it can be applied to other visualizers and avoids backend-specific references.

self._viewport_window = None
self._viewport_api = None
self._controlled_camera_path = "/OmniverseKit_Persp" if self.cfg.enable_visualizer_cam else None
if not self.cfg.enable_visualizer_cam:

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.

🔵 Suggestion: In the headless path, _controlled_camera_path is set to /OmniverseKit_Persp but _create_and_assign_camera is not called (no dedicated camera prim is created). Then _apply_cfg_camera_pose_if_configured() modifies the default perspective camera directly.

If another component (e.g., a render-product annotator or sensor camera) shares /OmniverseKit_Persp, they'd have conflicting camera state. This seems intentional for headless simplicity — worth a brief comment explaining why headless skips dedicated camera prim creation (e.g., "no viewport to bind a dedicated camera to in headless mode").

"""Viewport name to use when :attr:`create_viewport` is True."""

create_viewport: bool = False
create_viewport: bool = True

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.

🔵 Suggestion: The default changed from False to True. This is a breaking change for anyone who relied on the old default — the Kit visualizer previously used the active viewport, now it creates a new one. The PR description mentions breaking changes — this should be called out in the CHANGELOG so users know to set create_viewport=False if they want the previous behavior.

continue
if viz.is_rendering_paused():
# Keep non-Kit visualizer event loops responsive while rendering is paused.
if not viz.pumps_app_update():

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.

🔵 Suggestion: Good design — calling viz.step(0.0) for non-app-pumping visualizers keeps their GL event loops (keyboard/mouse for Newton/Rerun/Viser resume buttons) responsive while rendering is paused. Kit is correctly skipped since its step() calls app.update() which shouldn't run during pause.

Consider expanding the comment slightly to explain why this matters (e.g., "Newton/Rerun/Viser need step(0.0) to process user input like the Resume button").

@matthewtrepte
matthewtrepte requested a review from Toni-SM as a code owner April 17, 2026 23:24
@kellyguo11 kellyguo11 moved this from Done to In review in Isaac Lab Apr 17, 2026
@kellyguo11

Copy link
Copy Markdown
Contributor

can you check the test failures? visualizer tests seem to be failing, not sure if other tests are related to the change.

@matthewtrepte

matthewtrepte commented Apr 21, 2026 •

Copy link
Copy Markdown
Collaborator Author

can you check the test failures? visualizer tests seem to be failing, not sure if other tests are related to the change.

Its the frozen visualizer test that's been added which is failing on the kit bug.

=================================== FAILURES ===================================
_____________ test_kit_visualizer_non_black_viewport_frame[physx] ______________
source/isaaclab_visualizers/test/test_visualizer_cartpole_integration.py:470: in test_kit_visualizer_non_black_viewport_frame
    _run_kit_viewport_frame_motion_test(env, kit_visualizers[0], physics_kind=backend_kind)
source/isaaclab_visualizers/test/test_visualizer_cartpole_integration.py:408: in _run_kit_viewport_frame_motion_test
    _assert_early_and_late_motion_frames_differ(frames)
source/isaaclab_visualizers/test/test_visualizer_cartpole_integration.py:316: in _assert_early_and_late_motion_frames_differ
    assert n_diff >= min_differing_pixels, (
E   AssertionError: Viewport captures #2 and #60 have too few strongly differing pixels (30 < 100; threshold per channel=50 in 0–255 space). Possible frozen or stale robot visualization.
E   assert 30 >= 100
--------------------------

@matthewtrepte
matthewtrepte merged commit 3b60654 into isaac-sim:develop Apr 21, 2026
28 of 31 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in Isaac Lab Apr 21, 2026
bdilinila pushed a commit to bdilinila/IsaacLab that referenced this pull request Apr 29, 2026
# Description

<!--
Thank you for your interest in sending a pull request. Please make sure
to check the contribution guidelines.

Link:
https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html

💡 Please try to keep PRs small and focused. Large PRs are harder to
review and merge.
-->

Tests
- Add visualizer tests which load cartpole scene and check the viewport
isn't black or frozen
- Add regression tests for visualization pumping from Pascal's change -
isaac-sim#5056

Newton Visualizer
- Fix "Pause/Resume Rendering" button
- Change "Pause/Resume Training" to "Pause/Resume Simulation"

Kit Visualizer
- Fix recording in headless mode
- Resolve overlapping camera cfg behavior in ViewerCfg and
KitVisualizerCfg (will likely need another PR + design to streamline the
cfgs)

Rerun Visualizer
- Fix issue when launching rerun  + newton physics without KitVisualizer

RTX Renderer
- Fix stale image issue after resets which require Kit Visualizer's
continuous app updates to avoid
- Fix strange wrist camera orientation offset issue

Else
- Rename camera_position/camera_target_position fields to eye/lookat
across the board


<!-- As a practice, it is recommended to open an issue to have
discussions on the proposed pull request.
This makes it easier for the community to keep track of what is being
developed or added, and if a given feature
is demanded by more than one party. -->

## Type of change

<!-- As you go through the list, delete the ones that are not
applicable. -->

- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- Breaking change (existing functionality will not work without user
modification)
- Documentation update

## Screenshots

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

<!--
Example:

| Before | After |
| ------ | ----- |
| _gif/png before_ | _gif/png after_ |

To upload images to a PR -- simply drag and drop an image while in edit
mode and it should upload the image directly. You can then paste that
source into the above before/after sections.
-->

## Checklist

- [ ] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [ ] I have run the [`pre-commit` checks](https://pre-commit.com/) 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

<!--
As you go through the checklist above, you can mark something as done by
putting an x character in it

For example,
- [x] I have done this task
- [ ] I have not done this task
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation 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.

2 participants