-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Adds parsing of instanced meshes to fetching prims utils #3367
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
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.
Pull Request Overview
This PR enhances prim traversal utilities to include support for instanced prims, which were previously skipped during traversal operations.
- Replaces
GetChildren()
withGetFilteredChildren(Usd.TraverseInstanceProxies())
to include instanced prims - Updates three utility functions:
get_all_matching_child_prims
,get_first_matching_child_prim
, andmake_uninstanceable
- Adds comprehensive test coverage for the new instanced prim functionality
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
source/isaaclab/isaaclab/sim/utils.py | Updates three functions to traverse instanced prims using GetFilteredChildren() |
source/isaaclab/test/sim/test_utils.py | Adds test cases for instanced prim traversal and imports UsdPhysics module |
source/isaaclab/docs/CHANGELOG.rst | Documents the changes for version 0.46.0 |
source/isaaclab/config/extension.toml | Bumps version number to 0.46.0 |
source/isaaclab/utils/assets.py | Removes copyright header (appears to be incomplete file content) |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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.
LGTM! I have this changes locally since a few months and never had any issues.
Only thing to discuss, I think it could be helpful to add an argument "skip_instanced_prims" or similar, to recover the old functionality of the methods if anyone needs it.
Signed-off-by: Mayank Mittal <[email protected]>
) This MR does the following: * Adds parsing of instanced prims in `isaaclab.sim.utils.get_all_matching_child_prims` and `isaaclab.sim.utils.get_first_matching_child_prim`. Earlier, instanced prims were skipped since `Usd.Prim.GetChildren` does not return instanced prims. * Adds parsing of instanced prims in `isaaclab.sim.utils.make_uninstanceable` to make all prims uninstanceable. These are needed to parse meshes for the dynamic raycaster class in - Bug fix (non-breaking change which fixes an issue) - New feature (non-breaking change which adds functionality) - Breaking change (fix or feature that would cause existing functionality to not work as expected) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there --------- Signed-off-by: Mayank Mittal <[email protected]> Co-authored-by: Kelly Guo <[email protected]>
Description
This MR does the following:
isaaclab.sim.utils.get_all_matching_child_prims
andisaaclab.sim.utils.get_first_matching_child_prim
. Earlier, instanced prims were skipped sinceUsd.Prim.GetChildren
does not return instanced prims.isaaclab.sim.utils.make_uninstanceable
to make all prims uninstanceable.These are needed to parse meshes for the dynamic raycaster class in #3298
Type of change
Checklist
pre-commit
checks with./isaaclab.sh --format
config/extension.toml
fileCONTRIBUTORS.md
or my name already exists there