Skip to content

Initialize viewport state before missing lookup handling - #792

Open
sylvesterkaczmarek wants to merge 2 commits into
isaac-sim:developfrom
sylvesterkaczmarek:fix/get-viewport-render-product-state
Open

Initialize viewport state before missing lookup handling#792
sylvesterkaczmarek wants to merge 2 commits into
isaac-sim:developfrom
sylvesterkaczmarek:fix/get-viewport-render-product-state

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Description

Fix the missing-viewport path in IsaacGetViewportRenderProduct.

OgnIsaacGetViewportRenderProductInternalState.__init__() currently assigns viewport = None to a local variable instead of self.viewport. If get_viewport_from_window_name() cannot resolve the requested viewport on the first compute, the node then evaluates db.per_instance_state.viewport is None before that attribute exists and can raise AttributeError instead of following its documented warning/False path.

Initialize the instance cache correctly with self.viewport = None. Also make the existing warning interpolate the requested viewport name instead of logging the literal {db.inputs.viewport} text.

Validation

  • focused regression test forces a viewport lookup miss on a fresh internal state
  • verifies compute() returns False rather than raising
  • verifies the cache remains None and the node is marked uninitialized
  • verifies the warning includes the requested viewport name
  • production diff is two corrected lines

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant