Skip to content

Comments

[Visualizers] Add Viser visualizer support#4665

Open
eric-heiden wants to merge 6 commits intoisaac-sim:dev/newtonfrom
eric-heiden:eheiden/viser-visualizer
Open

[Visualizers] Add Viser visualizer support#4665
eric-heiden wants to merge 6 commits intoisaac-sim:dev/newtonfrom
eric-heiden:eheiden/viser-visualizer

Conversation

@eric-heiden
Copy link

@eric-heiden eric-heiden commented Feb 20, 2026

Description

  • Introduced Viser visualizer configuration and implementation.
  • Updated AppLauncher to support Viser alongside existing visualizers (Rerun, Newton, Omniverse).
  • Modified simulation context and scene data provider to accommodate Viser.
  • Enhanced documentation to reflect new visualizer options.
  • Added --visualizer_max_worlds CLI option that will limit the number of envs shown in the Newton/Rerun/Viser visualizers

Type of change

  • New feature (non-breaking change which adds functionality)

Screenshots

image

Run command:

./isaaclab.sh -p scripts/reinforcement_learning/rsl_rl/train.py \
  --task Isaac-Cartpole-v0 \
  --num_envs 64 \
  --max_iterations 1000 \
  --visualizer viser
image

Run command:

./isaaclab.sh -p scripts/reinforcement_learning/rsl_rl/train.py \
  --task Isaac-Velocity-Flat-Anymal-D-v0 \
  --visualizer viser \
  --visualizer_max_worlds 100

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

…rations

- Introduced Viser visualizer configuration and implementation.
- Updated AppLauncher to support Viser alongside existing visualizers (Rerun, Newton, Omniverse).
- Modified simulation context and scene data provider to accommodate Viser.
- Enhanced documentation to reflect new visualizer options.

Signed-off-by: Eric Heiden <eric-heiden@outlook.com>
@github-actions github-actions bot added the isaac-lab Related to Isaac Lab team label Feb 20, 2026
Signed-off-by: Eric Heiden <eric-heiden@outlook.com>
Signed-off-by: Eric Heiden <eric-heiden@outlook.com>
Signed-off-by: Eric Heiden <eric-heiden@outlook.com>
Signed-off-by: Eric Heiden <eric-heiden@outlook.com>
@eric-heiden eric-heiden marked this pull request as ready for review February 20, 2026 19:04
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 20, 2026

Greptile Summary

This PR adds Viser as a third Newton-based visualizer alongside the existing Newton and Rerun visualizers. The implementation follows the established pattern and integrates cleanly with the visualizer architecture.

Key Changes:

  • New ViserVisualizer class using Newton's ViewerViser backend (web-based on port 8080)
  • Added --visualizer_max_worlds CLI option to limit environments shown in Newton/Rerun/Viser
  • Applied CLI override mechanism for max_worlds across all Newton-based visualizers
  • Updated AppLauncher to support standalone mode (no SimulationApp) when only using Rerun/Newton/Viser
  • Added viser>=1.0.16 dependency

Issues Found:

  • Documentation inconsistency: help text says "omniverse" but implementation uses "kit" as the visualizer name

Confidence Score: 4/5

  • Safe to merge with minor documentation fix recommended
  • Implementation follows established patterns for Newton/Rerun visualizers with consistent architecture. Only issue is a documentation inconsistency where help text says "omniverse" but code uses "kit".
  • Check app_launcher.py documentation for visualizer name consistency (lines 299, 457)

Important Files Changed

Filename Overview
source/isaaclab/isaaclab/visualizers/viser_visualizer.py New Viser visualizer implementation following the same pattern as Newton/Rerun visualizers, with proper camera handling and lifecycle management
source/isaaclab/isaaclab/visualizers/viser_visualizer_cfg.py Configuration class for Viser visualizer with standard settings (port, label, recording, max_worlds)
source/isaaclab/isaaclab/app/app_launcher.py Added Viser to valid visualizers list and updated documentation; includes new --visualizer_max_worlds CLI option
source/isaaclab/isaaclab/sim/simulation_context.py Added Viser support to visualizer resolution logic and new CLI override mechanism for max_worlds parameter

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User runs script with --visualizer viser] --> B[AppLauncher parses CLI args]
    B --> C{Omniverse required?}
    C -->|No: viser only| D[Standalone mode - No SimulationApp]
    C -->|Yes: kit visualizer or cameras| E[Launch SimulationApp]
    D --> F[SimulationContext.initialize]
    E --> F
    F --> G[resolve_visualizer_types]
    G --> H{CLI override?}
    H -->|Yes| I[Filter visualizer_cfgs by CLI types]
    H -->|No| J[Use all visualizer_cfgs]
    I --> K[Apply CLI max_worlds override]
    J --> K
    K --> L[Create ViserVisualizer instance]
    L --> M[ViserVisualizer.initialize]
    M --> N[Get Newton model from SceneDataProvider]
    N --> O[Create NewtonViewerViser on port 8080]
    O --> P[Disable client rebuild if bundled]
    P --> Q[Set camera view]
    Q --> R[Simulation loop: step calls]
    R --> S[ViserVisualizer.step]
    S --> T[Update Newton state]
    T --> U[viewer.log_state]
    U --> V{Continue?}
    V -->|Yes| R
    V -->|No| W[ViserVisualizer.close]
    W --> X[Finalize recording if enabled]
Loading

Last reviewed commit: 7610553

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

12 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Align AppLauncher argument documentation and help text with the internal `kit` visualizer name.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copy link
Contributor

@kellyguo11 kellyguo11 left a comment

Choose a reason for hiding this comment

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

is it possible to add some unit tests for this?

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