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

[Question] Can I have different number of objects in each sub-environment? #704

Open
QuanyiLi opened this issue Jul 19, 2024 · 3 comments
Open
Labels
enhancement New feature or request

Comments

@QuanyiLi
Copy link

QuanyiLi commented Jul 19, 2024

Question

Hi IsaacLab team,

Thank you for this great work! I got a question about the parallel training.

As far as I know, parallel training is launched by using the clone method, which replicates the same scene thousands of times with domain randomization applied to each replicated scene. As a result, the objects in the scene can have different initial conditions.

However, it seems that is not allowed to have different objects in each sub-environment so we can not vary the number of objects (correct me if I am wrong). This prevents researchers from doing scene-level parallel training, where each scene consists of a different number/types of objects. For example, if I have a 1K room in different layouts, and I want to train navigation policy in it, I can not load each room to a single sub-environment as they have different layouts/objects in each room. So I need to fall back to using traditional multi-processing as a workaround.

I wonder if it is easy to have this feature supported. I believe it can bring much more speed-up, compared to doing the parallelization with multi-processing.

@animesh-garg animesh-garg added the enhancement New feature or request label Jul 20, 2024
@hutslib
Copy link

hutslib commented Jul 25, 2024

I meet the same problem and have the same need。
Is there any way to workaround this?
@animesh-garg

@QuanyiLi
Copy link
Author

QuanyiLi commented Jul 25, 2024

@hutslib A simple workaround that comes to my mind is first to find all objects you need for all sub-environments. After this, the clone would copy this environment with all assets. Then for each sub-environment, you can put objects that you don't need in a place that your agent can not observe, i.e. underground as if the training environment is composed of only the objects observable. This allows you to simulate parallel environments with different numbers of objects at the same time, though all sub-environments still have the same number of objects.

(It is just a guess, I don't verify this yet

@animesh-garg
Copy link

@hutslib A simple workaround that comes to my mind is first to find all objects you need for all sub-environments. After this, the clone would copy this environment with all assets. Then for each sub-environment, you can put objects that you don't need in a place that your agent can not observe, i.e. underground as if the training environment is composed of only the objects observable. This allows you to simulate parallel environments with different numbers of objects at the same time, though all sub-environments still have the same number of objects.

(It is just a guess, I don't verify this yet

Yes I think this should be a viable solution. Basically the idea is that each env has the same number of entities preallocated which enables the tensorAPI to function correctly.

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

No branches or pull requests

3 participants