Skip to content

Commit bc71259

Browse files
committed
Inline standalone USD clone inputs
1 parent 0753a28 commit bc71259

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

docs/source/how-to/cloning.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,13 @@ control. Production code reaches for one of the ways in
6666
stage = sim_utils.get_current_stage()
6767
cube_cfg = sim_utils.CuboidCfg(size=(0.1, 0.1, 0.1))
6868
cube_cfg.func("/World/envs/env_0/Cube", cube_cfg)
69-
sources = ("/World/envs/env_0/Cube",)
70-
destinations = ("/World/envs/env_{}/Cube",)
71-
env_ids = np.arange(num_envs)
72-
mapping = np.ones((1, num_envs), dtype=np.bool_)
7369
7470
usd_replicate(
7571
stage,
76-
sources=sources,
77-
destinations=destinations,
78-
env_ids=env_ids,
79-
mask=mapping,
72+
sources=("/World/envs/env_0/Cube",),
73+
destinations=("/World/envs/env_{}/Cube",),
74+
env_ids=np.arange(num_envs),
75+
mask=np.ones((1, num_envs), dtype=np.bool_),
8076
)
8177
8278
**PhysX** — call PhysX and USD on the same sources and destinations (either order):
@@ -85,6 +81,10 @@ control. Production code reaches for one of the ways in
8581
8682
from isaaclab_physx.cloner import physx_replicate
8783
84+
sources = ("/World/envs/env_0/Cube",)
85+
destinations = ("/World/envs/env_{}/Cube",)
86+
env_ids = np.arange(num_envs)
87+
mapping = np.ones((1, num_envs), dtype=np.bool_)
8888
physx_replicate(stage, sources, destinations, env_ids, mapping=mapping)
8989
usd_replicate(stage, sources, destinations, env_ids, mask=mapping)
9090

0 commit comments

Comments
 (0)