[FIX] Defer asset imports until Kit startup - #7072
Conversation
Greptile SummaryThis PR defers cable and deformable asset imports until after simulation runtime initialization and updates the default cable commands to install the Kit visualizer dependencies.
Confidence Score: 5/5The PR appears safe to merge with no actionable defects identified. The deferred imports occur after runtime initialization, type-only references remain safe, and the updated commands use the repository’s defined Isaac Sim extra only for the Kit-dependent path. Important Files Changed
Reviews (1): Last reviewed commit: "Fix Kit startup for cable and deformable..." | Re-trigger Greptile |
There was a problem hiding this comment.
Isaac Lab Review Bot
The change defers cable and deformable asset imports until scene construction, avoiding their runtime initialization during pre-Kit module loading. The default cable documentation now installs the isaacsim extra required by the Kit visualizer.
- Design and architecture: The lazy imports are narrowly scoped to
design_scene()in both scripts, while CLI parsing and launcher setup remain at module scope. This preserves the existing script structure and limits the change to the asset imports implicated in startup ordering. - API: Public APIs and CLI options remain unchanged. The documented default cable invocation now matches its Kit visualizer dependency, while explicitly Kitless visualizer examples remain unchanged.
- Implementation: The asset classes and configurations are imported at scene-construction time, with type-only imports retained under
TYPE_CHECKING. Postponed annotation evaluation protects the cable demo’sCableObjectannotations, and the shown deformable tutorial change introduces no runtime-evaluated annotation requiring the deferred symbol.
No blocking issues. No inline issue met the actionable-evidence threshold; the assessment above records the review feedback.
Automated review; human maintainers own approval decisions.
Description
Defer the cable and deformable runtime asset imports until after
launch_simulation()starts Kit. This prevents the standalone USD runtime from loading before Kit initializes its bundled USD runtime. The type annotations are kept viaTYPE_CHECKINGimports, matching the existing pattern inscripts/demos/multi_asset.pyandscripts/demos/procedural_terrain.py.Correct the documented commands for both demos so they install the extras their default configuration actually needs. The cable demo defaults to the Kit visualizer, so it needs
--extra isaacsim. The deformable tutorial defaults to Kit and always tetrahedralizes its volume deformables, so it needs--extra isaacsim --extra tetrahedralization; its OvPhysX example stays Kitless but needs--extra ovphysx --extra tetrahedralization. The cable examples that pass--visualizer newtonor--visualizer noneare intentionally left Kitless.Type of change
Screenshots
Not applicable.
Validation
uv run --frozen isaaclab -fdefine_deformable_body_properties.Checklist
CONTRIBUTORS.md