Skip to content

General Visualizer Fixes#5935

Open
matthewtrepte wants to merge 5 commits into
isaac-sim:developfrom
matthewtrepte:mtrepte/debug
Open

General Visualizer Fixes#5935
matthewtrepte wants to merge 5 commits into
isaac-sim:developfrom
matthewtrepte:mtrepte/debug

Conversation

@matthewtrepte
Copy link
Copy Markdown
Contributor

@matthewtrepte matthewtrepte commented Jun 3, 2026

Description

Fixes

  • remove legacy isaaclab_visualizers/setup.py
  • fix small ground plane mesh in Rerun and Viser visualizers in some envs
  • fix library conflict with imgui_bundle, which broke Newton viewer's HUD
  • expanded viz test to include a specific check for imgui_bundle failure to load, to extra these common Newton viewer HUD regressions, often from conflicting libaries
  • fixes flickering ground in Viser visualizer
  • prevents log spam from this [Warning] [omni.physx.tensors.plugin] Failed to find rigid body...

Type of change

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

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 isaac-lab Related to Isaac Lab team infrastructure labels Jun 3, 2026
Copy link
Copy Markdown

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

Choose a reason for hiding this comment

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

Review: General Visualizer Fixes

Thanks for cleaning up the visualizer stack! The infinite-plane expansion, improved error messages, and imgui dependency checks are all solid improvements. A few items worth discussing:

Summary of Findings

# Severity File Finding
1 🟡 Medium visualizer_cfg.py Default tiled_cam_view changed from FalseTrue — potential breaking behavior change
2 🟡 Medium newton_adapter.py expand_infinite_plane_scale replaces both axes even when only one is non-positive
3 🟢 Low rerun_visualizer.py / viser_visualizer.py log_geo override is duplicated verbatim between both viewers
4 🟢 Low pyproject.toml pyarrow==22.0.0 exact pin may conflict with user environments
5 🟢 Low CI changelog fragments and pre-commit checks are currently failing

CI Status: changelog fragments ❌ and pre-commit ❌ are failing — likely minor formatting or fragment issues to address before merge.


Update (126f197)

New commits address the main concerns:

  • Finding 1 Fixed: tiled_cam_view default reverted to False — no breaking behavior change.
  • Finding 2 Fixed: expand_infinite_plane_scale now preserves valid dimensions independently (only replaces non-positive axes).
  • Finding 3 Fixed: Shared log_geo_with_expanded_plane_scale helper extracted to newton_adapter.py — DRY.
  • HUD warning Fixed: Module-level NEWTON_HUD_IMPORT_LOG_WARNING constant now shared between visualizer and integration tests.

New additions in this push (scene-data backend hook for articulation transforms in physx_manager.py, video recorder multi-visualizer warning, Viser plane-grid caching, docs clarifications) look clean. No new issues found in the incremental changes. 👍


Update (feb7046)

Large batch of changes unrelated to the visualizer fixes — primarily task/env architecture refactoring. Visualizer-specific changes in this push are limited to:

  • isaaclab_visualizers version bump (0.1.0 → 0.1.1) and changelog consolidation from fragments
  • Test import path update (CartpoleCameraPresetsEnvCfgCartpoleCameraEnvCfg) following the cartpole task refactor

No new visualizer-specific issues. The broader changes (Newton SDF collision API, cartpole camera consolidation to channel-first output, isaaclab_experimental lazy-export refactoring, TacSL PhysX migration, cloner nested-template fix, RSL-RL CNNModel for image-only policies) are well-structured and follow established patterns. LGTM on the visualizer portions. 👍


# Tiled camera settings
tiled_cam_view: bool = False
tiled_cam_view: bool = True
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Behavior change: Changing the default from False to True means all visualizer users will now get tiled camera views by default, even if their environment has no Camera sensors. Combined with the improved error message in camera_view.py, this could surface RuntimeError for existing configurations that previously worked (because tiled cam was off).

Was this intentional? If so, consider mentioning it in the changelog fragment as a behavior change rather than just a bug fix, so downstream users are aware.

Suggested change
tiled_cam_view: bool = True
tiled_cam_view: bool = True

length = scale[1] if len(scale) > 1 else 0.0
if width > 0.0 and length > 0.0:
return scale
tail = scale[2:] if len(scale) > 2 else ()
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Logic concern: When only one axis is non-positive (e.g. (-1.0, 25.0)), the function replaces both with plane_size, discarding the valid dimension. Newton may encode "infinite in X, finite in Y" planes — in that case the intended 25 m extent would be silently overwritten to 1000 m.

Consider replacing each axis independently:

