Skip to content

Commit

Permalink
moves the check up
Browse files Browse the repository at this point in the history
  • Loading branch information
Mayankm96 committed Oct 9, 2024
1 parent 1378991 commit 49353c3
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,6 @@ def clone_environments(self, copy_from_source: bool = False):
If True, clones are independent copies of the source prim and won't reflect its changes (start-up time
may increase). Defaults to False.
"""
env_origins = self.cloner.clone(
source_prim_path=self.env_prim_paths[0],
prim_paths=self.env_prim_paths,
replicate_physics=self.cfg.replicate_physics,
copy_from_source=copy_from_source,
)

# check if user spawned different assets in individual environments
# this flag will be None if no multi asset is spawned
carb_settings_iface = carb.settings.get_settings()
Expand All @@ -184,6 +177,14 @@ def clone_environments(self, copy_from_source: bool = False):
" This may adversely affect PhysX parsing. We recommend disabling this property."
)

# clone the environment
env_origins = self.cloner.clone(
source_prim_path=self.env_prim_paths[0],
prim_paths=self.env_prim_paths,
replicate_physics=self.cfg.replicate_physics,
copy_from_source=copy_from_source,
)

# in case of heterogeneous cloning, the env origins is specified at init
if self._default_env_origins is None:
self._default_env_origins = torch.tensor(env_origins, device=self.device, dtype=torch.float32)
Expand Down

0 comments on commit 49353c3

Please sign in to comment.