[WIP] Add Visualizers and Scene Data Providers#4474
Closed
matthewtrepte wants to merge 19 commits intoisaac-sim:developfrom
Closed
[WIP] Add Visualizers and Scene Data Providers#4474matthewtrepte wants to merge 19 commits intoisaac-sim:developfrom
matthewtrepte wants to merge 19 commits intoisaac-sim:developfrom
Conversation
Contributor
Greptile OverviewGreptile SummaryThis PR introduces a modular visualization framework for Isaac Lab that abstracts different visualizer backends (Newton OpenGL, Rerun, Omniverse) behind a unified interface. The implementation adds scene data providers to adapt physics state between backends (PhysX ↔ Newton) and integrates visualizers into the simulation lifecycle. Key Changes
Issues Found
Confidence Score: 3/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant SimContext as SimulationContext
participant SceneDP as SceneDataProvider
participant OVProvider as OVSceneDataProvider
participant NewtonProvider as NewtonSceneDataProvider
participant Visualizer as Visualizer (Newton/Rerun/OV)
participant PhysX as PhysX Backend
participant Newton as Newton Backend
User->>SimContext: play() / start simulation
SimContext->>SimContext: initialize_visualizers()
SimContext->>SceneDP: new SceneDataProvider(backend, visualizer_cfgs)
alt Physics Backend = "omni"
SceneDP->>OVProvider: new OVSceneDataProvider(visualizer_cfgs, stage, sim_ctx)
OVProvider->>OVProvider: _build_newton_model_from_usd() if newton/rerun visualizers
OVProvider->>PhysX: create_rigid_body_view(), create_articulation_view()
else Physics Backend = "newton"
SceneDP->>NewtonProvider: new NewtonSceneDataProvider(visualizer_cfgs)
NewtonProvider->>Newton: access NewtonManager._model, _state_0
end
SimContext->>Visualizer: create_visualizer() from config
SimContext->>Visualizer: initialize(scene_data)
Visualizer->>SceneDP: get_newton_model() / get_usd_stage()
SceneDP-->>Visualizer: model/state/stage data
Visualizer->>Visualizer: setup viewer (ViewerGL/ViewerRerun/OV)
loop Every simulation step
User->>SimContext: step()
SimContext->>PhysX: physics step (if PhysX backend)
SimContext->>Newton: physics step (if Newton backend)
SimContext->>SimContext: step_visualizers(dt)
SimContext->>SceneDP: update()
alt Physics Backend = "omni" and needs Newton data
OVProvider->>PhysX: get_world_poses(), get_velocities()
OVProvider->>OVProvider: sync PhysX transforms to Newton state
OVProvider->>OVProvider: convert quaternions (wxyz->xyzw)
end
SimContext->>Visualizer: step(dt)
Visualizer->>SceneDP: get_newton_state() or get_usd_stage()
SceneDP-->>Visualizer: updated state/stage
Visualizer->>Visualizer: render frame (ViewerGL/ViewerRerun/OV)
end
User->>SimContext: stop() / clear_instance()
SimContext->>SimContext: close_visualizers()
SimContext->>Visualizer: close()
Visualizer->>Visualizer: cleanup resources
|
Comment on lines
145
to
151
| from isaaclab.sim.utils import find_matching_prim_paths | ||
|
|
||
| env_prim_paths = find_matching_prim_paths("/World/envs/env_.*", stage=self.scene.stage) | ||
| print( | ||
| "[SceneDebug] env prims after InteractiveScene: " | ||
| f"num_envs_setting={self.cfg.scene.num_envs}, env_prims={len(env_prim_paths)}" | ||
| ) |
Contributor
There was a problem hiding this comment.
Debug print and commented debugger breakpoint left in production code
Suggested change
| from isaaclab.sim.utils import find_matching_prim_paths | |
| env_prim_paths = find_matching_prim_paths("/World/envs/env_.*", stage=self.scene.stage) | |
| print( | |
| "[SceneDebug] env prims after InteractiveScene: " | |
| f"num_envs_setting={self.cfg.scene.num_envs}, env_prims={len(env_prim_paths)}" | |
| ) |
|
|
||
| # import ipdb; ipdb.set_trace() | ||
| env_prim_paths = find_matching_prim_paths("/World/envs/env_.*", stage=self._stage) | ||
| print( |
Contributor
There was a problem hiding this comment.
Commented debugger breakpoint left in code
Comment on lines
126
to
129
| f"num_envs_setting={num_envs}, env_prims={len(env_prim_paths)}" | ||
| ) | ||
|
|
||
| builder = ModelBuilder(up_axis=self._up_axis) |
Contributor
There was a problem hiding this comment.
Debug print statement left in production code
| # store inputs | ||
| self.cfg = cfg | ||
|
|
||
| # TODO(mtrepte): remove |
Contributor
There was a problem hiding this comment.
Fabric cloning disabled globally - verify this doesn't break existing functionality
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Initial impl to add visualizers and scene data providers with omni physics backend.
Also has a few updates for compatibility Isaac Sim 6.0.
visualizers
scene data providers
Type of change
Screenshots
Please attach before and after screenshots of the change if applicable.
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there