Add GUI support for object-reference#901
Conversation
a625297 to
5008ca1
Compare
5008ca1 to
1fdb39c
Compare
🤖 Isaac Lab-Arena Review BotSummaryThis PR extends the agentic-environment review GUI to render Design, Boundaries & Scope
Findings🟡 Warning: thumbnail_capture.py:53 — Test CoverageGood: the renamed VerdictMinor fixes needed |
Greptile SummaryThis PR extends the review GUI to support Lightwheel kitchen camera framing and object-reference snapshots. It refactors the thumbnail pipeline from a spec-registry lookup model to a live-asset model, adds
Confidence Score: 3/5Safe to merge for the prim-tree widget and visualization improvements, but the refactored thumbnail path has two unguarded dict accesses that will raise unhandled exceptions whenever any asset fails to instantiate. The two direct dict accesses —
Important Files Changed
Sequence Diagram%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant UI as visualization_panel
participant SVC as visualization_service
participant CAP as thumbnail_capture (SimApp)
participant KIT as Kit Viewport
UI->>SVC: build_asset_cards_with_thumbnails(spec)
SVC->>SVC: resolve_background_prim_tree(spec)
SVC->>CAP: client.render_spec(spec)
CAP->>CAP: _instantiate_assets_from_spec(spec, registry)
CAP->>CAP: resolve_node_usd_paths(assets, node_ids)
loop Per USD stage (_UsdSnapshotJob)
CAP->>KIT: open_stage / wait_for_stage_load
alt asset_captures present
CAP->>KIT: _apply_viewer_cfg OR frame_viewport_prims
KIT-->>CAP: capture_viewport_png → PNG bytes
end
alt ref_captures present
CAP->>KIT: set_selected_prim_paths + frame_viewport_prims
KIT-->>CAP: capture_viewport_png → PNG bytes
CAP->>KIT: clear_selected_prim_paths + disable collision viz
end
end
CAP-->>SVC: "{node_id: path} + {node_id: aabb}"
SVC->>SVC: build_asset_cards(spec, thumbnails, aabb)
SVC-->>UI: (asset_cards, prim_tree)
UI->>UI: render_visualization_widgets(spec, cards, prim_tree)
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant UI as visualization_panel
participant SVC as visualization_service
participant CAP as thumbnail_capture (SimApp)
participant KIT as Kit Viewport
UI->>SVC: build_asset_cards_with_thumbnails(spec)
SVC->>SVC: resolve_background_prim_tree(spec)
SVC->>CAP: client.render_spec(spec)
CAP->>CAP: _instantiate_assets_from_spec(spec, registry)
CAP->>CAP: resolve_node_usd_paths(assets, node_ids)
loop Per USD stage (_UsdSnapshotJob)
CAP->>KIT: open_stage / wait_for_stage_load
alt asset_captures present
CAP->>KIT: _apply_viewer_cfg OR frame_viewport_prims
KIT-->>CAP: capture_viewport_png → PNG bytes
end
alt ref_captures present
CAP->>KIT: set_selected_prim_paths + frame_viewport_prims
KIT-->>CAP: capture_viewport_png → PNG bytes
CAP->>KIT: clear_selected_prim_paths + disable collision viz
end
end
CAP-->>SVC: "{node_id: path} + {node_id: aabb}"
SVC->>SVC: build_asset_cards(spec, thumbnails, aabb)
SVC-->>UI: (asset_cards, prim_tree)
UI->>UI: render_visualization_widgets(spec, cards, prim_tree)
Reviews (1): Last reviewed commit: "Trim kitchen viewer and gui_runner comme..." | Re-trigger Greptile |
- Add Background.get_viewer_cfg with a default, and override it on the Lightwheel robocasa kitchen to frame the interior from an elevated 3/4 angle. - Resolve a background's ViewerCfg in asset_usd and apply it to the snapshot camera when present, otherwise auto-frame the default prim. Signed-off-by: Qian Lin <qianl@nvidia.com>
- Resolve object_reference prim_paths to parent USD subtrees and capture them after the background, framing the viewport tightly on the highlighted prim. - Reset the viewport camera off any background/panorama view before each object_reference capture and enable selected-collider mesh visualization. Signed-off-by: Qian Lin <qianl@nvidia.com>
Seed the background viewer camera before framing object references so frame_viewport_prims inherits a usable view direction instead of the default persp orientation.
Compute per-prim bounding boxes from the parent USD via the relation-solver bbox helper and show [x, y, z] in the card note alongside parent and prim info.
…panel. Load structured UsdPrimRecord entries from the background USD and render them in a searchable HTML tree view without routing through SimApp or catalog text formatting. Signed-off-by: Qian Lin <qianl@nvidia.com>
…lper. Signed-off-by: Qian Lin <qianl@nvidia.com>
Signed-off-by: Qian Lin <qianl@nvidia.com>
Instantiate snapshot assets once via _instantiate_assets_from_spec so thumbnail and AABB helpers read live assets instead of re-resolving specs through the registry.
Call _instantiate_assets_from_spec directly from thumbnail_capture and drop the thin asset_usd wrappers for instantiation, USD paths, and viewer cfg.
Reorder thumbnail_capture.py into spec resolution, capture orchestration, and viewport setup sections, and remove unused single-asset debug helpers.
…lection. Build reference USD targets from spec prim paths and parent asset_paths instead of reopening stages, and select only the subtree root for collider overlays since Kit draws descendant collision meshes automatically.
Drop ObjectReferenceUsdTarget and the intermediate render maps so cache misses are grouped into USD snapshot jobs in one pass.
8f1be56 to
b534b1e
Compare
…l helpers. Let backgrounds opt into custom snapshot framing via get_viewer_cfg, call it directly from thumbnail capture, exclude the embodiment from AABB lookup, and type AABB resolution against ObjectBase. Signed-off-by: Qian Lin <qianl@nvidia.com>
try catch node key error Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Signed-off-by: Qian Lin <qianl@nvidia.com>
Summary
Improve GUI to work for the Iightwheel kitchen camera + object-ref snapshots
Detailed description
Searchable prim tree display
