Skip to content

Fixed visual prims handling during texture randomization. #2476

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

KumoLiu
Copy link
Contributor

@KumoLiu KumoLiu commented May 13, 2025

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

@@ -1188,8 +1188,25 @@ def __init__(self, cfg: EventTermCfg, env: ManagerBasedEnv):
body_names_regex = ".*"

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

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.

2 participants