-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com>
Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com>
@@ -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`. |
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.
Can you please modify the unit test for this function to showcase the cases that's getting handled here?
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.
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!
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.
@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.
Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com>
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
Screenshots
Please attach before and after screenshots of the change if applicable.
Checklist
pre-commit
checks with./isaaclab.sh --format
config/extension.toml
fileCONTRIBUTORS.md
or my name already exists there