Removes majority of dependencies of omni.usd#4685
Open
ooctipus wants to merge 1 commit intoisaac-sim:developfrom
Open
Removes majority of dependencies of omni.usd#4685ooctipus wants to merge 1 commit intoisaac-sim:developfrom
ooctipus wants to merge 1 commit intoisaac-sim:developfrom
Conversation
f81ecbd to
9cd8ce4
Compare
Contributor
Greptile SummaryThis PR significantly refactors the USD stage lifecycle management to use pure USD ( Major changes:
Issues found:
Breaking changes:
Confidence Score: 3/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Application Start] --> B{has_kit?}
B -->|Yes| C[Kit Mode]
B -->|No| D[Kitless Mode]
C --> E[create_new_stage]
D --> E
E --> F[Usd.Stage.CreateInMemory]
F --> G[Insert in StageCache]
G --> H[Set _context.stage]
H --> I{Kit Mode?}
I -->|Yes| J[Attach to omni.usd context]
I -->|No| K[Skip Kit attachment]
J --> L[SimulationContext ready]
K --> L
L --> M[Use pure USD APIs]
M --> N{Operation needs Kit?}
N -->|Yes| O[has_kit check]
N -->|No| P[Direct USD operation]
O -->|True| Q[Use Kit API]
O -->|False| R[Skip or fallback]
Q --> S[Complete]
P --> S
R --> S
Last reviewed commit: 9cd8ce4 |
| return stage | ||
|
|
||
| return stage | ||
|
|
Contributor
There was a problem hiding this comment.
get_current_stage() returns None when _context.stage is not set, which will cause runtime errors. Should raise an exception or fall back to Kit context.
Suggested change
| raise RuntimeError("No current stage set. Call create_new_stage() or open_stage() first.") |
Comment on lines
468
to
469
| omni.kit.app.get_app_interface().update() | ||
|
|
Contributor
There was a problem hiding this comment.
clear_stage() calls omni.kit.app without checking if Kit is available (kitless mode). Use has_kit() check.
Suggested change
| omni.kit.app.get_app_interface().update() | |
| if has_kit() and builtins.ISAAC_LAUNCHED_FROM_TERMINAL is False: # type: ignore | |
| omni.kit.app.get_app_interface().update() |
9cd8ce4 to
0d9bd21
Compare
0d9bd21 to
c778f10
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR removes majority dependencies of relying on omni.usd to manage stage lifecylce. Instead we use pxr directly to manage stage lifecylce and only attach the stage to omni.usd's context when kit needs it.
This helps clean up our repo's dependencies by a lot.
Type of change
Screenshots
Please attach before and after screenshots of the change if applicable.
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there