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

Adds USD-level randomization to event manager #1165

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

Conversation

Mayankm96
Copy link
Contributor

@Mayankm96 Mayankm96 commented Oct 6, 2024

Description

Certain scene-level randomizations (such as randomizing the scale) must happen before the simulation starts playing. To this end, the MR adds a new event mode called "scene," which gets called right after the scene design is complete.

Since the event manager CANNOT be initialized before the simulation starts playing, the current implementation hacks the event mode into the environment constructor directly. This is not ideal but at this point, there is no other way around it.

Type of change

  • New feature (non-breaking change which adds functionality)

Screenshots

If you execute:

./isaaclab.sh -p source/standalone/tutorials/03_envs/create_cube_base_env.py --num_envs 32

Output:

random

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 changed the title Adds scene-level randomization to event manager Adds USD-level randomization to event manager Oct 6, 2024
@Mayankm96 Mayankm96 marked this pull request as ready for review October 7, 2024 12:12
@Mayankm96
Copy link
Contributor Author

I already spent a day trying to figure out multiple ways to initialize the event manager before the sim starts playing. The scene entity config resolution is impossible until physics parses the scene (since we need the PhysX body and joint ordering). It is rather unfortunate, but that's how it is right now.

The functionality still works, so if it makes sense, we can move forward with it.

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.

1 participant