Skip to content

Conversation

@kellyguo11
Copy link
Contributor

@kellyguo11 kellyguo11 commented Dec 6, 2025

Description

Decouples core code paths from OV modules such that we can run training/non-OV visualization without launching the OV app. If visualizer is selected as newton and/or rerun, or no visualizers are specified, the OV app will not run and no OV modules will be available. To enable OV paths, --visualizers omniverse must be set.

Main changes:

  • Removed isaac sim SimulationContext and SimulationManager references
  • Assumed no support for in-memory OV stages, non-OV stages are in-memory by default
  • All omni.ui dependencies are lazy loaded
  • Decoupling prims and stage utils from OV modules - fabric is still required for OV visualization
  • Alternative way for carb settings is done through a SettingsManager
  • XFormPrim class is re-implemented in Isaac Lab
  • omni.kit.commands are either lazy imported or replaced (replacements should be verified)
  • omni.timeline callbacks are removed (commented out for now)
  • PhysicsScene is created by the SimulationContext, which also holds configurations for the scene

Limitations:

  • Semantics are not supported
  • VisualizationMarkers can only be run with OV visualizer

Type of change

  • New feature (non-breaking change which adds functionality)
  • Breaking change (existing functionality will not work without user modification)

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

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 6, 2025

Greptile Overview

Greptile Summary

This PR decouples Isaac Lab's core code paths from Omniverse (OV) modules to enable training and non-OV visualization without launching the OV app. When using Newton and/or Rerun visualizers (or no visualizers), the OV app will not run.

Key Changes:

  • SimulationContext no longer inherits from Isaac Sim's SimulationContext base class - implements its own singleton pattern
  • New SettingsManager provides a carb.settings-like interface that works in both Omniverse and standalone modes
  • AppLauncher conditionally launches SimulationApp only when Omniverse is needed (visualizer, cameras, or livestreaming)
  • New pure USD XFormPrim implementation replaces Isaac Sim dependency
  • Cloner utilities refactored to support Newton physics backend alongside PhysX
  • omni.timeline callbacks removed/commented out in favor of NewtonManager callbacks
  • Lazy imports for omni.ui, omni.kit.commands, and other OV-specific modules

Breaking Changes:

  • SimulationContext.get_version() method is commented out
  • Timeline event subscriptions are disabled
  • Some features raise NotImplementedError in Newton mode (deformable objects, rigid objects, surface grippers)

Confidence Score: 3/5

  • This is a large architectural refactoring with potential runtime issues that need addressing before merge.
  • The PR introduces significant architectural changes with two identified bugs: (1) get_current_stage() will crash if SimulationContext is not initialized, and (2) newton_params may be undefined when used. The extensive use of commented-out code suggests work in progress. Many timeline callbacks are disabled which could affect OV mode behavior.
  • Pay close attention to source/isaaclab/isaaclab/sim/utils/stage.py and source/isaaclab/isaaclab/sim/simulation_context.py which have the identified issues.

Important Files Changed

File Analysis

Filename Score Overview
source/isaaclab/isaaclab/app/app_launcher.py 4/5 Major refactoring to conditionally launch SimulationApp only when Omniverse is needed (based on visualizer, cameras, or livestreaming). Adds standalone mode for Newton/Rerun-only usage. Adds SettingsManager integration and proper signal handling.
source/isaaclab/isaaclab/app/settings_manager.py 5/5 New settings manager singleton that provides carb.settings-like interface for both Omniverse and standalone modes. Clean implementation with proper singleton pattern stored in sys.modules to survive reloads.
source/isaaclab/isaaclab/sim/simulation_context.py 3/5 Major refactoring to decouple from Isaac Sim's SimulationContext base class. Now standalone with own singleton implementation, SettingsManager integration, and Newton physics backend. Several methods commented out during transition.
source/isaaclab/isaaclab/sim/prims/xform_prim.py 5/5 New pure USD implementation of XFormPrim replacing Isaac Sim dependency. Clean implementation with proper transform handling, regex path resolution, and numpy/torch conversion utilities.
source/isaaclab/isaaclab/sim/_impl/newton_manager.py 4/5 Newton physics backend manager. Static class managing physics simulation state, solver initialization, and physics stepping. Key integration point for Newton physics.
source/isaaclab/isaaclab/sim/utils/stage.py 4/5 Refactored stage utilities to use pure USD core APIs instead of omni APIs. Functions like add_reference_to_stage now support remote files and have fallback for non-Omniverse mode.
source/isaaclab/isaaclab/scene/interactive_scene.py 4/5 Updated to use new cloner API. Raises NotImplementedError for unsupported Newton features (deformable objects, rigid objects, surface grippers). Handles Newton-specific cloning path.

Sequence Diagram

sequenceDiagram
    participant User
    participant AppLauncher
    participant SettingsManager
    participant SimulationApp
    participant SimulationContext
    participant NewtonManager

    User->>AppLauncher: Initialize with args
    AppLauncher->>AppLauncher: _check_if_omniverse_required()
    
    alt Omniverse Required (cameras, livestream, or OV visualizer)
        AppLauncher->>SimulationApp: Create SimulationApp
        AppLauncher->>SettingsManager: initialize_carb_settings()
        SettingsManager->>SettingsManager: Use carb.settings
    else Standalone Mode (Newton/Rerun only)
        AppLauncher->>SettingsManager: _store_settings_standalone()
        SettingsManager->>SettingsManager: Use Python dict
    end
    
    User->>SimulationContext: Create SimulationContext
    SimulationContext->>SettingsManager: Get/Set settings
    SimulationContext->>NewtonManager: set_simulation_dt()
    SimulationContext->>NewtonManager: set_solver_settings()
    
    User->>SimulationContext: reset()
    SimulationContext->>NewtonManager: start_simulation()
    SimulationContext->>NewtonManager: initialize_solver()
    
    loop Simulation Loop
        User->>SimulationContext: step()
        SimulationContext->>NewtonManager: step()
    end
Loading

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.

Additional Comments (2)

  1. source/isaaclab/isaaclab/sim/utils/stage.py, line 206 (link)

    logic: SimulationContext.instance() can return None if no instance exists yet. This will cause an AttributeError when accessing .stage.

  2. source/isaaclab/isaaclab/sim/simulation_context.py, line 312-316 (link)

    logic: newton_params used at line 362 but may be undefined if sim_params is None or doesn't contain "newton_cfg". Initialize with a default value.

52 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

@github-actions github-actions bot added the isaac-lab Related to Isaac Lab team label Dec 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infrastructure isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants