-
Notifications
You must be signed in to change notification settings - Fork 3k
[WIP] Add Visualizers and Scene Data Providers #4474
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: develop
Are you sure you want to change the base?
Conversation
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
|
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.
4 files reviewed, 4 comments
| 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)}" | ||
| ) |
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.
Debug print and commented debugger breakpoint left in production code
| 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( |
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.
Commented debugger breakpoint left in code
| f"num_envs_setting={num_envs}, env_prims={len(env_prim_paths)}" | ||
| ) | ||
|
|
||
| builder = ModelBuilder(up_axis=self._up_axis) |
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.
Debug print statement left in production code
| # store inputs | ||
| self.cfg = cfg | ||
|
|
||
| # TODO(mtrepte): remove |
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.
Fabric cloning disabled globally - verify this doesn't break existing functionality
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