Skip to content

Commit 49353c3

Browse files
committed
moves the check up
1 parent 1378991 commit 49353c3

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

source/extensions/omni.isaac.lab/omni/isaac/lab/scene/interactive_scene.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,6 @@ def clone_environments(self, copy_from_source: bool = False):
166166
If True, clones are independent copies of the source prim and won't reflect its changes (start-up time
167167
may increase). Defaults to False.
168168
"""
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-
176169
# check if user spawned different assets in individual environments
177170
# this flag will be None if no multi asset is spawned
178171
carb_settings_iface = carb.settings.get_settings()
@@ -184,6 +177,14 @@ def clone_environments(self, copy_from_source: bool = False):
184177
" This may adversely affect PhysX parsing. We recommend disabling this property."
185178
)
186179

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+
187188
# in case of heterogeneous cloning, the env origins is specified at init
188189
if self._default_env_origins is None:
189190
self._default_env_origins = torch.tensor(env_origins, device=self.device, dtype=torch.float32)

0 commit comments

Comments
 (0)