def expand_infinite_plane_scale(
    geo_scale: tuple[float, ...], plane_size: float = VISUALIZER_INFINITE_PLANE_SIZE
) -> tuple[float, ...]:
    scale = tuple(float(value) for value in geo_scale)
    width = scale[0] if len(scale) > 0 else 0.0
    length = scale[1] if len(scale) > 1 else 0.0
    if width > 0.0 and length > 0.0:
        return scale
    new_width = width if width > 0.0 else plane_size
    new_length = length if length > 0.0 else plane_size
    tail = scale[2:] if len(scale) > 2 else ()
    return (new_width, new_length, *tail)

If Newton's convention guarantees both are always non-positive together, a brief comment explaining that invariant would be helpful.

@@ -134,6 +139,21 @@ def _render_ui(self):
if imgui.button("Pause Rendering" if not self._paused_rendering else "Resume Rendering"):
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 DRY: This log_geo override is byte-for-byte identical to the one in ViserVisualizerViewer. Consider extracting a shared mixin or a standalone helper function (e.g. in newton_adapter.py) to avoid maintaining the same logic in two places:

# In newton_adapter.py:
def patched_log_geo(super_log_geo, name, geo_type, geo_scale, geo_thickness, geo_is_solid, geo_src, hidden):
    if geo_type == newton.GeoType.PLANE:
        geo_scale = expand_infinite_plane_scale(geo_scale)
    return super_log_geo(name, geo_type, geo_scale, geo_thickness, geo_is_solid, geo_src, hidden)

Not blocking, but would reduce maintenance burden as more visualizer backends are added.

"imgui-bundle>=1.92.5",
"typing-extensions>=4.15.0",
]
rerun = [
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Nit: pyarrow==22.0.0 is a very tight pin. If this is inherited from the old setup.py for compatibility with rerun-sdk, consider documenting why this exact version is required (e.g. a compatibility note), or relaxing to pyarrow>=22.0.0,<23 if rerun supports a range. Exact pins can cause resolution conflicts in larger environments.

"Install isaaclab-visualizers[newton] or fix its transitive dependencies "
"(for example typing-extensions>=4.15.0). ImportError: %s",
exc,
)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Minor: The warning message string here ("[NewtonVisualizer] Newton HUD disabled: failed to import imgui_bundle.") differs from the sentinel string checked in the integration test (_NEWTON_HUD_IMPORT_LOG_WARNING = "Newton Visualizer HUD disabled: failed to import imgui_bundle. This can be caused by conflicting libraries."). The test's sentinel won't match this actual warning.

Double-check that _NEWTON_HUD_IMPORT_LOG_WARNING in visualizer_integration_utils.py exactly matches the logged message, or use a substring that's guaranteed to appear in both.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Jun 3, 2026

Greptile Summary

This PR fixes several visualizer issues: infinite ground planes now render at a proper large finite size in Rerun and Viser by overriding log_geo in both viewer subclasses; the Newton HUD dependency check adds an early imgui_bundle import probe with actionable log output; error messages for missing camera sensors are improved; the legacy setup.py is removed; and typing-extensions>=4.15.0 / pyarrow==22.0.0 are added to the affected extras.

  • Ground-plane fix: new expand_infinite_plane_scale helper in newton_adapter.py is called from log_geo overrides in both NewtonViewerRerun and NewtonViewerViser, converting Newton's non-positive "infinite" plane convention to a 1000 m finite mesh.
  • HUD dependency probe: _log_newton_hud_dependency_issue() is called at NewtonVisualizer init to surface imgui_bundle import failures early, but the warning-string constant in the test helper does not match the actual warning text, so the log-based regression check is inert.
  • Default change: tiled_cam_view default was flipped from False to True in VisualizerCfg, enabling tiled camera creation for all visualizer users who do not explicitly opt out, which is unmentioned in the changelog.

Confidence Score: 3/5

Two changes need attention before merging: the _NEWTON_HUD_IMPORT_LOG_WARNING constant is mismatched with the actual warning text making the new regression detector a no-op, and tiled_cam_view was silently flipped to True as the default changing behavior for all existing visualizer users.

The ground-plane and HUD-probe changes are well-structured and tested. However, the integration-test helper added to catch imgui_bundle failures will never fire because the substring it checks does not appear anywhere in the codebase. Additionally, the silent flip of tiled_cam_view changes the out-of-the-box behavior of every VisualizerCfg subclass without a changelog note.

source/isaaclab_visualizers/test/visualizer_integration_utils.py (broken warning constant) and source/isaaclab/isaaclab/visualizers/visualizer_cfg.py (default-value flip).

Important Files Changed

