Skip to content

Commit ce4a492

Browse files
committed
Fix reorient prototype spawning
Spawn the Shadow Hand, cube, and camera only in the source environment so the existing clone plan owns replication. Keep regex prim paths for runtime views while avoiding redundant USD authoring at large environment counts.
1 parent d00e811 commit ce4a492

3 files changed

Lines changed: 23 additions & 5 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Fixed
2+
^^^^^
3+
4+
* Fixed Shadow Hand reorientation scene setup authoring every environment before
5+
backend replication.

source/isaaclab_tasks/isaaclab_tasks/core/reorient/config/shadow_hand/shadow_hand_common.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,22 +154,30 @@ class ShadowHandManagerEventPresetCfg(PresetCfg):
154154

155155
@configclass
156156
class ShadowHandRobotCfg(PresetCfg):
157-
physx = SHADOW_HAND_CFG.replace(prim_path="/World/envs/env_.*/Robot").replace(
157+
physx = SHADOW_HAND_CFG.replace(
158+
prim_path="/World/envs/env_.*/Robot",
159+
spawn=SHADOW_HAND_CFG.spawn.replace(spawn_path="/World/envs/env_0/Robot"),
158160
init_state=ArticulationCfg.InitialStateCfg(
159161
pos=(0.0, 0.0, 0.5),
160162
rot=(0.0, 0.0, 0.0, 1.0),
161163
joint_pos={".*": 0.0},
162-
)
164+
),
163165
)
164166
isaacsim_physx = physx
165167
# Newton robot lives in the asset (see isaaclab_assets.robots.shadow_hand); reorient
166168
# uses its default gains. The handover task consumes the same asset cfg and overrides
167169
# only the finger gains.
168-
newton_mjwarp = SHADOW_HAND_NEWTON_CFG.replace(prim_path="/World/envs/env_.*/Robot")
170+
newton_mjwarp = SHADOW_HAND_NEWTON_CFG.replace(
171+
prim_path="/World/envs/env_.*/Robot",
172+
spawn=SHADOW_HAND_NEWTON_CFG.spawn.replace(spawn_path="/World/envs/env_0/Robot"),
173+
)
169174
ovphysx = SHADOW_HAND_CFG.replace(
170175
prim_path="/World/envs/env_.*/Robot",
171176
# OVPhysX does not expose the fixed-tendon runtime API, so spawn without tendon overrides.
172-
spawn=SHADOW_HAND_CFG.spawn.replace(fixed_tendons_props=None),
177+
spawn=SHADOW_HAND_CFG.spawn.replace(
178+
spawn_path="/World/envs/env_0/Robot",
179+
fixed_tendons_props=None,
180+
),
173181
init_state=ArticulationCfg.InitialStateCfg(
174182
pos=(0.0, 0.0, 0.5),
175183
rot=(0.0, 0.0, 0.0, 1.0),
@@ -182,6 +190,7 @@ class ShadowHandRobotCfg(PresetCfg):
182190
CUBE_CFG = RigidObjectCfg(
183191
prim_path="/World/envs/env_.*/object",
184192
spawn=sim_utils.UsdFileCfg(
193+
spawn_path="/World/envs/env_0/object",
185194
usd_path=f"{ISAAC_NUCLEUS_DIR}/Props/Blocks/DexCube/dex_cube_instanceable.usd",
186195
rigid_props=sim_utils.RigidBodyPropertiesCfg(
187196
kinematic_enabled=False,

source/isaaclab_tasks/isaaclab_tasks/core/reorient/config/shadow_hand/shadow_hand_direct_camera_env_cfg.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,11 @@ class _ShadowHandBaseTiledCameraCfg(CameraCfg):
7575
)
7676
data_types: list[str] = []
7777
spawn: sim_utils.PinholeCameraCfg = sim_utils.PinholeCameraCfg(
78-
focal_length=24.0, focus_distance=400.0, horizontal_aperture=20.955, clipping_range=(0.1, 20.0)
78+
spawn_path="/World/envs/env_0/Camera",
79+
focal_length=24.0,
80+
focus_distance=400.0,
81+
horizontal_aperture=20.955,
82+
clipping_range=(0.1, 20.0),
7983
)
8084
width: int = 120
8185
height: int = 120

0 commit comments

Comments
 (0)