Skip to content

[FIX] Defer asset imports until Kit startup - #7072

Merged
kellyguo11 merged 3 commits into
isaac-sim:developfrom
mmichelis:mmichelis/fix-cables-demo-imports
Aug 13, 2026
Merged

[FIX] Defer asset imports until Kit startup#7072
kellyguo11 merged 3 commits into
isaac-sim:developfrom
mmichelis:mmichelis/fix-cables-demo-imports

Conversation

@mmichelis

@mmichelis mmichelis commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

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 via TYPE_CHECKING imports, matching the existing pattern in scripts/demos/multi_asset.py and scripts/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 newton or --visualizer none are intentionally left Kitless.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Documentation update

Screenshots

Not applicable.

Validation

  • uv run --frozen isaaclab -f
  • Cable demo completed two steps with the Kit visualizer.
  • Deformable-object tutorial started Kit and simulated with each of the three backends, using the documented commands.
  • Confirmed each documented extra is genuinely required: with the tetrahedralization dependencies unavailable, all three backends fail in define_deformable_body_properties.
  • Documentation build completed successfully.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks
  • I have made corresponding documentation changes
  • My changes generate no new warnings
  • No source-package changelog fragment is required
  • My name already exists in CONTRIBUTORS.md

@mmichelis
mmichelis requested a review from a team August 13, 2026 09:11
@github-actions github-actions Bot added bug Something isn't working documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team labels Aug 13, 2026
@greptile-apps

greptile-apps Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR defers cable and deformable asset imports until after simulation runtime initialization and updates the default cable commands to install the Kit visualizer dependencies.

  • Moves runtime asset imports into each script’s scene-construction function.
  • Preserves static type-checking imports with TYPE_CHECKING.
  • Adds the isaacsim extra to documented default cable invocations.

Confidence Score: 5/5

The 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

Filename Overview
scripts/demos/cables.py Defers cable asset imports until scene construction, after runtime launch and simulation-context initialization.
scripts/tutorials/01_assets/run_deformable_object.py Defers deformable asset imports safely; the remaining local variable annotation does not require runtime name resolution.
docs/source/overview/core-concepts/physical-backends/newton/using-cables.rst Adds the valid isaacsim extra to the default Kit-based cable command while preserving Kitless examples.
docs/source/overview/showroom.rst Keeps the showroom cable command consistent with the default Kit visualizer dependency requirement.

Reviews (1): Last reviewed commit: "Fix Kit startup for cable and deformable..." | Re-trigger Greptile

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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’s CableObject annotations, 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.

@kellyguo11
kellyguo11 merged commit a6060a9 into isaac-sim:develop Aug 13, 2026
45 of 46 checks passed
@mmichelis
mmichelis deleted the mmichelis/fix-cables-demo-imports branch August 14, 2026 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants