Skip to content

Fixes visual prims handling during texture randomization. - #2476

Merged
kellyguo11 merged 8 commits into
isaac-sim:mainfrom
KumoLiu:fix-randomize-texture
Jun 17, 2025
Merged

kellyguo11 merged 8 commits into
isaac-sim:mainfrom
KumoLiu:fix-randomize-texture

Conversation

@KumoLiu

@KumoLiu KumoLiu commented May 13, 2025 •

Copy link
Copy Markdown
Contributor

Description

Fixed potential issues in :func:~isaaclab.envs.mdp.events.randomize_visual_texture_material related to handling visual prims during texture randomization.

Fixes # (issue)

Type of change

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

Screenshots

Please attach before and after screenshots of the change if applicable.

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

# create the affected prim path
# TODO: Remove the hard-coded "/visuals" part.
prim_path = f"{asset.cfg.prim_path}/{body_names_regex}/visuals"
# Check if the pattern with '/visuals' yields results when matching `body_names_regex`.

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.

Can you please modify the unit test for this function to showcase the cases that's getting handled here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hi @Mayankm96, Thank you for the suggestion. The change I'm implementing aims to handle cases where the visual prim path does not end with visuals. I've checked the assets used in the test cases, and all of them end with visuals.

In my use case, the table prim path I'm working with is something like /World/envs/env_./Table/.. I haven't found any assets that could show this benefit in the test file. Do you have any suggestions?

Thank you!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@Mayankm96, Could you please take a look at the test I added? I mocked the find_matching_prim_paths function to return an empty list, allowing it to trigger the fallback behavior. This tests the scenario where the /visuals pattern doesn't match. thanks.

@KumoLiu
KumoLiu requested a review from Mayankm96 June 12, 2025 07:21
@KumoLiu

KumoLiu commented Jun 16, 2025

Copy link
Copy Markdown
Contributor Author

Hi @kellyguo11, could you please help review the PR? Thanks.

@kellyguo11 kellyguo11 changed the title Fixed visual prims handling during texture randomization. Fixes visual prims handling during texture randomization. Jun 17, 2025
@kellyguo11
kellyguo11 merged commit 91ad494 into isaac-sim:main Jun 17, 2025
harry-wf-cheung pushed a commit to harry-wf-cheung/IsaacLab-Harry that referenced this pull request Jul 30, 2025
…#2476)

# Description

<!--
Thank you for your interest in sending a pull request. Please make sure
to check the contribution guidelines.

Link:
https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html
-->

Fixed potential issues in
:func:`~isaaclab.envs.mdp.events.randomize_visual_texture_material`
related to handling visual prims during texture randomization.

Fixes # (issue)

<!-- As a practice, it is recommended to open an issue to have
discussions on the proposed pull request.
This makes it easier for the community to keep track of what is being
developed or added, and if a given feature
is demanded by more than one party. -->

## Type of change

<!-- As you go through the list, delete the ones that are not
applicable. -->

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

## Screenshots

Please attach before and after screenshots of the change if applicable.

<!--
Example:

| Before | After |
| ------ | ----- |
| _gif/png before_ | _gif/png after_ |

To upload images to a PR -- simply drag and drop an image while in edit
mode and it should upload the image directly. You can then paste that
source into the above before/after sections.
-->

## Checklist

- [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
- [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

<!--
As you go through the checklist above, you can mark something as done by
putting an x character in it

For example,
- [x] I have done this task
- [ ] I have not done this task
-->

---------

Signed-off-by: YunLiu <[email protected]>
LJones-alt pushed a commit to LJones-alt/IsaacLab-Laura that referenced this pull request Jul 1, 2026
…#2476)

# Description

<!--
Thank you for your interest in sending a pull request. Please make sure
to check the contribution guidelines.

Link:
https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html
-->

Fixed potential issues in
:func:`~isaaclab.envs.mdp.events.randomize_visual_texture_material`
related to handling visual prims during texture randomization.

Fixes # (issue)

<!-- As a practice, it is recommended to open an issue to have
discussions on the proposed pull request.
This makes it easier for the community to keep track of what is being
developed or added, and if a given feature
is demanded by more than one party. -->

## Type of change

<!-- As you go through the list, delete the ones that are not
applicable. -->

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

## Screenshots

Please attach before and after screenshots of the change if applicable.

<!--
Example:

| Before | After |
| ------ | ----- |
| _gif/png before_ | _gif/png after_ |

To upload images to a PR -- simply drag and drop an image while in edit
mode and it should upload the image directly. You can then paste that
source into the above before/after sections.
-->

## Checklist

- [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
- [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

<!--
As you go through the checklist above, you can mark something as done by
putting an x character in it

For example,
- [x] I have done this task
- [ ] I have not done this task
-->

---------

Signed-off-by: YunLiu <[email protected]>
csj-275 pushed a commit to csj-275/IsaacLab that referenced this pull request Jul 8, 2026
…#2476)

# Description

<!--
Thank you for your interest in sending a pull request. Please make sure
to check the contribution guidelines.

Link:
https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html
-->

Fixed potential issues in
:func:`~isaaclab.envs.mdp.events.randomize_visual_texture_material`
related to handling visual prims during texture randomization.

Fixes # (issue)

<!-- As a practice, it is recommended to open an issue to have
discussions on the proposed pull request.
This makes it easier for the community to keep track of what is being
developed or added, and if a given feature
is demanded by more than one party. -->

## Type of change

<!-- As you go through the list, delete the ones that are not
applicable. -->

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

## Screenshots

Please attach before and after screenshots of the change if applicable.

<!--
Example:

| Before | After |
| ------ | ----- |
| _gif/png before_ | _gif/png after_ |

To upload images to a PR -- simply drag and drop an image while in edit
mode and it should upload the image directly. You can then paste that
source into the above before/after sections.
-->

## Checklist

- [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
- [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

<!--
As you go through the checklist above, you can mark something as done by
putting an x character in it

For example,
- [x] I have done this task
- [ ] I have not done this task
-->

---------

Signed-off-by: YunLiu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants