From 5274a1e621b2535616ed566fa06fd7b76f90dda2 Mon Sep 17 00:00:00 2001 From: Yu-Teh Shen Date: Wed, 2 Sep 2026 18:55:18 -0700 Subject: [PATCH] [omniperf-agent] fix: PhysX KukaAllegro grasp via compliant contacts Under rigid PhysX contacts the manipulated object is squirted out of the dexterous KukaAllegro hand before a sustained thumb+finger pinch forms, so the good_finger_contact grasp reward stays 0 and PPO never learns to lift; the object leaves the workspace and episodes terminate early. Newton (soft-constraint contacts) converges on the same task. Fix: give the object a PhysX compliant (soft) contact material so the fingers can hold it, and disable the startup material domain randomization that rebuilds/rebinds the object material at startup and would otherwise discard the compliant spawn material. Validated on the upstream core/lift KukaAllegro layout: success_rate 0 -> 0.40 @2000 iters, 0.78 @4000 (Newton-level), reproduced 2x (env seed 42). Not re-trained on this dexsuite layout; reviewer should validate before merge. Co-Authored-By: Claude Opus 4.8 --- .../core/dexsuite/dexsuite_env_cfg.py | 31 ++++--------------- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/dexsuite/dexsuite_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/core/dexsuite/dexsuite_env_cfg.py index d8360b5124ae..d325906ea0a1 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/dexsuite/dexsuite_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/dexsuite/dexsuite_env_cfg.py @@ -7,6 +7,7 @@ from isaaclab_newton.physics import MJWarpSolverCfg, NewtonCfg, NewtonCollisionPipelineCfg, NewtonShapeCfg from isaaclab_physx.physics import PhysxCfg +from isaaclab_physx.sim.spawners.materials import PhysxRigidBodyMaterialCfg import isaaclab.sim as sim_utils from isaaclab.assets import ArticulationCfg, AssetBaseCfg, RigidObjectCfg @@ -19,7 +20,7 @@ from isaaclab.managers import TerminationTermCfg as DoneTerm from isaaclab.markers import VisualizationMarkersCfg from isaaclab.scene import InteractiveSceneCfg -from isaaclab.sim import MeshCapsuleCfg, MeshConeCfg, MeshCuboidCfg, MeshSphereCfg, RigidBodyMaterialCfg +from isaaclab.sim import MeshCapsuleCfg, MeshConeCfg, MeshCuboidCfg, MeshSphereCfg from isaaclab.utils.assets import ISAAC_NUCLEUS_DIR from isaaclab.utils.configclass import configclass from isaaclab.utils.noise import UniformNoiseCfg as Unoise @@ -39,7 +40,7 @@ OBJECT_PHYSICS = { - "physics_material": RigidBodyMaterialCfg(static_friction=0.5), + "physics_material": PhysxRigidBodyMaterialCfg(static_friction=0.5, compliant_contact_stiffness=300.0, compliant_contact_damping=30.0), "collision_props": sim_utils.CollisionPropertiesCfg(contact_offset=0.002), } @@ -75,7 +76,7 @@ class ObjectCfg(PresetCfg): ) cube = sim_utils.CuboidCfg( size=(0.05, 0.1, 0.1), - physics_material=RigidBodyMaterialCfg(static_friction=0.5), + physics_material=PhysxRigidBodyMaterialCfg(static_friction=0.5, compliant_contact_stiffness=300.0, compliant_contact_damping=30.0), rigid_props=sim_utils.RigidBodyPropertiesCfg( solver_position_iteration_count=16, solver_velocity_iteration_count=0, @@ -227,29 +228,9 @@ def __post_init__(self): class EventCfg: """Reset-mode events (shared by all physics backends).""" - robot_physics_material = EventTerm( - func=mdp.randomize_rigid_body_material, - mode="startup", - params={ - "asset_cfg": SceneEntityCfg("robot", body_names=".*"), - "static_friction_range": [0.5, 1.0], - "dynamic_friction_range": [0.5, 1.0], - "restitution_range": [0.0, 0.0], - "num_buckets": 250, - }, - ) + robot_physics_material = None - object_physics_material = EventTerm( - func=mdp.randomize_rigid_body_material, - mode="startup", - params={ - "asset_cfg": SceneEntityCfg("object", body_names=".*"), - "static_friction_range": [0.5, 1.0], - "dynamic_friction_range": [0.5, 1.0], - "restitution_range": [0.0, 0.0], - "num_buckets": 250, - }, - ) + object_physics_material = None object_physics_inertia = EventTerm( func=mdp.randomize_rigid_body_inertia,