How does domain randomization recognize all rigid prims in an environment with a specified env_id, and randomize them?

Hi community!

I want to set up a gym RL environment similar to those in OmniIsaacGymEnvs on Isaac Sim, and I want to apply domain randomization on reset.

In the official example, a reset_inds can be passed to specify the environment where domain randomization should be applied.

My question is: how does the domain randomization know which prims are inside the environment with a specific env_id (in case I want to apply domain randomization for rigid_prim_views)?

When setting up the domain randomization, only the rigid_prim_view name is required. There is no need to specify the env_id of each prim. I am afraid of randomizing a wrong rigid prim when passing reset_inds.

Thanks in advance!

Hi there, the domain randomization framework works under the assumption that each environment is identical. When the name of an Articulation or Rigid Prim View is specified during setup, the View should also contain articulations or rigid bodies of all environments. We will register the View to the domain randomization framework, which will then index from the prims inside the View when reset_inds are passed. Only items in the registered views at the reset_inds indices will be randomized on reset.