-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[Newton] Decouples AppLauncher from SimulationApp #4101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev/newton
Are you sure you want to change the base?
Conversation
Signed-off-by: matthewtrepte <[email protected]>
Signed-off-by: matthewtrepte <[email protected]>
…s default cfgs if no visualizers are specified
Greptile OverviewGreptile SummaryDecouples SimulationApp from AppLauncher to enable running Isaac Lab with lightweight visualizers (Newton, Rerun) without the full Omniverse stack. Introduces a new Key Changes:
Critical Issue:
Confidence Score: 2/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User
participant AppLauncher
participant SettingsManager
participant SimulationApp
participant SimulationContext
participant SceneDataProvider
participant Visualizers
User->>AppLauncher: __init__(visualizer=['newton'])
AppLauncher->>AppLauncher: _config_resolution()
AppLauncher->>AppLauncher: _check_if_omniverse_required()
alt Omniverse Required (OV visualizer, cameras, or livestream)
AppLauncher->>SimulationApp: create SimulationApp
SimulationApp-->>AppLauncher: app instance
AppLauncher->>SettingsManager: initialize_carb_settings()
Note over SettingsManager: Switches to Omniverse mode<br/>(uses carb.settings)
else Standalone Mode (Rerun/Newton only)
Note over AppLauncher: Skip SimulationApp creation
Note over SettingsManager: Stays in standalone mode<br/>(uses Python dict)
end
AppLauncher->>SettingsManager: store settings
User->>SimulationContext: __init__(cfg)
SimulationContext->>SettingsManager: get_settings_manager()
SimulationContext->>SimulationContext: _apply_physics_settings()
SimulationContext->>SimulationContext: _apply_render_settings_from_cfg()
User->>SimulationContext: initialize_visualizers()
SimulationContext->>SettingsManager: get('/isaaclab/visualizer')
SettingsManager-->>SimulationContext: requested visualizers
alt No configs in SimulationCfg
SimulationContext->>SimulationContext: _create_default_visualizer_configs()
else Configs exist
SimulationContext->>SimulationContext: filter by requested types
end
SimulationContext->>SceneDataProvider: __init__(visualizer_cfgs)
SceneDataProvider-->>SimulationContext: provider instance
loop For each visualizer config
SimulationContext->>Visualizers: create_visualizer()
Visualizers-->>SimulationContext: visualizer instance
SimulationContext->>Visualizers: initialize(scene_data)
end
loop Simulation step
User->>SimulationContext: step()
SimulationContext->>SimulationContext: forward()
SimulationContext->>SceneDataProvider: update()
alt OV Visualizer Active
SceneDataProvider->>SceneDataProvider: _sync_fabric_transforms()
Note over SceneDataProvider: Sync Newton transforms to USD Fabric
end
SimulationContext->>SimulationContext: step_visualizers(dt)
loop For each visualizer
SimulationContext->>Visualizers: step(dt, state)
end
end
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional Comments (1)
-
source/isaaclab/isaaclab/sim/simulation_context.py, line 346 (link)logic: In standalone mode (no SimulationApp),
carb.tokenswon't be available. This will throw an import error when_apply_render_settings_from_cfgis called without Omniverse mode active.
33 files reviewed, 3 comments
| # enable hydra scene-graph instancing | ||
| # note: this allows rendering of instanceable assets on the GUI | ||
| set_carb_setting(self.carb_settings, "/persistent/omnihydra/useSceneGraphInstancing", True) | ||
| set_carb_setting(self.settings, "/persistent/omnihydra/useSceneGraphInstancing", True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: set_carb_setting from isaacsim.core.utils.carb expects an actual carb.settings object, but self.settings is now a SettingsManager instance. In standalone mode (no SimulationApp), this will fail because the function signature is incompatible.
The SettingsManager has its own set_bool/set_int/etc methods, so you should either:
- Call
self.settings.set_bool(path, value)directly, OR - Only call these render settings methods when in Omniverse mode
Similar issue at lines 355, 368, 378, 380, 392-393.
| if self.cfg.render.antialiasing_mode is not None: | ||
| if self.cfg.render_cfg.antialiasing_mode is not None: | ||
| try: | ||
| import omni.replicator.core as rep |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: In standalone mode, omni.replicator.core won't be available. The try-except handles this, but the entire _apply_render_settings_from_cfg method should probably be guarded to only run in Omniverse mode.
# Consider wrapping entire method:
def _apply_render_settings_from_cfg(self):
if not get_settings_manager().is_omniverse_mode:
return
# ... rest of method
Description
Attempts to make the SimulationApp optional in the AppLauncher, where we only launch Kit via SimulationApp if omniverse visualizer (or in the future, RTX rendering) is required.
Also replaces carb settings with an internal settings manager for storing global settings.
This PR is made on top of the visualizer changes in #4099
This will currently break things because we still need to refactor SimulationContext to avoid any Kit libraries
Type of change
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there