diff --git a/source/isaaclab/changelog.d/feature-heterogeneous_dexsuite.rst b/source/isaaclab/changelog.d/feature-heterogeneous_dexsuite.rst new file mode 100644 index 000000000000..dbe5adca2b14 --- /dev/null +++ b/source/isaaclab/changelog.d/feature-heterogeneous_dexsuite.rst @@ -0,0 +1,5 @@ +Changed +^^^^^^^ + +* Changed Newton-related dependencies to use MuJoCo 3.8, MuJoCo Warp 3.8.0.2, + Warp 1.13 or newer, and the packaged Newton 1.2.0 release candidate. diff --git a/source/isaaclab/setup.py b/source/isaaclab/setup.py index cfced25a24aa..94479116a24f 100644 --- a/source/isaaclab/setup.py +++ b/source/isaaclab/setup.py @@ -31,11 +31,11 @@ "trimesh", "pyglet>=2.1.6,<3", "mujoco==3.8.0", - "mujoco-warp==3.8.0.1", + "mujoco-warp==3.8.0.2", # image processing "transformers==4.57.6", "einops", # needed for transformers, doesn't always auto-install - "warp-lang==1.13.0", + "warp-lang>=1.13.0", "matplotlib>=3.10.3", # minimum version for Python 3.12 support # make sure this is consistent with isaac sim version "pillow==12.1.1", diff --git a/source/isaaclab_newton/changelog.d/feature-heterogeneous_dexsuite.rst b/source/isaaclab_newton/changelog.d/feature-heterogeneous_dexsuite.rst new file mode 100644 index 000000000000..5d98f0322179 --- /dev/null +++ b/source/isaaclab_newton/changelog.d/feature-heterogeneous_dexsuite.rst @@ -0,0 +1,5 @@ +Changed +^^^^^^^ + +* Changed Newton integration to use the packaged Newton 1.2.0 release candidate + and updated transform conversion calls for Warp 1.13 compatibility. diff --git a/source/isaaclab_newton/setup.py b/source/isaaclab_newton/setup.py index 4621e77f879b..4a954d0e9371 100644 --- a/source/isaaclab_newton/setup.py +++ b/source/isaaclab_newton/setup.py @@ -39,9 +39,9 @@ def run(self): "all": [ "prettytable==3.3.0", "mujoco==3.8.0", - "mujoco-warp==3.8.0.1", + "mujoco-warp==3.8.0.2", "PyOpenGL-accelerate==3.1.10", - "newton @ git+https://github.com/newton-physics/newton.git@v1.2.0rc2", + "newton==1.2.0rc3", ], } diff --git a/source/isaaclab_ov/changelog.d/feature-heterogeneous_dexsuite.rst b/source/isaaclab_ov/changelog.d/feature-heterogeneous_dexsuite.rst new file mode 100644 index 000000000000..6f0d819202d4 --- /dev/null +++ b/source/isaaclab_ov/changelog.d/feature-heterogeneous_dexsuite.rst @@ -0,0 +1,5 @@ +Fixed +^^^^^ + +* Fixed Newton transform synchronization for Warp 1.13 compatibility in the + RTX renderer. diff --git a/source/isaaclab_physx/changelog.d/feature-heterogeneous_dexsuite.rst b/source/isaaclab_physx/changelog.d/feature-heterogeneous_dexsuite.rst new file mode 100644 index 000000000000..d32a1bbc6491 --- /dev/null +++ b/source/isaaclab_physx/changelog.d/feature-heterogeneous_dexsuite.rst @@ -0,0 +1,5 @@ +Changed +^^^^^^^ + +* Changed the Newton extra to depend on the packaged Newton 1.2.0 release + candidate instead of a Git commit. diff --git a/source/isaaclab_physx/setup.py b/source/isaaclab_physx/setup.py index 9cc172addf50..eddfca89e1e1 100644 --- a/source/isaaclab_physx/setup.py +++ b/source/isaaclab_physx/setup.py @@ -20,7 +20,7 @@ EXTRAS_REQUIRE = { "newton": [ - "newton @ git+https://github.com/newton-physics/newton.git@v1.2.0rc2", + "newton==1.2.0rc3", ], } diff --git a/source/isaaclab_tasks/changelog.d/feature-heterogeneous_dexsuite.rst b/source/isaaclab_tasks/changelog.d/feature-heterogeneous_dexsuite.rst new file mode 100644 index 000000000000..edd206ed8eb9 --- /dev/null +++ b/source/isaaclab_tasks/changelog.d/feature-heterogeneous_dexsuite.rst @@ -0,0 +1,5 @@ +Added +^^^^^ + +* Added Newton MJWarp physics preset support and mesh-based heterogeneous + object spawning for Dexsuite manipulation environments. diff --git a/source/isaaclab_tasks/isaaclab_tasks/manager_based/manipulation/dexsuite/config/kuka_allegro/dexsuite_kuka_allegro_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/manager_based/manipulation/dexsuite/config/kuka_allegro/dexsuite_kuka_allegro_env_cfg.py index 4492d197f763..6513e8d7daa3 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/manager_based/manipulation/dexsuite/config/kuka_allegro/dexsuite_kuka_allegro_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/manager_based/manipulation/dexsuite/config/kuka_allegro/dexsuite_kuka_allegro_env_cfg.py @@ -3,9 +3,6 @@ # # SPDX-License-Identifier: BSD-3-Clause -from isaaclab_newton.physics import MJWarpSolverCfg, NewtonCfg -from isaaclab_physx.physics import PhysxCfg - from isaaclab.assets import ArticulationCfg from isaaclab.managers import RewardTermCfg as RewTerm from isaaclab.managers import SceneEntityCfg @@ -31,34 +28,6 @@ FINGER_SENSORS = [f"{name}_object_s" for name in FINGERTIP_LIST if name != "thumb_link_3"] -@configclass -class KukaAllegroPhysicsCfg(PresetCfg): - default = PhysxCfg( - bounce_threshold_velocity=0.01, - gpu_max_rigid_patch_count=4 * 5 * 2**15, - gpu_found_lost_pairs_capacity=2**26, - ) - newton_mjwarp = NewtonCfg( - solver_cfg=MJWarpSolverCfg( - solver="newton", - integrator="implicitfast", - njmax=300, - nconmax=70, - impratio=10.0, - cone="elliptic", - update_data_interval=2, - iterations=100, - ls_iterations=15, - ls_parallel=False, - use_mujoco_contacts=True, - ccd_iterations=5000, - ), - num_substeps=2, - debug_mode=False, - ) - physx = default - - @configclass class KukaAllegroSceneCfg(PresetCfg): @configclass @@ -132,28 +101,15 @@ class KukaAllegroObservationCfg(PresetCfg): default = state -@configclass -class KukaAllegroEventCfg(PresetCfg): - @configclass - class KukaAllegroPhysxEventCfg(dexsuite.StartupEventCfg, dexsuite.EventCfg): - pass - - default = KukaAllegroPhysxEventCfg() - newton_mjwarp = dexsuite.EventCfg() - physx = default - - @configclass class KukaAllegroMixinCfg: scene: KukaAllegroSceneCfg = KukaAllegroSceneCfg() rewards: KukaAllegroReorientRewardCfg = KukaAllegroReorientRewardCfg() observations: KukaAllegroObservationCfg = KukaAllegroObservationCfg() - events: KukaAllegroEventCfg = KukaAllegroEventCfg() actions: KukaAllegroRelJointPosActionCfg = KukaAllegroRelJointPosActionCfg() def __post_init__(self): super().__post_init__() - self.sim.physics = KukaAllegroPhysicsCfg() @configclass diff --git a/source/isaaclab_tasks/isaaclab_tasks/manager_based/manipulation/dexsuite/dexsuite_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/manager_based/manipulation/dexsuite/dexsuite_env_cfg.py index 449043e3977b..9f12f5b3b0b9 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/manager_based/manipulation/dexsuite/dexsuite_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/manager_based/manipulation/dexsuite/dexsuite_env_cfg.py @@ -5,6 +5,7 @@ from dataclasses import MISSING +from isaaclab_newton.physics import MJWarpSolverCfg, NewtonCfg, NewtonCollisionPipelineCfg, NewtonShapeCfg from isaaclab_physx.physics import PhysxCfg import isaaclab.sim as sim_utils @@ -18,7 +19,7 @@ from isaaclab.managers import TerminationTermCfg as DoneTerm from isaaclab.markers import VisualizationMarkersCfg from isaaclab.scene import InteractiveSceneCfg -from isaaclab.sim import CapsuleCfg, ConeCfg, CuboidCfg, RigidBodyMaterialCfg, SphereCfg +from isaaclab.sim import MeshCapsuleCfg, MeshConeCfg, MeshCuboidCfg, MeshSphereCfg, RigidBodyMaterialCfg from isaaclab.utils import configclass from isaaclab.utils.assets import ISAAC_NUCLEUS_DIR from isaaclab.utils.noise import UniformNoiseCfg as Unoise @@ -37,26 +38,32 @@ ) +OBJECT_PHYSICS = { + "physics_material": RigidBodyMaterialCfg(static_friction=0.5), + "collision_props": sim_utils.CollisionPropertiesCfg(contact_offset=0.002), +} + + @configclass class ObjectCfg(PresetCfg): shapes = sim_utils.MultiAssetSpawnerCfg( assets_cfg=[ - CuboidCfg(size=(0.05, 0.1, 0.1), physics_material=RigidBodyMaterialCfg(static_friction=0.5)), - CuboidCfg(size=(0.05, 0.05, 0.1), physics_material=RigidBodyMaterialCfg(static_friction=0.5)), - CuboidCfg(size=(0.025, 0.1, 0.1), physics_material=RigidBodyMaterialCfg(static_friction=0.5)), - CuboidCfg(size=(0.025, 0.05, 0.1), physics_material=RigidBodyMaterialCfg(static_friction=0.5)), - CuboidCfg(size=(0.025, 0.025, 0.1), physics_material=RigidBodyMaterialCfg(static_friction=0.5)), - CuboidCfg(size=(0.01, 0.1, 0.1), physics_material=RigidBodyMaterialCfg(static_friction=0.5)), - SphereCfg(radius=0.05, physics_material=RigidBodyMaterialCfg(static_friction=0.5)), - SphereCfg(radius=0.025, physics_material=RigidBodyMaterialCfg(static_friction=0.5)), - CapsuleCfg(radius=0.04, height=0.025, physics_material=RigidBodyMaterialCfg(static_friction=0.5)), - CapsuleCfg(radius=0.04, height=0.01, physics_material=RigidBodyMaterialCfg(static_friction=0.5)), - CapsuleCfg(radius=0.04, height=0.1, physics_material=RigidBodyMaterialCfg(static_friction=0.5)), - CapsuleCfg(radius=0.025, height=0.1, physics_material=RigidBodyMaterialCfg(static_friction=0.5)), - CapsuleCfg(radius=0.025, height=0.2, physics_material=RigidBodyMaterialCfg(static_friction=0.5)), - CapsuleCfg(radius=0.01, height=0.2, physics_material=RigidBodyMaterialCfg(static_friction=0.5)), - ConeCfg(radius=0.05, height=0.1, physics_material=RigidBodyMaterialCfg(static_friction=0.5)), - ConeCfg(radius=0.025, height=0.1, physics_material=RigidBodyMaterialCfg(static_friction=0.5)), + MeshCuboidCfg(size=(0.05, 0.1, 0.1), **OBJECT_PHYSICS), + MeshCuboidCfg(size=(0.05, 0.05, 0.1), **OBJECT_PHYSICS), + MeshCuboidCfg(size=(0.025, 0.1, 0.1), **OBJECT_PHYSICS), + MeshCuboidCfg(size=(0.025, 0.05, 0.1), **OBJECT_PHYSICS), + MeshCuboidCfg(size=(0.025, 0.025, 0.1), **OBJECT_PHYSICS), + MeshCuboidCfg(size=(0.01, 0.1, 0.1), **OBJECT_PHYSICS), + MeshSphereCfg(radius=0.05, **OBJECT_PHYSICS), + MeshSphereCfg(radius=0.025, **OBJECT_PHYSICS), + MeshCapsuleCfg(radius=0.04, height=0.025, **OBJECT_PHYSICS), + MeshCapsuleCfg(radius=0.04, height=0.01, **OBJECT_PHYSICS), + MeshCapsuleCfg(radius=0.04, height=0.1, **OBJECT_PHYSICS), + MeshCapsuleCfg(radius=0.025, height=0.1, **OBJECT_PHYSICS), + MeshCapsuleCfg(radius=0.025, height=0.2, **OBJECT_PHYSICS), + MeshCapsuleCfg(radius=0.01, height=0.2, **OBJECT_PHYSICS), + MeshConeCfg(radius=0.05, height=0.1, **OBJECT_PHYSICS), + MeshConeCfg(radius=0.025, height=0.1, **OBJECT_PHYSICS), ], rigid_props=sim_utils.RigidBodyPropertiesCfg( solver_position_iteration_count=16, @@ -77,7 +84,6 @@ class ObjectCfg(PresetCfg): collision_props=sim_utils.CollisionPropertiesCfg(), mass_props=sim_utils.MassPropertiesCfg(mass=0.2), ) - newton_mjwarp = cube # newton does not support multi-asset spawning yet default = shapes @@ -218,8 +224,8 @@ def __post_init__(self): @configclass -class StartupEventCfg: - """Startup-mode domain randomization (PhysX only — Newton does not support startup events).""" +class EventCfg: + """Reset-mode events (shared by all physics backends).""" robot_physics_material = EventTerm( func=mdp.randomize_rigid_body_material, @@ -245,6 +251,17 @@ class StartupEventCfg: }, ) + object_physics_inertia = EventTerm( + func=mdp.randomize_rigid_body_inertia, + mode="startup", + params={ + "asset_cfg": SceneEntityCfg("object"), + "inertia_distribution_params": [0.01, 0.01], + "operation": "add", + "diagonal_only": True, + }, + ) + joint_stiffness_and_damping = EventTerm( func=mdp.randomize_actuator_gains, mode="startup", @@ -276,11 +293,6 @@ class StartupEventCfg: }, ) - -@configclass -class EventCfg: - """Reset-mode events (shared by all physics backends).""" - # Gravity scheduling is a deliberate curriculum trick — starting with no # gravity (easy) and gradually introducing full gravity (hard) makes learning # smoother and removes the need for a separate "Lift" reward. @@ -409,6 +421,36 @@ class TerminationsCfg: abnormal_robot = DoneTerm(func=mdp.abnormal_robot_state) +@configclass +class PhysicsCfg(PresetCfg): + default = PhysxCfg( + bounce_threshold_velocity=0.01, + gpu_max_rigid_patch_count=4 * 5 * 2**15, + gpu_found_lost_pairs_capacity=2**26, + ) + newton_mjwarp = NewtonCfg( + solver_cfg=MJWarpSolverCfg( + solver="newton", + integrator="implicitfast", + njmax=300, + nconmax=200, + impratio=10.0, + cone="elliptic", + update_data_interval=2, + iterations=100, + ls_iterations=15, + ls_parallel=False, + use_mujoco_contacts=False, + ccd_iterations=35, + ), + collision_cfg=NewtonCollisionPipelineCfg(), + default_shape_cfg=NewtonShapeCfg(), + num_substeps=2, + debug_mode=False, + ) + physx = default + + @configclass class DexsuiteReorientEnvCfg(ManagerBasedEnvCfg): """Dexsuite reorientation task definition, also the base definition for derivative Lift task and evaluation task""" @@ -423,19 +465,11 @@ class DexsuiteReorientEnvCfg(ManagerBasedEnvCfg): # MDP settings rewards: RewardsCfg = RewardsCfg() terminations: TerminationsCfg = TerminationsCfg() - events: EventCfg = MISSING # type: ignore + events: EventCfg = EventCfg() curriculum: CurriculumCfg | None = CurriculumCfg() def validate_config(self): """Check for invalid preset combinations after resolution.""" - is_newton = not isinstance(self.sim.physics, PhysxCfg) - is_multi_asset = isinstance(self.scene.object.spawn, sim_utils.MultiAssetSpawnerCfg) - - if is_newton and is_multi_asset: - raise ValueError( - "Newton physics does not support multi-asset spawning." - " Use a single-geometry object preset (e.g. presets=cube) instead of 'shapes'." - ) warp_supported = {"rgb", "depth", "distance_to_image_plane"} for cam_attr in ("base_camera", "wrist_camera"): @@ -466,11 +500,7 @@ def __post_init__(self): # simulation settings self.sim.dt = 1 / 120 self.sim.render_interval = self.decimation - self.sim.physics = PhysxCfg( - bounce_threshold_velocity=0.01, - gpu_max_rigid_patch_count=4 * 5 * 2**15, - gpu_found_lost_pairs_capacity=2**26, - ) + self.sim.physics = PhysicsCfg() class DexsuiteLiftEnvCfg(DexsuiteReorientEnvCfg): diff --git a/source/isaaclab_visualizers/setup.py b/source/isaaclab_visualizers/setup.py index 9ad52a712360..78269a201fea 100644 --- a/source/isaaclab_visualizers/setup.py +++ b/source/isaaclab_visualizers/setup.py @@ -17,16 +17,16 @@ "kit": [], "newton": [ "warp-lang", - "newton @ git+https://github.com/newton-physics/newton.git@v1.2.0rc2", + "newton==1.2.0rc3", "PyOpenGL-accelerate", "imgui-bundle>=1.92.5", ], "rerun": [ - "newton @ git+https://github.com/newton-physics/newton.git@v1.2.0rc2", + "newton==1.2.0rc3", "rerun-sdk>=0.29.0", ], "viser": [ - "newton @ git+https://github.com/newton-physics/newton.git@v1.2.0rc2", + "newton==1.2.0rc3", "viser>=1.0.16", ], } diff --git a/tools/wheel_builder/res/python_packages.toml b/tools/wheel_builder/res/python_packages.toml index 9944580034e0..7fbe39505863 100644 --- a/tools/wheel_builder/res/python_packages.toml +++ b/tools/wheel_builder/res/python_packages.toml @@ -85,8 +85,8 @@ pyproject.optional-dependencies.all = [ { "newton" = [ "warp-lang==1.13.0", "mujoco==3.8.0", - "mujoco-warp==3.8.0.1", - "newton @ git+https://github.com/newton-physics/newton.git@v1.2.0rc2", + "mujoco-warp==3.8.0.2", + "newton==1.2.0rc3", "PyOpenGL-accelerate==3.1.10" ] }, # ================================================================================