-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[Newton] Add Multi-Renderer Support #4115
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?
[Newton] Add Multi-Renderer Support #4115
Conversation
Signed-off-by: jiehanw <[email protected]>
Greptile OverviewGreptile SummaryThis PR introduces a multi-renderer architecture to support different rendering backends (Newton Warp, Omniverse RTX, Kit App) for camera sensors. The implementation adds a new Key Changes:
Critical Issues Found:
The code will not run due to these import and attribute errors. Confidence Score: 0/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User
participant CameraCfg
participant Camera
participant RendererCfg
participant RendererBase
participant NewtonWarpRenderer
participant RenderContext
User->>CameraCfg: Set renderer_type="newton_warp"
User->>Camera: Initialize Camera(cfg)
Camera->>Camera: _initialize_impl()
alt renderer_type == "newton_warp"
Camera->>RendererCfg: Create NewtonWarpRendererCfg
Camera->>NewtonWarpRenderer: NewtonWarpRenderer(cfg)
NewtonWarpRenderer->>RendererBase: super().__init__(cfg)
RendererBase-->>NewtonWarpRenderer: Sets _width, _height
NewtonWarpRenderer->>RenderContext: RenderContext(width, height, num_worlds)
RenderContext-->>NewtonWarpRenderer: _render_context
Camera->>NewtonWarpRenderer: initialize()
NewtonWarpRenderer-->>Camera: (empty implementation)
else other renderer types
Camera->>Camera: raise ValueError
end
Camera->>Camera: _create_buffers()
loop Simulation Steps
User->>Camera: update()
Camera->>Camera: _update_buffers_impl(env_ids)
Camera->>NewtonWarpRenderer: get_output()
NewtonWarpRenderer-->>Camera: _output_data_buffers
Camera->>Camera: _process_annotator_output()
end
User->>Camera: reset(env_ids)
Camera->>NewtonWarpRenderer: reset()
Note over NewtonWarpRenderer: Method not implemented!
|
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.
9 files reviewed, 13 comments
|
|
||
| from typing import TYPE_CHECKING, Any | ||
|
|
||
| from .kit_app_renderer_cfg import KitAppRendererCfg |
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.
syntax: imports KitAppRendererCfg which doesn't exist - no file kit_app_renderer_cfg.py was created
| from .kit_app_renderer_cfg import KitAppRendererCfg | |
| # from .kit_app_renderer_cfg import KitAppRendererCfg |
|
|
||
| # Import config classes (no circular dependency) | ||
| from .newton_warp_renderer_cfg import NewtonWarpRendererCfg | ||
| from .ov_rtx_renderer_cfg import OVRTXRendererCfg |
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.
syntax: imports OVRTXRendererCfg which doesn't exist - no file ov_rtx_renderer_cfg.py was created
| from .ov_rtx_renderer_cfg import OVRTXRendererCfg | |
| # from .ov_rtx_renderer_cfg import OVRTXRendererCfg |
| from .ov_rtx_renderer_cfg import OVRTXRendererCfg | ||
|
|
||
| # Import base classes first | ||
| from .renderer import Renderer |
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.
syntax: imports Renderer but the actual class is named RendererBase in renderer.py:13
| "Renderer", | ||
| "RendererCfg", | ||
| "NewtonWarpRendererCfg", | ||
| "OVRTXRendererCfg", |
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.
syntax: OVRTXRendererCfg is exported but the file doesn't exist
| "RendererCfg", | ||
| "NewtonWarpRendererCfg", | ||
| "OVRTXRendererCfg", | ||
| "KitAppRendererCfg", |
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.
syntax: KitAppRendererCfg is exported but the file doesn't exist
| def step(self): | ||
| """Step the renderer.""" |
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: step() method has no implementation (will do nothing when called)
| @@ -0,0 +1,18 @@ | |||
| # Copyright (c) 2022-2025, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md). | |||
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.
syntax: filename is newton_warp_render_cfg.py but should be newton_warp_renderer_cfg.py (missing "er") to match the class name and import statement in __init__.py:28
| from .camera_cfg import CameraCfg | ||
|
|
||
| from isaaclab.renderer import NewtonWarpRenderer | ||
| from isaaclab.renderer_cfg import NewtonWarpRendererCfg |
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.
syntax: incorrect import path - should be from isaaclab.renderer.newton_warp_renderer_cfg import NewtonWarpRendererCfg or from isaaclab.renderer import NewtonWarpRendererCfg
| self._frame[env_ids] = 0 | ||
|
|
||
| # Reset the renderer | ||
| self._renderer.reset() |
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: self._renderer.reset() is called but RendererBase doesn't have a reset() method defined
| renderer_cfg = NewtonWarpRendererCfg( | ||
| width=self.cfg.width, | ||
| height=self.cfg.height, | ||
| num_cameras=self._num_cameras, |
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: self._num_cameras is not defined anywhere in the Camera class before this usage
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
List any dependencies that are required for this change.
Fixes # (issue)
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