Added method for spawning multi-asset
Description
Regarding issue #3070, I added support for spawning objects in each environment within a multi-USD (or asset) setup using various methods. Users can define custom functions in wrappers/utils.py or any other desired location, specify them in the config, and have them dynamically loaded using hydra.utils.get_method. The loaded choice_fn will then iterate through all prim_paths and assign asset indices based on the defined rules.
Following @Mayankm96 's advice, this design allows for user-defined logic to determine how assets are distributed across environments, providing both built-in methods (e.g., sequential, split) and the flexibility to extend with custom strategies.
I aimed to align this as closely as possible with the Isaac Lab code style and direction, but I'm not sure if it worked well, so I would appreciate your feedback. Basically, I have implemented sequential and split methods, so users can select between these two by default, and they can also add and use additional methods as needed.
Type of change
- New feature (non-breaking change which adds functionality)
Checklist
- [X] I have run the
pre-commitchecks 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
- [ ] I have updated the changelog and the corresponding version in the extension's
config/extension.tomlfile - [X] I have added my name to the
CONTRIBUTORS.mdor my name already exists there
Hi @ooctipus , I think the suggestion about simplifying with random as an option is a great idea.
Regarding the idea about spawning rigidBodyCollection within multi-asset, could you give an example of how that would work? Currently, I’m focusing only on spawning articulation systems using different robots, but I think it could be extended to a more generalized approach.
I tried to incorporate all the suggested comments as much as possible. Please let me know if there are any further improvements that can be made. Additionally, I added a section in the initialization to show the distribution of agents for each asset (30 environments with 4 assets).
Thank you @Kyu3224 this is very nice of you, and thank you @Mayankm96 for the nice suggestion!
@Kyu3224
Big Big sorry!!!!!
We are planning to do a big refactor on spawner + cloner that would 1. drop the requirement for using isaac_sim 2. allow more flexible combination of assets. 3. faster cloning time.
which means this PR will probably not be applicable soon.
Sorry again for all the work, I really appreciate reviewing your PR and discussions.
Feel free to close it, or I can help close it when the refactor comes in : )))