Filename Overview
source/isaaclab_visualizers/test/visualizer_integration_utils.py Added assert_no_newton_hud_dependency_warning helper with a broken _NEWTON_HUD_IMPORT_LOG_WARNING constant that will never match the actual warning text emitted by newton_visualizer.py, rendering the imgui_bundle regression check inoperable.
source/isaaclab/isaaclab/visualizers/visualizer_cfg.py Default for tiled_cam_view silently flipped from False to True, enabling tiled camera creation by default for all VisualizerCfg subclasses without a changelog entry.
source/isaaclab_visualizers/isaaclab_visualizers/newton_adapter.py Added expand_infinite_plane_scale utility that converts Newton non-positive infinite plane extents to a large finite size for web viewers; logic is correct and well-tested.
source/isaaclab_visualizers/isaaclab_visualizers/newton/newton_visualizer.py Added _log_newton_hud_dependency_issue() pre-flight check called at viewer init to surface imgui_bundle import failures with actionable guidance.
source/isaaclab_visualizers/isaaclab_visualizers/rerun/rerun_visualizer.py Added log_geo override in NewtonViewerRerun to expand infinite-plane extents before delegating to the parent, fixing the small ground plane issue in Rerun.
source/isaaclab_visualizers/isaaclab_visualizers/viser/viser_visualizer.py Added equivalent log_geo override in NewtonViewerViser to expand infinite-plane extents; mirrors the Rerun fix correctly.
source/isaaclab_visualizers/pyproject.toml Added typing-extensions>=4.15.0 to newton extra and pyarrow==22.0.0 to rerun/all extras.
source/isaaclab/isaaclab/envs/utils/camera_view.py Improved find_camera_by_prim_path error messages: empty-sensor-dict case now gives a dedicated actionable error with available sensor paths listed.
source/isaaclab_visualizers/setup.py Removed legacy setup.py; package metadata is fully covered by pyproject.toml.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[NewtonVisualizer.__init__] --> B[_log_newton_hud_dependency_issue]
    B --> C{imgui_bundle importable?}
    C -- Yes --> D[HUD enabled, create NewtonViewerGL]
    C -- No --> E[logger.warning: Newton HUD disabled]
    E --> D
    F[NewtonViewerRerun.log_geo] --> G{geo_type == PLANE?}
    G -- Yes --> H[expand_infinite_plane_scale]
    H --> I[super.log_geo with large extents]
    G -- No --> I
    J[NewtonViewerViser.log_geo] --> K{geo_type == PLANE?}
    K -- Yes --> L[expand_infinite_plane_scale]
    L --> M[super.log_geo with large extents]
    K -- No --> M
Loading

Reviews (1): Last reviewed commit: "init fixes" | Re-trigger Greptile

ASSERT_VISUALIZER_WARNINGS = False

_NEWTON_IMGUI_BUNDLE_PRINT_WARNING = "Warning: imgui_bundle not found"
_NEWTON_HUD_IMPORT_LOG_WARNING = "Newton Visualizer HUD disabled: failed to import imgui_bundle. This can be caused by conflicting libraries."
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 Broken warning-string constant — regression check is silently inert

_NEWTON_HUD_IMPORT_LOG_WARNING is checked as a substring of every log record's message, but it will never match the warning actually emitted by _log_newton_hud_dependency_issue(). The function logs "[NewtonVisualizer] Newton HUD disabled: failed to import imgui_bundle. Install isaaclab-visualizers[newton]…", while the constant here is "Newton Visualizer HUD disabled: failed to import imgui_bundle. This can be caused by conflicting libraries." — both the prefix and suffix differ. Because the substring never matches, logged_warnings will always be empty and assert_no_newton_hud_dependency_warning will always pass even when the real warning fires, making the entire new regression detector inoperable.

Suggested change
_NEWTON_HUD_IMPORT_LOG_WARNING = "Newton Visualizer HUD disabled: failed to import imgui_bundle. This can be caused by conflicting libraries."
_NEWTON_HUD_IMPORT_LOG_WARNING = "Newton HUD disabled: failed to import imgui_bundle."

Comment on lines 39 to 40
tiled_cam_view: bool = True
"""Enable a non-interactive tiled camera image 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.

P1 Undocumented default-behavior flip for all visualizer users

tiled_cam_view was changed from False to True, enabling the tiled camera image view by default for every VisualizerCfg subclass when no explicit value is set. Any existing user that creates a visualizer without passing tiled_cam_view=False will now silently get a tiled camera view and the associated camera sensor creation overhead. The PR description and changelog entry don't mention this change.

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!

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jun 3, 2026
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant