@@ -166,13 +166,6 @@ def clone_environments(self, copy_from_source: bool = False):
166
166
If True, clones are independent copies of the source prim and won't reflect its changes (start-up time
167
167
may increase). Defaults to False.
168
168
"""
169
- env_origins = self .cloner .clone (
170
- source_prim_path = self .env_prim_paths [0 ],
171
- prim_paths = self .env_prim_paths ,
172
- replicate_physics = self .cfg .replicate_physics ,
173
- copy_from_source = copy_from_source ,
174
- )
175
-
176
169
# check if user spawned different assets in individual environments
177
170
# this flag will be None if no multi asset is spawned
178
171
carb_settings_iface = carb .settings .get_settings ()
@@ -184,6 +177,14 @@ def clone_environments(self, copy_from_source: bool = False):
184
177
" This may adversely affect PhysX parsing. We recommend disabling this property."
185
178
)
186
179
180
+ # clone the environment
181
+ env_origins = self .cloner .clone (
182
+ source_prim_path = self .env_prim_paths [0 ],
183
+ prim_paths = self .env_prim_paths ,
184
+ replicate_physics = self .cfg .replicate_physics ,
185
+ copy_from_source = copy_from_source ,
186
+ )
187
+
187
188
# in case of heterogeneous cloning, the env origins is specified at init
188
189
if self ._default_env_origins is None :
189
190
self ._default_env_origins = torch .tensor (env_origins , device = self .device , dtype = torch .float32 )
0 commit comments