Fix review GUI viewport camera setup regression#941
Conversation
Replaces the unavailable isaacsim.core.utils.viewports.set_camera_view with a local set_viewport_camera_eye_lookat helper. Route simulation previews through SimulationContext's camera API. Signed-off-by: Qian Lin <qianl@nvidia.com>
Migrate review GUI iframes and container-width controls before their legacy APIs are removed. Signed-off-by: Qian Lin <qianl@nvidia.com>
Include the examples test suite in existing CI phases and isolate its Isaac Sim smoke tests in the subprocess phase. Signed-off-by: Qian Lin <qianl@nvidia.com>
Greptile SummaryThis PR fixes a viewport camera regression introduced during the IsaacLab beta2 upgrade by replacing the removed
Confidence Score: 3/5Safe to merge the camera and CI changes; the Streamlit visualization panels (Mermaid graph and prim tree) will be silently broken until the st.iframe calls are corrected. The viewport camera fix and CI wiring are clean and well-reasoned. The Streamlit migration has a straightforward mistake in visualization_widgets.py: st.iframe receives raw HTML document strings where it expects a URL, so the spatial graph and prim-tree panels will render as blank iframes for all users of the review GUI. visualization_widgets.py — both st.iframe call sites need to be replaced with st.html (or st.components.v1.html) since the rendered content is raw HTML, not a URL. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["_apply_viewer_cfg(app, viewer_cfg)"] --> B["get_active_viewport()"]
B --> C["set_viewport_camera_eye_lookat(viewport, eye, lookat)"]
C --> D{"viewport is not None?"}
D -- Yes --> E["viewport.get_active_camera()"]
D -- No --> F["camera_path = '/OmniverseKit_Persp'"]
E -- path found --> G["ViewportCameraState(camera_path, viewport)"]
E -- no path --> F
F --> G
G --> H["set_position_world(eye, rotate=False)"]
H --> I["set_target_world(lookat, rotate=True)"]
J["_apply_overview_camera(env, app, ...)"] --> K["_overview_camera(num_envs, env_spacing)"]
K --> L["env.unwrapped.sim.set_camera_view(eye, target)"]
L --> M["pump_app(app, PRE_CAPTURE_UPDATES)"]
Reviews (1): Last reviewed commit: "Run example tests in CI" | Re-trigger Greptile |
| st.iframe( | ||
| render_prim_tree_html(prim_tree), | ||
| height=estimate_prim_tree_height_px(prim_tree), | ||
| scrolling=True, | ||
| ) |
There was a problem hiding this comment.
st.iframe takes a URL, not an HTML string
render_prim_tree_html() returns a complete <!DOCTYPE html> document. st.iframe(src, ...) expects src to be a URL pointing to an embeddable page — passing raw HTML as its first argument will silently set the iframe's src attribute to the HTML string itself, which the browser will try to load as a relative path and get a 404, leaving a blank embed. The same issue affects the Mermaid graph block at line 119. The correct top-level replacement for st.components.v1.html(html_str, height=N, scrolling=True) is st.html(html_str) (Streamlit ≥1.36) or continuing to use st.components.v1.html with the scrolling argument removed.
| st.iframe( | ||
| render_mermaid_html(spec), | ||
| height=estimate_mermaid_height_px(spec), | ||
| scrolling=True, | ||
| ) |
There was a problem hiding this comment.
Same
st.iframe/HTML-string mismatch as the prim-tree block
render_mermaid_html(spec) returns a full <!DOCTYPE html> document (confirmed in mermaid_graph.py lines 85-100). Passing it to st.iframe as the first positional argument treats it as a URL source, so the Mermaid spatial-graph panel will render as an empty frame. This should use st.html() (or st.components.v1.html) the same way as the prim-tree fix above.
| return | ||
| with st.expander("Background prim tree", expanded=False): | ||
| st.components.v1.html( | ||
| st.iframe( |
There was a problem hiding this comment.
🟡 Bump the streamlit pin for the new APIs
st.iframe only exists in newer Streamlit (~1.56 — it replaced the now-deprecated st.components.v1.iframe), and width="stretch" landed in a 2025 release. But pyproject.toml still pins streamlit>=1.30, so anyone who resolves an older 1.3x–1.5x version hits an AttributeError here (and on the width="stretch" calls). Could we raise the floor to streamlit>=1.56 so the pin matches what the code now needs?
🤖 Isaac Lab-Arena Review BotSummaryFocused regression fix for the review-GUI SimApp: the removed viewport-camera APIs are replaced with a Kit-compatible Findings🟡 Warning: visualization_widgets.py:95 — Test CoverageThe three Isaac Sim smoke tests correctly gain One thing worth a look: the actual code that was fixed ( VerdictMinor fixes needed |
Summary
Fix review GUI viewport camera setup
Detailed description