diff --git a/source/isaaclab_tasks/changelog.d/fix-reorient-replication.rst b/source/isaaclab_tasks/changelog.d/fix-reorient-replication.rst new file mode 100644 index 00000000000..7c3a2e094e0 --- /dev/null +++ b/source/isaaclab_tasks/changelog.d/fix-reorient-replication.rst @@ -0,0 +1,5 @@ +Fixed +^^^^^ + +* Fixed Shadow Hand reorientation scene setup authoring every environment before + backend replication. diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/reorient/config/shadow_hand/shadow_hand_common.py b/source/isaaclab_tasks/isaaclab_tasks/core/reorient/config/shadow_hand/shadow_hand_common.py index 74c4f0f3db7..02a75c7d791 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/reorient/config/shadow_hand/shadow_hand_common.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/reorient/config/shadow_hand/shadow_hand_common.py @@ -154,22 +154,30 @@ class ShadowHandManagerEventPresetCfg(PresetCfg): @configclass class ShadowHandRobotCfg(PresetCfg): - physx = SHADOW_HAND_CFG.replace(prim_path="/World/envs/env_.*/Robot").replace( + physx = SHADOW_HAND_CFG.replace( + prim_path="/World/envs/env_.*/Robot", + spawn=SHADOW_HAND_CFG.spawn.replace(spawn_path="/World/envs/env_0/Robot"), init_state=ArticulationCfg.InitialStateCfg( pos=(0.0, 0.0, 0.5), rot=(0.0, 0.0, 0.0, 1.0), joint_pos={".*": 0.0}, - ) + ), ) isaacsim_physx = physx # Newton robot lives in the asset (see isaaclab_assets.robots.shadow_hand); reorient # uses its default gains. The handover task consumes the same asset cfg and overrides # only the finger gains. - newton_mjwarp = SHADOW_HAND_NEWTON_CFG.replace(prim_path="/World/envs/env_.*/Robot") + newton_mjwarp = SHADOW_HAND_NEWTON_CFG.replace( + prim_path="/World/envs/env_.*/Robot", + spawn=SHADOW_HAND_NEWTON_CFG.spawn.replace(spawn_path="/World/envs/env_0/Robot"), + ) ovphysx = SHADOW_HAND_CFG.replace( prim_path="/World/envs/env_.*/Robot", # OVPhysX does not expose the fixed-tendon runtime API, so spawn without tendon overrides. - spawn=SHADOW_HAND_CFG.spawn.replace(fixed_tendons_props=None), + spawn=SHADOW_HAND_CFG.spawn.replace( + spawn_path="/World/envs/env_0/Robot", + fixed_tendons_props=None, + ), init_state=ArticulationCfg.InitialStateCfg( pos=(0.0, 0.0, 0.5), rot=(0.0, 0.0, 0.0, 1.0), @@ -182,6 +190,7 @@ class ShadowHandRobotCfg(PresetCfg): CUBE_CFG = RigidObjectCfg( prim_path="/World/envs/env_.*/object", spawn=sim_utils.UsdFileCfg( + spawn_path="/World/envs/env_0/object", usd_path=f"{ISAAC_NUCLEUS_DIR}/Props/Blocks/DexCube/dex_cube_instanceable.usd", rigid_props=sim_utils.RigidBodyPropertiesCfg( kinematic_enabled=False, diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/reorient/config/shadow_hand/shadow_hand_direct_camera_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/core/reorient/config/shadow_hand/shadow_hand_direct_camera_env_cfg.py index ceeaa6a5d8c..02137ce8d73 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/reorient/config/shadow_hand/shadow_hand_direct_camera_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/reorient/config/shadow_hand/shadow_hand_direct_camera_env_cfg.py @@ -75,7 +75,11 @@ class _ShadowHandBaseTiledCameraCfg(CameraCfg): ) data_types: list[str] = [] spawn: sim_utils.PinholeCameraCfg = sim_utils.PinholeCameraCfg( - focal_length=24.0, focus_distance=400.0, horizontal_aperture=20.955, clipping_range=(0.1, 20.0) + spawn_path="/World/envs/env_0/Camera", + focal_length=24.0, + focus_distance=400.0, + horizontal_aperture=20.955, + clipping_range=(0.1, 20.0), ) width: int = 120 height: int = 120