Skip to content
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

Hpatel/feat/texture randomization #1705

Open
wants to merge 5 commits into
base: feature/texture-randomization
Choose a base branch
from

Conversation

hapatel-bdai
Copy link
Collaborator

Description

Added a visual test of the texture randomization functionality working

Type of change

  • Created check_texture_randomization.py which has a visual test to make sure the texture randomization functionality works as intended, added some print statements for user clarity on when new random textures are being applied
  • Added a Warning check for the replicate physics variable in randomize_visual_texture_material() to assure users have the bool set to False, which is ideal for the intended use case

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


# check to make sure replicate_physics is set to False, else raise warning
if replicate_physics:
raise Warning("replicate_physics is set to True, meaning all environments will have same textures applied.")
Copy link
Contributor

Choose a reason for hiding this comment

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

This is never desired. You should throw a runtime error and tell the user to set this parameter as false in the InteractiveSceneCfg

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Do you mean we should change this to an error just in here? Or do you mean we should move the error to within the InteractiveSceneCfg?

@@ -233,6 +236,7 @@ def __call__(
env_ids: torch.Tensor,
event_name: str,
asset_cfg: SceneEntityCfg,
replicate_physics: bool,
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this parsed here? You should get it from the scene, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed, now referenced directly from the scene

)


def main():
Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't a unit test. We should do it properly to check that texture is applied on the prim (besides visual inspection)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The initial idea was to check the textures being applied changed on reset for the prims in the scene, however I was unable to find a way to directly access the albedo map information for each prim. If you have a way to access this information or a different approach I can convert this into a unit test.

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