Skip to content

Conversation

Mayankm96
Copy link
Contributor

@Mayankm96 Mayankm96 commented Sep 6, 2025

Description

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 #3298

Type of change

  • 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)

Checklist

  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • 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

@Mayankm96 Mayankm96 requested review from Copilot, kellyguo11 and renezurbruegg and removed request for Copilot September 6, 2025 07:43
Copy link
Contributor

@Copilot Copilot AI left a 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() with GetFilteredChildren(Usd.TraverseInstanceProxies()) to include instanced prims
  • Updates three utility functions: get_all_matching_child_prims, get_first_matching_child_prim, and make_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.

Copy link
Collaborator

@renezurbruegg renezurbruegg left a 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.

@Mayankm96 Mayankm96 added the enhancement New feature or request label Sep 10, 2025
@Mayankm96 Mayankm96 merged commit 9d501c3 into isaac-sim:main Sep 10, 2025
9 of 11 checks passed
@Mayankm96 Mayankm96 deleted the fix/instanced-proxies branch September 18, 2025 05:24
ooctipus pushed a commit to ooctipus/IsaacLab that referenced this pull request Sep 20, 2025
)

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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants