-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Replaces IsaacSim prim_utils with IsaacLab prim_utils
#3924
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replaces IsaacSim prim_utils with IsaacLab prim_utils
#3924
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Overview
Greptile Summary
This PR updates a docstring reference in visualization_markers.py to align documentation with the actual implementation. The reference to isaacsim.core.utils.create_prim has been replaced with isaaclab.sim.utils.prims.create_prim.
Context:
- In commit 8e411a8, the
prim_utilsfunctionality was reimplemented in IsaacLab atisaaclab/sim/utils/prims.py - The actual code implementation (in spawner modules) already uses the IsaacLab version via
import isaaclab.sim.utils.prims - This PR simply updates the docstring to reflect the correct module path that's already in use
Changes:
- Updated docstring reference from
isaacsim.core.utils.create_primtoisaaclab.sim.utils.prims.create_priminVisualizationMarkersclass documentation
This is a documentation-only change with no functional impact.
Confidence Score: 5/5
- This PR is safe to merge with no risk - it's a documentation-only change that fixes an outdated reference
- Score reflects that this is purely a documentation update with zero functional changes. The docstring reference is being updated to match the actual implementation that was already changed in a previous commit (8e411a8). The new reference correctly points to the IsaacLab prim_utils module that is already being used by the codebase.
- No files require special attention
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| source/isaaclab/isaaclab/markers/visualization_markers.py | 5/5 | Documentation-only update: replaced outdated isaacsim.core.utils.create_prim reference with correct isaaclab.sim.utils.prims.create_prim reference |
Sequence Diagram
sequenceDiagram
participant Dev as Developer
participant Doc as Documentation
participant Code as Implementation Code
participant IsaacLab as isaaclab.sim.utils.prims
Note over Dev,IsaacLab: PR #3924: Documentation Update
Dev->>Doc: Update docstring reference
Doc->>Doc: Change isaacsim.core.utils.create_prim
Doc->>Doc: To isaaclab.sim.utils.prims.create_prim
Note over Code,IsaacLab: Implementation (already updated in commit 8e411a8)
Code->>IsaacLab: Already imports prim_utils
Code->>IsaacLab: Uses create_prim() from IsaacLab
Note over Dev,IsaacLab: Result: Documentation now matches implementation
1 file reviewed, no comments
|
Looks like tests are failing 👀 |
Greptile OverviewGreptile SummaryThis PR successfully replaces IsaacSim's Key Changes
Architecture ImpactThe refactoring maintains backward compatibility at the API level - all existing function signatures remain unchanged. The new implementation still depends on IsaacSim for core functionality ( Confidence Score: 3/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User as User Code
participant Spawners as Spawners<br/>(shapes, meshes, etc.)
participant PrimUtils as isaaclab.sim.utils.prims
participant SimUtils as isaaclab.sim.utils
participant Semantics as isaaclab.sim.utils.semantics
participant IsaacSim as IsaacSim Core<br/>(XFormPrim, SimulationContext)
participant USD as USD Stage
User->>Spawners: spawn_cone(cfg)
Spawners->>PrimUtils: create_prim(path, type, ...)
PrimUtils->>PrimUtils: define_prim(path, type)
PrimUtils->>USD: DefinePrim()
USD-->>PrimUtils: Usd.Prim
alt semantic_label provided
PrimUtils->>Semantics: add_labels(prim, labels)
Semantics->>USD: Apply UsdSemantics.LabelsAPI
end
alt transformations provided
PrimUtils->>IsaacSim: XFormPrim(path, positions, ...)
IsaacSim->>USD: Apply transforms
end
PrimUtils-->>Spawners: Usd.Prim
alt cloning needed
Spawners->>SimUtils: clone(func)(cfg, prim_path)
SimUtils->>SimUtils: find_matching_prim_paths(regex)
SimUtils->>USD: Traverse and match paths
USD-->>SimUtils: matched paths
SimUtils->>USD: Clone prims
end
Spawners-->>User: spawned prims
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
59 files reviewed, 1 comment
| eval("attr.Set(usdrt." + SDF_type_to_Gf[type_name] + "(*value))") | ||
| else: | ||
| eval("attr.Set(" + SDF_type_to_Gf[type_name] + "(*value))") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: uses eval() with string concatenation - while SDF_type_to_Gf dict is controlled and validated, prefer safer alternatives like getattr() or direct type mapping
| eval("attr.Set(usdrt." + SDF_type_to_Gf[type_name] + "(*value))") | |
| else: | |
| eval("attr.Set(" + SDF_type_to_Gf[type_name] + "(*value))") | |
| if fabric: | |
| import usdrt.Gf as Gf | |
| type_class = getattr(Gf, SDF_type_to_Gf[type_name].split('.')[-1]) | |
| attr.Set(type_class(*value)) | |
| else: | |
| from pxr import Gf | |
| type_class = getattr(Gf, SDF_type_to_Gf[type_name].split('.')[-1]) | |
| attr.Set(type_class(*value)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
58 files reviewed, no comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
58 files reviewed, no comments
|
@ooctipus lets get that one merged too |
|
the package import for prim_utils doesn't work for the same reason as stage_utils, we used too many wild card need to change to |
That's not great, let's split up the utils/utils.py now to enable those imports again |
86086e0 to
9be7fe9
Compare
kellyguo11
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we are adding a lot of new code, do we have plans to add tests for all the new utils?
Signed-off-by: ooctipus <[email protected]>
Signed-off-by: ooctipus <[email protected]>
AntoineRichard
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do we do with these?
|
@pascal-roth Thanks for putting this together. I’m not fully convinced these one-line wrappers add much value, though. Since USD already has solid documentation, I wonder if maintaining parallel Isaac Sim functions might increase overhead without clear benefit. Would it make sense to remove these helpers and reference USD directly instead? Personally, I’d prefer removing the wrappers altogether, but I’m fine handling that either here or in a follow-up MR depending on what keeps the review simplest. |
|
I agree is Mayank, my personal opinion is to remove this wrapper in follow up PR, as thorough removal require more thorough refactor, this pr is more likely what will lands in newton for the only purpose of remove kit dependency, and we make sure the main has something similar. |
|
sounds like we are mostly ok with this PR to go in for now to be in alignment with the newton branch, but we should look into cleaning up all of the utilities in a follow-up PR. I think we should get this merged in then so that we also do not block the multi-mesh raycaster PR. @Mayankm96 @ooctipus @AntoineRichard are you guys ok to give approval to merge this? |
Signed-off-by: Kelly Guo <[email protected]>
…3924) # Description Remove dependency on IsaacSim `prim_utils` for integration of new simulation engines like `newton`. NOTE: this PR depends on isaac-sim#3923 ## Type of change - Dependency removal ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [ ] I have added my name to the `CONTRIBUTORS.md` or my name already exists there --------- Signed-off-by: ooctipus <[email protected]> Signed-off-by: Kelly Guo <[email protected]> Co-authored-by: Octi Zhang <[email protected]> Co-authored-by: Kelly Guo <[email protected]>
…3924) # Description Remove dependency on IsaacSim `prim_utils` for integration of new simulation engines like `newton`. NOTE: this PR depends on isaac-sim#3923 ## Type of change - Dependency removal ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [ ] I have added my name to the `CONTRIBUTORS.md` or my name already exists there --------- Signed-off-by: ooctipus <[email protected]> Signed-off-by: Kelly Guo <[email protected]> Co-authored-by: Octi Zhang <[email protected]> Co-authored-by: Kelly Guo <[email protected]>
Description
Remove dependency on IsaacSim
prim_utilsfor integration of new simulation engines likenewton.NOTE: this PR depends on #3923
Type of change
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there