diff --git a/source/isaaclab_rl/changelog.d/default-newton-rsl.minor.rst b/source/isaaclab_rl/changelog.d/default-newton-rsl.minor.rst new file mode 100644 index 000000000000..20e6f71b6477 --- /dev/null +++ b/source/isaaclab_rl/changelog.d/default-newton-rsl.minor.rst @@ -0,0 +1,6 @@ +Changed +^^^^^^^ + +* **Breaking:** Changed the ``train`` and ``play`` CLI commands to use a task's + registered default RL library when ``--rl_library`` is omitted. Pass + ``--rl_library`` explicitly to select a different library. diff --git a/source/isaaclab_rl/isaaclab_rl/entrypoints/dispatch.py b/source/isaaclab_rl/isaaclab_rl/entrypoints/dispatch.py index 67a10732880a..1a7a827c7ac6 100644 --- a/source/isaaclab_rl/isaaclab_rl/entrypoints/dispatch.py +++ b/source/isaaclab_rl/isaaclab_rl/entrypoints/dispatch.py @@ -13,6 +13,8 @@ import sys from typing import TYPE_CHECKING +import gymnasium as gym + if TYPE_CHECKING: from .simple_agents import PolicyName @@ -106,6 +108,8 @@ def run_cli(action: str, argv: list[str] | None = None) -> int: parser = argparse.ArgumentParser(add_help=False) parser.add_argument("--rl_library", choices=sorted(backends)) selected, backend_argv = parser.parse_known_args(argv) + if selected.rl_library is None: + selected.rl_library = _resolve_default_library(argv, backends) if selected.rl_library is None: _print_selector_help(action, sorted(backends)) if "-h" in argv or "--help" in argv: @@ -116,6 +120,23 @@ def run_cli(action: str, argv: list[str] | None = None) -> int: return 0 +def _resolve_default_library(argv: list[str], backends: dict[str, str]) -> str | None: + """Return the task-registered default RL library requested by command-line arguments.""" + parser = argparse.ArgumentParser(add_help=False) + parser.add_argument("--task") + args, _ = parser.parse_known_args(argv) + if args.task is None: + return None + + import isaaclab_tasks # noqa: F401 + + try: + default_library = gym.spec(args.task.split(":")[-1]).kwargs.get("default_agent") + except gym.error.Error: + return None + return default_library if default_library in backends else None + + def _print_selector_help(action: str, backends: list[str]) -> None: """Print help for a unified entrypoint before a backend is selected.""" parser = argparse.ArgumentParser(description=f"{action.capitalize()} an RL agent with a selected backend.") diff --git a/source/isaaclab_rl/test/test_entrypoints.py b/source/isaaclab_rl/test/test_entrypoints.py index b6f94ed01341..d123c16d3713 100644 --- a/source/isaaclab_rl/test/test_entrypoints.py +++ b/source/isaaclab_rl/test/test_entrypoints.py @@ -12,6 +12,7 @@ import sys import types +import gymnasium as gym import pytest from isaaclab_rl.entrypoints import PlaybackRequest, TrainingRequest, api, dispatch @@ -128,6 +129,32 @@ def _fake_run_backend(module_name: str, argv: list[str], *, run_as_script: bool) } +def test_dispatch_uses_task_registered_default_backend(monkeypatch) -> None: + """A task registry default selects the backend when the CLI omits it.""" + task_name = "Isaac-DefaultAgentDispatchTest" + gym.register(id=task_name, entry_point="dummy:Env", kwargs={"default_agent": "rsl_rl"}) + monkeypatch.setitem(sys.modules, "isaaclab_tasks", types.ModuleType("isaaclab_tasks")) + received: dict[str, object] = {} + monkeypatch.setattr( + dispatch, + "_run_backend", + lambda module_name, argv, *, run_as_script: received.update( + module_name=module_name, argv=argv, run_as_script=run_as_script + ), + ) + + try: + assert dispatch.run_train_cli(["--task", task_name]) == 0 + finally: + gym.registry.pop(task_name, None) + + assert received == { + "module_name": "isaaclab_rl.entrypoints.backends.train_rsl_rl", + "argv": ["--task", task_name], + "run_as_script": False, + } + + def test_dispatch_fuses_option_like_kit_args(monkeypatch) -> None: """Space-separated option-like Kit arguments are fused before backend parsing.""" received: dict[str, object] = {} @@ -142,7 +169,7 @@ def test_dispatch_fuses_option_like_kit_args(monkeypatch) -> None: def test_dispatch_requires_a_backend() -> None: """Missing backend selection returns the conventional CLI error status.""" - assert dispatch.run_train_cli(["--task", "Isaac-Cartpole"]) == 2 + assert dispatch.run_train_cli([]) == 2 def _torch_backend_state() -> tuple[bool, bool, bool, bool]: diff --git a/source/isaaclab_tasks/changelog.d/default-newton-rsl.minor.rst b/source/isaaclab_tasks/changelog.d/default-newton-rsl.minor.rst new file mode 100644 index 000000000000..eddf5e08deeb --- /dev/null +++ b/source/isaaclab_tasks/changelog.d/default-newton-rsl.minor.rst @@ -0,0 +1,10 @@ +Changed +^^^^^^^ + +* **Breaking:** Changed the default task physics and renderer presets to Newton + MJWarp and the Newton renderer, and changed the default RL library to RSL-RL. + Select an explicit preset or pass ``--rl_library`` to retain a different + backend or RL library. +* Changed the recorded robot-PoV camera used by the XR reference tasks to pin the + Isaac RTX renderer, since the Newton renderer cannot load the UDIM textures of + those robot assets. Select ``newton_renderer`` explicitly to override. diff --git a/source/isaaclab_tasks/isaaclab_tasks/contrib/robot_pov_camera_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/contrib/robot_pov_camera_cfg.py index 9e57a099f5e0..dd8dc62b1fb2 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/contrib/robot_pov_camera_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/contrib/robot_pov_camera_cfg.py @@ -5,6 +5,8 @@ """Shared recorded robot-PoV camera configuration for contributed tasks.""" +from isaaclab_physx.renderers import IsaacRtxRendererCfg + import isaaclab.sim as sim_utils from isaaclab.sensors import CameraCfg @@ -19,6 +21,10 @@ def robot_pov_camera_cfg( ) -> CameraCfg: """Return a recorded robot-PoV camera under a prim that follows physical-body motion. + The camera defaults to the Isaac RTX renderer instead of the ``MultiBackendRendererCfg`` + default: the Newton warp renderer cannot load the UDIM textures used by the humanoid + assets these feeds record. Select ``newton_renderer`` explicitly to override. + Args: parent_prim_path: Path of the robot prim whose transform inherits physical-body motion. offset_pos: Camera position in the parent body frame. @@ -30,7 +36,7 @@ def robot_pov_camera_cfg( height=450, width=720, data_types=["rgb"], - renderer_cfg=MultiBackendRendererCfg(), + renderer_cfg=MultiBackendRendererCfg(default=IsaacRtxRendererCfg()), spawn=sim_utils.PinholeCameraCfg(focal_length=18.15, clipping_range=(0.1, 2.0)), offset=CameraCfg.OffsetCfg(pos=offset_pos, rot=offset_rot, convention="ros"), ) diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/cabinet/cabinet_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/core/cabinet/cabinet_env_cfg.py index b58fcd4aec26..d09aeec2de50 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/cabinet/cabinet_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/cabinet/cabinet_env_cfg.py @@ -102,7 +102,6 @@ class CabinetSimCfg(PresetCfg): physx: SimulationCfg = isaacsim_physx.replace( physics=PhysxAutoCfg(isaacsim_physx=isaacsim_physx.physics, ovphysx=ovphysx.physics) ) - default: SimulationCfg = isaacsim_physx newton_mjwarp: SimulationCfg = SimulationCfg( dt=1 / 600, render_interval=1, @@ -125,6 +124,7 @@ class CabinetSimCfg(PresetCfg): default_visualizer_cfg=VisualizerCfg(eye=(-2.0, 2.0, 2.0), lookat=(0.8, 0.0, 0.5)), physics=NewtonCfg(solver_cfg=KaminoPADMMSolverCfg(max_contacts_per_world=64)), ) + default: SimulationCfg = newton_mjwarp @configclass @@ -138,9 +138,9 @@ class CabinetDecimationCfg(PresetCfg): isaacsim_physx: int = 1 ovphysx: int = isaacsim_physx physx: int = isaacsim_physx - default: int = isaacsim_physx newton_mjwarp: int = 10 newton_kamino: int = 10 + default: int = newton_mjwarp ## diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/cabinet/config/franka/__init__.py b/source/isaaclab_tasks/isaaclab_tasks/core/cabinet/config/franka/__init__.py index a2ca966c84d3..860db87e940d 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/cabinet/config/franka/__init__.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/cabinet/config/franka/__init__.py @@ -17,6 +17,7 @@ kwargs={ "env_cfg_entry_point": f"{__name__}.joint_pos_env_cfg:FrankaCabinetEnvCfg", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:CabinetPPORunnerCfg", + "default_agent": "rsl_rl", "rl_games_cfg_entry_point": f"{agents.__name__}:rl_games_manager_ppo_cfg.yaml", "skrl_cfg_entry_point": f"{agents.__name__}:skrl_manager_ppo_cfg.yaml", }, @@ -35,6 +36,7 @@ "env_cfg_entry_point": f"{__name__}.cabinet_direct_env_cfg:FrankaCabinetDirectEnvCfg", "rl_games_cfg_entry_point": f"{agents.__name__}:rl_games_direct_ppo_cfg.yaml", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:FrankaCabinetPPORunnerCfg", + "default_agent": "rsl_rl", "skrl_cfg_entry_point": f"{agents.__name__}:skrl_direct_ppo_cfg.yaml", }, ) diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/cartpole/__init__.py b/source/isaaclab_tasks/isaaclab_tasks/core/cartpole/__init__.py index 44fe9fbfb187..064f647ecf83 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/cartpole/__init__.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/cartpole/__init__.py @@ -37,6 +37,7 @@ "env_cfg_entry_point": f"{__name__}.cartpole_direct_env_cfg:CartpoleEnvCfg", "rl_games_cfg_entry_point": f"{agents.__name__}:rl_games_direct_ppo_cfg.yaml", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:CartpoleDirectPPORunnerCfg", + "default_agent": "rsl_rl", "skrl_cfg_entry_point": f"{agents.__name__}:skrl_direct_ppo_cfg.yaml", "sb3_cfg_entry_point": f"{agents.__name__}:sb3_ppo_cfg.yaml", }, @@ -50,6 +51,7 @@ "env_cfg_entry_point": f"{__name__}.cartpole_direct_camera_env_cfg:CartpoleCameraEnvCfg", "rl_games_cfg_entry_point": f"{agents.__name__}:rl_games_camera_ppo_cfg.yaml", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:CartpoleCameraDirectPPORunnerCfg", + "default_agent": "rsl_rl", "skrl_cfg_entry_point": f"{agents.__name__}:skrl_direct_camera_ppo_cfg.yaml", }, ) @@ -66,6 +68,7 @@ "env_cfg_entry_point": f"{__name__}.cartpole_manager_env_cfg:CartpoleEnvCfg", "rl_games_cfg_entry_point": f"{agents.__name__}:rl_games_manager_ppo_cfg.yaml", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:CartpolePPORunnerCfg", + "default_agent": "rsl_rl", "rsl_rl_with_symmetry_cfg_entry_point": ( f"{agents.__name__}.rsl_rl_ppo_cfg:CartpolePPORunnerWithSymmetryCfg" ), @@ -83,6 +86,7 @@ "rl_games_cfg_entry_point": f"{agents.__name__}:rl_games_camera_ppo_cfg.yaml", "rl_games_feature_cfg_entry_point": f"{agents.__name__}:rl_games_manager_feature_ppo_cfg.yaml", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:CartpoleCameraPPORunnerCfg", + "default_agent": "rsl_rl", "rsl_rl_feature_cfg_entry_point": ( f"{agents.__name__}.rsl_rl_ppo_cfg:CartpoleCameraFeaturePPORunnerCfg" ), diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/cartpole/cartpole_direct_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/core/cartpole/cartpole_direct_env_cfg.py index 751fc6d23ac3..9887b20e1e98 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/cartpole/cartpole_direct_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/cartpole/cartpole_direct_env_cfg.py @@ -33,7 +33,6 @@ class CartpolePhysicsCfg(PresetCfg): isaacsim_physx: PhysxCfg = PhysxCfg() ovphysx: OvPhysxCfg = OvPhysxCfg() physx: PhysxAutoCfg = PhysxAutoCfg(isaacsim_physx=isaacsim_physx, ovphysx=ovphysx) - default = isaacsim_physx newton_mjwarp: NewtonCfg = NewtonCfg( solver_cfg=MJWarpSolverCfg( njmax=5, @@ -51,6 +50,7 @@ class CartpolePhysicsCfg(PresetCfg): debug_mode=False, use_cuda_graph=True, ) + default = newton_mjwarp @configclass diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/cartpole/cartpole_manager_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/core/cartpole/cartpole_manager_env_cfg.py index c9570664c09d..17ea5e0f5ac6 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/cartpole/cartpole_manager_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/cartpole/cartpole_manager_env_cfg.py @@ -43,7 +43,6 @@ class CartpolePhysicsCfg(PresetCfg): isaacsim_physx: PhysxCfg = PhysxCfg() ovphysx: OvPhysxCfg = OvPhysxCfg() physx: PhysxAutoCfg = PhysxAutoCfg(isaacsim_physx=isaacsim_physx, ovphysx=ovphysx) - default: PhysxCfg = isaacsim_physx newton_mjwarp: NewtonCfg = NewtonCfg( solver_cfg=MJWarpSolverCfg( njmax=5, @@ -56,6 +55,7 @@ class CartpolePhysicsCfg(PresetCfg): debug_mode=False, use_cuda_graph=True, ) + default: NewtonCfg = newton_mjwarp newton_kamino: NewtonCfg = NewtonCfg( solver_cfg=KaminoPADMMSolverCfg(sparse_jacobian=True), debug_mode=False, diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/fourbar_pole/__init__.py b/source/isaaclab_tasks/isaaclab_tasks/core/fourbar_pole/__init__.py index b30913f7e058..82fec137b8a4 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/fourbar_pole/__init__.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/fourbar_pole/__init__.py @@ -20,5 +20,6 @@ kwargs={ "env_cfg_entry_point": f"{__name__}.fourbar_pole_manager_env_cfg:FourbarPoleSwingupEnvCfg", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_manager_ppo_cfg:FourbarPolePPORunnerCfg", + "default_agent": "rsl_rl", }, ) diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/handover/__init__.py b/source/isaaclab_tasks/isaaclab_tasks/core/handover/__init__.py index 410f83ced7a3..a4f401545fee 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/handover/__init__.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/handover/__init__.py @@ -22,6 +22,7 @@ kwargs={ "env_cfg_entry_point": f"{__name__}.handover_env_cfg:HandoverEnvCfg", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:HandoverPPORunnerCfg", + "default_agent": "rsl_rl", "rl_games_cfg_entry_point": f"{agents.__name__}:rl_games_ppo_cfg.yaml", "skrl_cfg_entry_point": f"{agents.__name__}:skrl_ppo_cfg.yaml", "skrl_ippo_cfg_entry_point": f"{agents.__name__}:skrl_ippo_cfg.yaml", diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/lift/config/franka/__init__.py b/source/isaaclab_tasks/isaaclab_tasks/core/lift/config/franka/__init__.py index a70b00cb6f65..6b677df0f69b 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/lift/config/franka/__init__.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/lift/config/franka/__init__.py @@ -20,6 +20,7 @@ kwargs={ "env_cfg_entry_point": f"{__name__}.franka_env_cfg:FrankaReorientEnvCfg", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:FrankaPPORunnerCfg", + "default_agent": "rsl_rl", }, ) @@ -30,5 +31,6 @@ kwargs={ "env_cfg_entry_point": f"{__name__}.franka_env_cfg:FrankaLiftEnvCfg", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:FrankaPPORunnerCfg", + "default_agent": "rsl_rl", }, ) diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/lift/config/franka_soft/__init__.py b/source/isaaclab_tasks/isaaclab_tasks/core/lift/config/franka_soft/__init__.py index 244d4d45718e..8f05fec805bc 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/lift/config/franka_soft/__init__.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/lift/config/franka_soft/__init__.py @@ -18,6 +18,7 @@ kwargs={ "env_cfg_entry_point": f"{__name__}.franka_soft_env_cfg:FrankaSoftEnvCfg", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:FrankaDeformablePPORunnerCfg", + "default_agent": "rsl_rl", }, ) @@ -28,6 +29,7 @@ kwargs={ "env_cfg_entry_point": f"{__name__}.franka_cloth_env_cfg:FrankaClothEnvCfg", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:FrankaClothPPORunnerCfg", + "default_agent": "rsl_rl", }, ) @@ -38,6 +40,7 @@ kwargs={ "env_cfg_entry_point": f"{__name__}.franka_soft_env_cfg:FrankaSoftCameraEnvCfg", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:FrankaDeformableCameraPPORunnerCfg", + "default_agent": "rsl_rl", }, ) @@ -48,5 +51,6 @@ kwargs={ "env_cfg_entry_point": f"{__name__}.franka_cloth_env_cfg:FrankaClothCameraEnvCfg", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:FrankaDeformableCameraPPORunnerCfg", + "default_agent": "rsl_rl", }, ) diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/lift/config/franka_soft/franka_cloth_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/core/lift/config/franka_soft/franka_cloth_env_cfg.py index 52efa6ce6cd3..77e77eae90d1 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/lift/config/franka_soft/franka_cloth_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/lift/config/franka_soft/franka_cloth_env_cfg.py @@ -10,6 +10,7 @@ from isaaclab_newton.physics import MJWarpSolverCfg, NewtonCfg, NewtonCollisionPipelineCfg from isaaclab_newton.sim.schemas import NewtonDeformableBodyPropertiesCfg from isaaclab_newton.sim.spawners.materials import NewtonSurfaceDeformableBodyMaterialCfg +from isaaclab_physx.renderers import IsaacRtxRendererCfg import isaaclab.sim as sim_utils from isaaclab.assets import AssetBaseCfg, RigidObjectCfg @@ -24,6 +25,7 @@ from isaaclab_contrib.deformable.newton_manager_cfg import NewtonModelCfg, VBDSolverCfg from isaaclab_tasks.utils import PresetCfg +from isaaclab_tasks.utils.presets import MultiBackendRendererCfg from ... import mdp from .franka_soft_env_cfg import ( @@ -171,7 +173,9 @@ class FrankaClothScenePresetCfg(PresetCfg): class FrankaClothCameraSceneCfg(FrankaClothSceneCfg): """Franka cloth scene with a base camera.""" - base_camera: CameraCfg = FRANKA_CAMERA_CFG + base_camera: CameraCfg = FRANKA_CAMERA_CFG.replace( + renderer_cfg=MultiBackendRendererCfg(default=IsaacRtxRendererCfg()) + ) @configclass diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/lift/config/kuka_allegro/__init__.py b/source/isaaclab_tasks/isaaclab_tasks/core/lift/config/kuka_allegro/__init__.py index 797027f05667..7f68ea22e3e5 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/lift/config/kuka_allegro/__init__.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/lift/config/kuka_allegro/__init__.py @@ -20,6 +20,7 @@ kwargs={ "env_cfg_entry_point": f"{__name__}.kuka_allegro_env_cfg:KukaAllegroReorientEnvCfg", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:KukaAllegroPPORunnerCfg", + "default_agent": "rsl_rl", }, ) @@ -30,6 +31,7 @@ kwargs={ "env_cfg_entry_point": f"{__name__}.kuka_allegro_env_cfg:KukaAllegroLiftEnvCfg", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:KukaAllegroPPORunnerCfg", + "default_agent": "rsl_rl", }, ) @@ -44,6 +46,7 @@ kwargs={ "env_cfg_entry_point": f"{__name__}.kuka_allegro_camera_env_cfg:KukaAllegroReorientCameraEnvCfg", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:KukaAllegroPPORunnerCfg", + "default_agent": "rsl_rl", }, ) @@ -54,5 +57,6 @@ kwargs={ "env_cfg_entry_point": f"{__name__}.kuka_allegro_camera_env_cfg:KukaAllegroLiftCameraEnvCfg", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:KukaAllegroPPORunnerCfg", + "default_agent": "rsl_rl", }, ) diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/lift/config/kuka_allegro/kuka_allegro_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/core/lift/config/kuka_allegro/kuka_allegro_env_cfg.py index 3b751997e266..05d71e9839d6 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/lift/config/kuka_allegro/kuka_allegro_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/lift/config/kuka_allegro/kuka_allegro_env_cfg.py @@ -43,7 +43,8 @@ class KukaAllegroPhysicsCfg(lift.PhysicsCfg): gpu_found_lost_pairs_capacity=2**26, ) physx = PhysxAutoCfg(isaacsim_physx=isaacsim_physx, ovphysx=ovphysx) - default = isaacsim_physx + newton_mjwarp = lift.PhysicsCfg().newton_mjwarp + default = newton_mjwarp @configclass diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/lift/lift_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/core/lift/lift_env_cfg.py index 46efc8bcd5c0..551d027e3d1f 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/lift/lift_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/lift/lift_env_cfg.py @@ -509,7 +509,7 @@ class PhysicsCfg(PresetCfg): debug_mode=False, ) physx = PhysxAutoCfg(isaacsim_physx=isaacsim_physx) - default = isaacsim_physx + default = newton_mjwarp @configclass diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/locomotion/ant/__init__.py b/source/isaaclab_tasks/isaaclab_tasks/core/locomotion/ant/__init__.py index 4adb37ca8eb6..fe352c446ace 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/locomotion/ant/__init__.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/locomotion/ant/__init__.py @@ -27,6 +27,7 @@ "env_cfg_entry_point": f"{__name__}.ant_direct_env_cfg:AntEnvCfg", "rl_games_cfg_entry_point": f"{agents.__name__}:rl_games_direct_ppo_cfg.yaml", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:AntDirectPPORunnerCfg", + "default_agent": "rsl_rl", "skrl_cfg_entry_point": f"{agents.__name__}:skrl_direct_ppo_cfg.yaml", }, ) @@ -42,6 +43,7 @@ kwargs={ "env_cfg_entry_point": f"{__name__}.ant_manager_env_cfg:AntEnvCfg", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:AntPPORunnerCfg", + "default_agent": "rsl_rl", "rl_games_cfg_entry_point": f"{agents.__name__}:rl_games_manager_ppo_cfg.yaml", "skrl_cfg_entry_point": f"{agents.__name__}:skrl_manager_ppo_cfg.yaml", "sb3_cfg_entry_point": f"{agents.__name__}:sb3_manager_ppo_cfg.yaml", diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/locomotion/ant/ant_direct_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/core/locomotion/ant/ant_direct_env_cfg.py index 9b482365e4ee..7c1dbf2805c6 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/locomotion/ant/ant_direct_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/locomotion/ant/ant_direct_env_cfg.py @@ -33,7 +33,6 @@ class AntPhysicsCfg(PresetCfg): isaacsim_physx: PhysxCfg = PhysxCfg(bounce_threshold_velocity=0.2) ovphysx: OvPhysxCfg = OvPhysxCfg() physx: PhysxAutoCfg = PhysxAutoCfg(isaacsim_physx=isaacsim_physx, ovphysx=ovphysx) - default = isaacsim_physx newton_mjwarp: NewtonCfg = NewtonCfg( solver_cfg=MJWarpSolverCfg( njmax=45, @@ -50,6 +49,7 @@ class AntPhysicsCfg(PresetCfg): debug_mode=False, use_cuda_graph=True, ) + default = newton_mjwarp @configclass diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/locomotion/ant/ant_manager_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/core/locomotion/ant/ant_manager_env_cfg.py index bfdc93912e6a..d628496cf9a3 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/locomotion/ant/ant_manager_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/locomotion/ant/ant_manager_env_cfg.py @@ -37,7 +37,6 @@ class AntPhysicsCfg(PresetCfg): isaacsim_physx: PhysxCfg = PhysxCfg(bounce_threshold_velocity=0.2) ovphysx: OvPhysxCfg = OvPhysxCfg() physx: PhysxAutoCfg = PhysxAutoCfg(isaacsim_physx=isaacsim_physx, ovphysx=ovphysx) - default: PhysxCfg = isaacsim_physx newton_mjwarp: NewtonCfg = NewtonCfg( solver_cfg=MJWarpSolverCfg( njmax=45, @@ -54,6 +53,7 @@ class AntPhysicsCfg(PresetCfg): debug_mode=False, use_cuda_graph=True, ) + default: NewtonCfg = newton_mjwarp @configclass @@ -143,8 +143,8 @@ def __post_init__(self): class AntObservationsCfg(PresetCfg): physx: ObservationsCfg = ObservationsCfg() isaacsim_physx: ObservationsCfg = physx - default: ObservationsCfg = isaacsim_physx newton_mjwarp: ObservationsCfg = ObservationsCfg() + default: ObservationsCfg = newton_mjwarp @configclass diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/locomotion/humanoid/__init__.py b/source/isaaclab_tasks/isaaclab_tasks/core/locomotion/humanoid/__init__.py index d13b7697595a..1c43bd1e3fcb 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/locomotion/humanoid/__init__.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/locomotion/humanoid/__init__.py @@ -27,6 +27,7 @@ "env_cfg_entry_point": f"{__name__}.humanoid_direct_env_cfg:HumanoidEnvCfg", "rl_games_cfg_entry_point": f"{agents.__name__}:rl_games_direct_ppo_cfg.yaml", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:HumanoidDirectPPORunnerCfg", + "default_agent": "rsl_rl", "skrl_cfg_entry_point": f"{agents.__name__}:skrl_direct_ppo_cfg.yaml", }, ) @@ -42,6 +43,7 @@ kwargs={ "env_cfg_entry_point": f"{__name__}.humanoid_manager_env_cfg:HumanoidEnvCfg", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:HumanoidPPORunnerCfg", + "default_agent": "rsl_rl", "rl_games_cfg_entry_point": f"{agents.__name__}:rl_games_manager_ppo_cfg.yaml", "skrl_cfg_entry_point": f"{agents.__name__}:skrl_manager_ppo_cfg.yaml", "sb3_cfg_entry_point": f"{agents.__name__}:sb3_manager_ppo_cfg.yaml", diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/locomotion/humanoid/humanoid_direct_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/core/locomotion/humanoid/humanoid_direct_env_cfg.py index 19fe73f607fc..b23cdd566958 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/locomotion/humanoid/humanoid_direct_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/locomotion/humanoid/humanoid_direct_env_cfg.py @@ -29,7 +29,6 @@ class HumanoidPhysicsCfg(PresetCfg): isaacsim_physx: PhysxCfg = PhysxCfg(bounce_threshold_velocity=0.2) ovphysx: OvPhysxCfg = OvPhysxCfg() physx: PhysxAutoCfg = PhysxAutoCfg(isaacsim_physx=isaacsim_physx, ovphysx=ovphysx) - default = isaacsim_physx newton_mjwarp: NewtonCfg = NewtonCfg( solver_cfg=MJWarpSolverCfg( njmax=80, @@ -42,6 +41,7 @@ class HumanoidPhysicsCfg(PresetCfg): num_substeps=2, debug_mode=False, ) + default = newton_mjwarp @configclass diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/locomotion/humanoid/humanoid_manager_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/core/locomotion/humanoid/humanoid_manager_env_cfg.py index d47422c1ad9a..11a3aa6f16f6 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/locomotion/humanoid/humanoid_manager_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/locomotion/humanoid/humanoid_manager_env_cfg.py @@ -49,7 +49,6 @@ class HumanoidPhysicsCfg(PresetCfg): isaacsim_physx: PhysxCfg = PhysxCfg(bounce_threshold_velocity=0.2) ovphysx: OvPhysxCfg = OvPhysxCfg() physx: PhysxAutoCfg = PhysxAutoCfg(isaacsim_physx=isaacsim_physx, ovphysx=ovphysx) - default: PhysxCfg = isaacsim_physx newton_mjwarp: NewtonCfg = NewtonCfg( solver_cfg=MJWarpSolverCfg( njmax=80, @@ -62,6 +61,7 @@ class HumanoidPhysicsCfg(PresetCfg): num_substeps=2, debug_mode=False, ) + default: NewtonCfg = newton_mjwarp ## @@ -147,8 +147,8 @@ def __post_init__(self): class HumanoidObservationsCfg(PresetCfg): physx: ObservationsCfg = ObservationsCfg() isaacsim_physx: ObservationsCfg = physx - default: ObservationsCfg = isaacsim_physx newton_mjwarp: ObservationsCfg = ObservationsCfg() + default: ObservationsCfg = newton_mjwarp @configclass diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/pendulum/__init__.py b/source/isaaclab_tasks/isaaclab_tasks/core/pendulum/__init__.py index 4f3071b17f7c..caeabe042613 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/pendulum/__init__.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/pendulum/__init__.py @@ -21,6 +21,8 @@ disable_env_checker=True, kwargs={ "env_cfg_entry_point": f"{__name__}.pendulum_env_cfg:PendulumEnvCfg", + "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:PendulumPPORunnerCfg", + "default_agent": "rsl_rl", "rl_games_cfg_entry_point": f"{agents.__name__}:rl_games_ppo_cfg.yaml", "skrl_cfg_entry_point": f"{agents.__name__}:skrl_ppo_cfg.yaml", "skrl_ippo_cfg_entry_point": f"{agents.__name__}:skrl_ippo_cfg.yaml", diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/pendulum/agents/rsl_rl_ppo_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/core/pendulum/agents/rsl_rl_ppo_cfg.py new file mode 100644 index 000000000000..ddf7f022c745 --- /dev/null +++ b/source/isaaclab_tasks/isaaclab_tasks/core/pendulum/agents/rsl_rl_ppo_cfg.py @@ -0,0 +1,44 @@ +# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md). +# All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause + +from isaaclab.utils.configclass import configclass + +from isaaclab_rl.rsl_rl import RslRlMLPModelCfg, RslRlOnPolicyRunnerCfg, RslRlPpoAlgorithmCfg + + +@configclass +class PendulumPPORunnerCfg(RslRlOnPolicyRunnerCfg): + """RSL-RL PPO configuration for the single-agent view of cart-double-pendulum balancing.""" + + num_steps_per_env = 32 + max_iterations = 500 + save_interval = 50 + experiment_name = "pendulum" + obs_groups = {"actor": ["policy"], "critic": ["policy"]} + actor = RslRlMLPModelCfg( + hidden_dims=[64, 64], + activation="elu", + obs_normalization=True, + distribution_cfg=RslRlMLPModelCfg.GaussianDistributionCfg(init_std=1.0), + ) + critic = RslRlMLPModelCfg( + hidden_dims=[64, 64], + activation="elu", + obs_normalization=True, + ) + algorithm = RslRlPpoAlgorithmCfg( + value_loss_coef=1.0, + use_clipped_value_loss=True, + clip_param=0.2, + entropy_coef=0.001, + num_learning_epochs=5, + num_mini_batches=4, + learning_rate=1.0e-3, + schedule="adaptive", + gamma=0.99, + lam=0.95, + desired_kl=0.01, + max_grad_norm=1.0, + ) diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/reach/config/franka/__init__.py b/source/isaaclab_tasks/isaaclab_tasks/core/reach/config/franka/__init__.py index e697f57dd3b2..7a2415c2b864 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/reach/config/franka/__init__.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/reach/config/franka/__init__.py @@ -23,6 +23,7 @@ "env_cfg_entry_point": f"{__name__}.franka_reach_env_cfg:FrankaReachEnvCfg", "rl_games_cfg_entry_point": f"{agents.__name__}:rl_games_ppo_cfg.yaml", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:FrankaReachPPORunnerCfg", + "default_agent": "rsl_rl", "skrl_cfg_entry_point": f"{agents.__name__}:skrl_ppo_cfg.yaml", }, ) @@ -38,5 +39,6 @@ kwargs={ "env_cfg_entry_point": f"{__name__}.franka_reach_osc_env_cfg:FrankaReachEnvCfg", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:FrankaReachPPORunnerCfg", + "default_agent": "rsl_rl", }, ) diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/reach/config/ur_10/__init__.py b/source/isaaclab_tasks/isaaclab_tasks/core/reach/config/ur_10/__init__.py index 50cf46a54fc1..8424eb7fc250 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/reach/config/ur_10/__init__.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/reach/config/ur_10/__init__.py @@ -19,6 +19,7 @@ "env_cfg_entry_point": f"{__name__}.joint_pos_env_cfg:UR10ReachEnvCfg", "rl_games_cfg_entry_point": f"{agents.__name__}:rl_games_ppo_cfg.yaml", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:UR10ReachPPORunnerCfg", + "default_agent": "rsl_rl", "skrl_cfg_entry_point": f"{agents.__name__}:skrl_ppo_cfg.yaml", }, ) diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/reorient/config/allegro_hand/__init__.py b/source/isaaclab_tasks/isaaclab_tasks/core/reorient/config/allegro_hand/__init__.py index 8571ff7b154a..91581eec335d 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/reorient/config/allegro_hand/__init__.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/reorient/config/allegro_hand/__init__.py @@ -21,6 +21,7 @@ "env_cfg_entry_point": f"{__name__}.allegro_hand_direct_env_cfg:AllegroHandEnvCfg", "rl_games_cfg_entry_point": f"{agents.__name__}:rl_games_ppo_cfg.yaml", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:AllegroHandDirectPPORunnerCfg", + "default_agent": "rsl_rl", "skrl_cfg_entry_point": f"{agents.__name__}:skrl_ppo_cfg.yaml", }, ) @@ -36,6 +37,7 @@ kwargs={ "env_cfg_entry_point": f"{__name__}.allegro_hand_manager_env_cfg:AllegroHandManagerEnvCfg", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:AllegroHandManagerPPORunnerCfg", + "default_agent": "rsl_rl", "rl_games_cfg_entry_point": f"{agents.__name__}:rl_games_ppo_cfg.yaml", "skrl_cfg_entry_point": f"{agents.__name__}:skrl_ppo_cfg.yaml", }, diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/reorient/config/shadow_hand/__init__.py b/source/isaaclab_tasks/isaaclab_tasks/core/reorient/config/shadow_hand/__init__.py index 2c8c1e7c364b..9f3754a27c27 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/reorient/config/shadow_hand/__init__.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/reorient/config/shadow_hand/__init__.py @@ -26,6 +26,7 @@ "env_cfg_entry_point": f"{__name__}.shadow_hand_direct_env_cfg:ShadowHandEnvCfg", "rl_games_cfg_entry_point": f"{agents.__name__}:rl_games_ppo_cfg.yaml", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:ShadowHandPPORunnerCfg", + "default_agent": "rsl_rl", "skrl_cfg_entry_point": f"{agents.__name__}:skrl_ppo_cfg.yaml", }, ) @@ -37,6 +38,7 @@ "env_cfg_entry_point": f"{__name__}.shadow_hand_manager_env_cfg:ShadowHandManagerEnvPresetCfg", "rl_games_cfg_entry_point": f"{agents.__name__}:rl_games_ppo_cfg.yaml", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:ShadowHandManagerPPORunnerCfg", + "default_agent": "rsl_rl", "skrl_cfg_entry_point": f"{agents.__name__}:skrl_ppo_cfg.yaml", }, ) @@ -52,6 +54,7 @@ kwargs={ "env_cfg_entry_point": f"{__name__}.shadow_hand_direct_camera_env_cfg:ShadowHandCameraEnvCfg", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:ShadowHandCameraFFPPORunnerCfg", + "default_agent": "rsl_rl", "rl_games_cfg_entry_point": f"{agents.__name__}:rl_games_ppo_camera_cfg.yaml", }, ) @@ -62,6 +65,7 @@ kwargs={ "env_cfg_entry_point": f"{__name__}.shadow_hand_camera_manager_env_cfg:ShadowHandCameraManagerEnvCfg", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:ShadowHandCameraFFPPORunnerCfg", + "default_agent": "rsl_rl", "rl_games_cfg_entry_point": f"{agents.__name__}:rl_games_ppo_camera_cfg.yaml", }, ) diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/anymal_d/__init__.py b/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/anymal_d/__init__.py index 8447486636e5..775381be0427 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/anymal_d/__init__.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/anymal_d/__init__.py @@ -18,6 +18,7 @@ kwargs={ "env_cfg_entry_point": f"{__name__}.flat_env_cfg:AnymalDFlatEnvCfg", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:AnymalDFlatPPORunnerCfg", + "default_agent": "rsl_rl", "rsl_rl_recurrent_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:AnymalDFlatPPORunnerRecurrentCfg", "rsl_rl_distillation_cfg_entry_point": ( f"{agents.__name__}.rsl_rl_distillation_cfg:AnymalDFlatDistillationRunnerCfg" @@ -37,6 +38,7 @@ kwargs={ "env_cfg_entry_point": f"{__name__}.rough_env_cfg:AnymalDRoughEnvCfg", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:AnymalDRoughPPORunnerCfg", + "default_agent": "rsl_rl", "rsl_rl_with_symmetry_cfg_entry_point": ( f"{agents.__name__}.rsl_rl_ppo_cfg:AnymalDRoughPPORunnerWithSymmetryCfg" ), diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/anymal_d/flat_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/anymal_d/flat_env_cfg.py index 8b6465f7b449..f2b96e28d0b5 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/anymal_d/flat_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/anymal_d/flat_env_cfg.py @@ -32,7 +32,7 @@ class PhysicsCfg(PresetCfg): debug_mode=False, ) newton_kamino = NewtonCfg(solver_cfg=KaminoPADMMSolverCfg(max_contacts_per_world=64)) - default = isaacsim_physx + default = newton_mjwarp @configclass diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/cassie/__init__.py b/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/cassie/__init__.py index 7ba60236964e..ea04e8ebf93b 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/cassie/__init__.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/cassie/__init__.py @@ -18,6 +18,7 @@ kwargs={ "env_cfg_entry_point": f"{__name__}.flat_env_cfg:CassieFlatEnvCfg", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:CassieFlatPPORunnerCfg", + "default_agent": "rsl_rl", "skrl_cfg_entry_point": f"{agents.__name__}:skrl_flat_ppo_cfg.yaml", }, ) @@ -29,6 +30,7 @@ kwargs={ "env_cfg_entry_point": f"{__name__}.rough_env_cfg:CassieRoughEnvCfg", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:CassieRoughPPORunnerCfg", + "default_agent": "rsl_rl", "skrl_cfg_entry_point": f"{agents.__name__}:skrl_rough_ppo_cfg.yaml", }, ) diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/cassie/flat_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/cassie/flat_env_cfg.py index 1cf5501abfe1..21ba95740cdb 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/cassie/flat_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/cassie/flat_env_cfg.py @@ -33,7 +33,7 @@ class PhysicsCfg(PresetCfg): debug_mode=False, ) newton_kamino = NewtonCfg(solver_cfg=KaminoPADMMSolverCfg(max_contacts_per_world=64)) - default = isaacsim_physx + default = newton_mjwarp @configclass diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/g1/__init__.py b/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/g1/__init__.py index 6fa1a65d258e..c812894c8de7 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/g1/__init__.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/g1/__init__.py @@ -18,6 +18,7 @@ kwargs={ "env_cfg_entry_point": f"{__name__}.rough_env_cfg:G1RoughEnvCfg", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:G1RoughPPORunnerCfg", + "default_agent": "rsl_rl", "skrl_cfg_entry_point": f"{agents.__name__}:skrl_rough_ppo_cfg.yaml", }, ) @@ -30,6 +31,7 @@ kwargs={ "env_cfg_entry_point": f"{__name__}.flat_env_cfg:G1FlatEnvCfg", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:G1FlatPPORunnerCfg", + "default_agent": "rsl_rl", "skrl_cfg_entry_point": f"{agents.__name__}:skrl_flat_ppo_cfg.yaml", }, ) diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/g1/flat_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/g1/flat_env_cfg.py index b40e021d6103..5a53be0c3ee3 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/g1/flat_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/g1/flat_env_cfg.py @@ -34,7 +34,7 @@ class PhysicsCfg(PresetCfg): debug_mode=False, ) newton_kamino = NewtonCfg(solver_cfg=KaminoPADMMSolverCfg(max_contacts_per_world=64)) - default = isaacsim_physx + default = newton_mjwarp @configclass diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/go2/__init__.py b/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/go2/__init__.py index b51cf3b73942..4e4c8c9744a0 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/go2/__init__.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/go2/__init__.py @@ -18,6 +18,7 @@ kwargs={ "env_cfg_entry_point": f"{__name__}.flat_env_cfg:UnitreeGo2FlatEnvCfg", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:UnitreeGo2FlatPPORunnerCfg", + "default_agent": "rsl_rl", "skrl_cfg_entry_point": f"{agents.__name__}:skrl_flat_ppo_cfg.yaml", }, ) @@ -29,6 +30,7 @@ kwargs={ "env_cfg_entry_point": f"{__name__}.rough_env_cfg:UnitreeGo2RoughEnvCfg", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:UnitreeGo2RoughPPORunnerCfg", + "default_agent": "rsl_rl", "skrl_cfg_entry_point": f"{agents.__name__}:skrl_rough_ppo_cfg.yaml", }, ) diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/go2/flat_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/go2/flat_env_cfg.py index b40781cba880..bcb90551d801 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/go2/flat_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/go2/flat_env_cfg.py @@ -33,7 +33,7 @@ class PhysicsCfg(PresetCfg): debug_mode=False, ) newton_kamino = NewtonCfg(solver_cfg=KaminoPADMMSolverCfg(max_contacts_per_world=64)) - default = isaacsim_physx + default = newton_mjwarp @configclass diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/h1/__init__.py b/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/h1/__init__.py index 1eefd014e6f8..d2fca850d2c4 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/h1/__init__.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/h1/__init__.py @@ -18,6 +18,7 @@ kwargs={ "env_cfg_entry_point": f"{__name__}.rough_env_cfg:H1RoughEnvCfg", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:H1RoughPPORunnerCfg", + "default_agent": "rsl_rl", "skrl_cfg_entry_point": f"{agents.__name__}:skrl_rough_ppo_cfg.yaml", }, ) @@ -30,6 +31,7 @@ kwargs={ "env_cfg_entry_point": f"{__name__}.flat_env_cfg:H1FlatEnvCfg", "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:H1FlatPPORunnerCfg", + "default_agent": "rsl_rl", "skrl_cfg_entry_point": f"{agents.__name__}:skrl_flat_ppo_cfg.yaml", }, ) diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/h1/flat_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/h1/flat_env_cfg.py index 33b128a80632..1e77fdb16f3f 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/h1/flat_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/velocity/config/h1/flat_env_cfg.py @@ -33,7 +33,7 @@ class PhysicsCfg(PresetCfg): debug_mode=False, ) newton_kamino = NewtonCfg(solver_cfg=KaminoPADMMSolverCfg(max_contacts_per_world=64)) - default = isaacsim_physx + default = newton_mjwarp @configclass diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/velocity/velocity_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/core/velocity/velocity_env_cfg.py index 4133c7d3e8f9..c6e4e199704e 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/velocity/velocity_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/velocity/velocity_env_cfg.py @@ -64,7 +64,7 @@ class RoughPhysicsCfg(PresetCfg): debug_mode=False, default_shape_cfg=NewtonShapeCfg(margin=0.0, ke=160000.0, kd=1100.0), ) - default = isaacsim_physx + default = newton_mjwarp ## diff --git a/source/isaaclab_tasks/isaaclab_tasks/utils/presets.py b/source/isaaclab_tasks/isaaclab_tasks/utils/presets.py index efa77ff12ae8..2ba5760d5b7c 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/utils/presets.py +++ b/source/isaaclab_tasks/isaaclab_tasks/utils/presets.py @@ -22,11 +22,11 @@ class _AutoRtxRendererCfg(RendererCfg): @configclass class MultiBackendRendererCfg(PresetCfg): - default: IsaacRtxRendererCfg = IsaacRtxRendererCfg() + default: NewtonWarpRendererCfg = NewtonWarpRendererCfg() rtx: _AutoRtxRendererCfg = _AutoRtxRendererCfg() newton_renderer: NewtonWarpRendererCfg = NewtonWarpRendererCfg() ovrtx: OVRTXRendererCfg = OVRTXRendererCfg() - isaacsim_rtx = default + isaacsim_rtx: IsaacRtxRendererCfg = IsaacRtxRendererCfg() def set_isaac_rtx_global_settings(renderer_cfg: Any, **settings: Any) -> None: diff --git a/source/isaaclab_tasks/test/core/test_environment_determinism.py b/source/isaaclab_tasks/test/core/test_environment_determinism.py index 74c558fcd1ae..24deddb93ec5 100644 --- a/source/isaaclab_tasks/test/core/test_environment_determinism.py +++ b/source/isaaclab_tasks/test/core/test_environment_determinism.py @@ -23,7 +23,13 @@ import isaaclab_tasks # noqa: F401 from isaaclab_tasks.utils.hydra import resolve_presets -from isaaclab_tasks.utils.parse_cfg import load_cfg_from_registry, parse_env_cfg +from isaaclab_tasks.utils.parse_cfg import load_cfg_from_registry + +# Physics preset pinned for every task below. Bit-wise determinism is a property of the physics +# backend, so the backend is selected explicitly instead of following whichever one the task +# currently defaults to. Newton MJWarp is not yet run-to-run deterministic on CUDA for the +# locomotion tasks, so a default flip must not silently turn this suite into a Newton test. +_PINNED_PHYSICS_PRESET = "isaacsim_physx" @pytest.fixture(scope="module", autouse=True) @@ -100,7 +106,7 @@ def _test_environment_determinism( device: str, *, num_steps: int = 100, - physics_preset_name: str | None = None, + physics_preset_name: str = _PINNED_PHYSICS_PRESET, deterministic_mode: str | None = None, ): """Check deterministic environment creation.""" @@ -138,21 +144,18 @@ def _obtain_transition_tuples( device: str, num_steps: int, *, - physics_preset_name: str | None = None, + physics_preset_name: str, deterministic_mode: str | None = None, ) -> tuple[dict, torch.Tensor]: """Run random actions and obtain transition tuples after fixed number of steps.""" # create a new stage sim_utils.create_new_stage() try: - # parse configuration - if physics_preset_name is None: - env_cfg = parse_env_cfg(task_name, device=device, num_envs=num_envs) - else: - env_cfg = load_cfg_from_registry(task_name, "env_cfg_entry_point") - env_cfg = resolve_presets(env_cfg, selected=(physics_preset_name,)) - env_cfg.sim.device = device - env_cfg.scene.num_envs = num_envs + # Parse configuration with the selected physics backend pinned. + env_cfg = load_cfg_from_registry(task_name, "env_cfg_entry_point") + env_cfg = resolve_presets(env_cfg, selected=(physics_preset_name,)) + env_cfg.sim.device = device + env_cfg.scene.num_envs = num_envs if deterministic_mode is not None: assert isinstance(env_cfg.sim.physics, NewtonCfg) env_cfg.sim.physics.deterministic_mode = deterministic_mode diff --git a/source/isaaclab_tasks/test/core/test_preset_kit_decision.py b/source/isaaclab_tasks/test/core/test_preset_kit_decision.py index 73a119182f3c..5b14f3c7934e 100644 --- a/source/isaaclab_tasks/test/core/test_preset_kit_decision.py +++ b/source/isaaclab_tasks/test/core/test_preset_kit_decision.py @@ -15,6 +15,7 @@ import gymnasium as gym import pytest +from isaaclab_newton.physics import NewtonCfg from isaaclab_ov.physics import OvPhysxCfg from isaaclab_ov.renderers import OVRTXRendererCfg from isaaclab_physx.physics import PhysxCfg @@ -87,11 +88,12 @@ def test_isaacsim_physx_is_physics_selector(): assert "isaacsim_physx" in preset_map[PresetTarget.PHYSICS] -def test_registered_task_physx_presets_keep_auto_selection_explicit(): - """PhysX defaults are concrete while ``physx`` remains the automatic selector.""" +def test_core_task_physx_presets_keep_auto_selection_explicit(): + """Core tasks retain explicit PhysX variants alongside automatic ``physx``.""" for task_id, task_spec in gym.registry.items(): - if not task_id.startswith(("Isaac-", "IsaacContrib-")) or "env_cfg_entry_point" not in task_spec.kwargs: + entry_point = task_spec.kwargs.get("env_cfg_entry_point", "") + if not task_id.startswith("Isaac-") or "isaaclab_tasks.core" not in str(entry_point): continue env_cfg = load_cfg_from_registry(task_id, "env_cfg_entry_point") presets = collect_presets(env_cfg) @@ -137,24 +139,24 @@ def test_preset_mjwarp_ovrtx_does_not_need_kit(): assert needs_kit is False -def test_preset_rtx_with_default_physx_resolves_to_isaac_sim_backends(): - """Automatic RTX follows the default concrete Isaac Sim PhysX backend.""" +def test_preset_rtx_with_default_newton_resolves_to_isaac_sim_backends(): + """Explicit RTX retains the default Newton physics while requiring Isaac Sim.""" env_cfg = _resolve_with_presets("rtx") config_scan = _resolve_runtime_renderer(env_cfg) - assert isinstance(env_cfg.sim.physics, PhysxCfg) - assert isinstance(env_cfg.tiled_camera.renderer_cfg, IsaacRtxRendererCfg) - assert config_scan.needs_kit is True + assert isinstance(env_cfg.sim.physics, NewtonCfg) + assert isinstance(env_cfg.tiled_camera.renderer_cfg, OVRTXRendererCfg) + assert config_scan.needs_kit is False -def test_renderer_selector_rtx_with_default_physx_resolves_to_isaac_sim_backends(): - """The RTX selector follows the default concrete Isaac Sim PhysX backend.""" +def test_renderer_selector_rtx_with_default_newton_resolves_to_isaac_sim_backends(): + """The RTX selector retains the default Newton physics while requiring Isaac Sim.""" env_cfg = _resolve_with_args("renderer=rtx") config_scan = _resolve_runtime_renderer(env_cfg) - assert isinstance(env_cfg.sim.physics, PhysxCfg) - assert isinstance(env_cfg.tiled_camera.renderer_cfg, IsaacRtxRendererCfg) - assert config_scan.needs_kit is True + assert isinstance(env_cfg.sim.physics, NewtonCfg) + assert isinstance(env_cfg.tiled_camera.renderer_cfg, OVRTXRendererCfg) + assert config_scan.needs_kit is False def test_renderer_selector_physx_rtx_resolves_to_ovphysx_without_kit(): @@ -227,20 +229,20 @@ def test_preset_mjwarp_newton_renderer_does_not_need_kit(): assert needs_kit is False -def test_preset_physx_with_default_kit_camera_resolves_to_physx(): - """Automatic PhysX resolves to Isaac Sim PhysX when the default camera requires Kit.""" +def test_preset_physx_with_default_newton_camera_resolves_to_ovphysx(): + """Automatic PhysX resolves to OvPhysX when the default camera is kitless.""" env_cfg = _resolve_with_presets("physx") config_scan = scan(env_cfg) - assert isinstance(env_cfg.sim.physics, PhysxCfg) - assert config_scan.needs_kit is True + assert isinstance(env_cfg.sim.physics, OvPhysxCfg) + assert config_scan.needs_kit is False -def test_preset_default_needs_kit(): - """Default concrete Isaac Sim PhysX plus Isaac RTX requires Kit.""" +def test_preset_default_is_kitless(): + """Default Newton MJWarp plus Newton renderer does not require Kit.""" env_cfg = _resolve_with_presets("default") needs_kit = scan(env_cfg).needs_kit - assert needs_kit is True + assert needs_kit is False def test_preset_mjwarp_isaac_rtx_needs_kit(): diff --git a/source/isaaclab_tasks/test/core/test_rendering_registered_tasks.py b/source/isaaclab_tasks/test/core/test_rendering_registered_tasks.py index 9e32e8b57c1b..6c8d38e5dba4 100644 --- a/source/isaaclab_tasks/test/core/test_rendering_registered_tasks.py +++ b/source/isaaclab_tasks/test/core/test_rendering_registered_tasks.py @@ -61,6 +61,11 @@ def _collect_camera_outputs(env: object) -> dict[str, dict[str, torch.Tensor]]: return outputs +# Physics and renderer presets pinned for every combination below. Golden stages and images are +# backend-specific, so they are compared against an explicit backend rather than whichever backend +# the task currently defaults to. +_PINNED_PRESETS = ("isaacsim_physx", "isaacsim_rtx") + # Task IDs that expose camera/tiled_camera image observations; each is validated for non-blank # rendering. The max different pixels percentage is set based on the screen space taken up by the # env. The ``presets`` column selects a data-type variant on the consolidated cartpole camera task; @@ -96,7 +101,10 @@ def test_rendering_registered_tasks(task_id: str, presets: str | None, env_name: from isaaclab_tasks.utils.parse_cfg import load_cfg_from_registry env_cfg = load_cfg_from_registry(task_id, "env_cfg_entry_point") - env_cfg = resolve_presets(env_cfg, {presets} if presets else frozenset()) + selected = set(_PINNED_PRESETS) + if presets: + selected.add(presets) + env_cfg = resolve_presets(env_cfg, selected) env_cfg.sim.device = "cuda:0" env_cfg.scene.num_envs = 4 @@ -108,8 +116,8 @@ def test_rendering_registered_tasks(task_id: str, presets: str | None, env_name: maybe_save_stage( f"registered_tasks_{task_id}", - "default_physics", - "default_renderer", + _PINNED_PRESETS[0], + _PINNED_PRESETS[1], "stage", compare_golden=(presets is None), ) @@ -122,8 +130,8 @@ def test_rendering_registered_tasks(task_id: str, presets: str | None, env_name: validate_camera_outputs( f"registered_tasks/{task_id}", - "default_physics", - "default_renderer", + _PINNED_PRESETS[0], + _PINNED_PRESETS[1], camera_outputs, max_different_pixels_percentage=MAX_DIFFERENT_PIXELS_PERCENTAGE_BY_ENV_NAME[env_name], comparison_scores=_COMPARISON_SCORES, diff --git a/source/isaaclab_tasks/test/core/test_runtime_compatibility.py b/source/isaaclab_tasks/test/core/test_runtime_compatibility.py index 6ca07657def5..30acafbf7622 100644 --- a/source/isaaclab_tasks/test/core/test_runtime_compatibility.py +++ b/source/isaaclab_tasks/test/core/test_runtime_compatibility.py @@ -18,6 +18,7 @@ import sys import pytest +from isaaclab_newton.physics import NewtonCfg from isaaclab_ov.physics import OvPhysxCfg from isaaclab_ov.renderers import OVRTXRendererCfg from isaaclab_physx.physics import PhysxCfg @@ -226,13 +227,14 @@ def test_newton_plus_ovrtx_is_valid(): validate_runtime_compatibility(env_cfg) -def test_default_isaacsim_physx_plus_ovrtx_raises(): - """The concrete default Isaac Sim PhysX backend is incompatible with OVRTX.""" +def test_default_newton_plus_ovrtx_is_valid(): + """The default Newton backend is compatible with OVRTX.""" env_cfg = _resolve_with_presets("ovrtx") - assert isinstance(env_cfg.sim.physics, PhysxCfg) - with pytest.raises(ValueError, match="PhysxCfg"): - validate_runtime_compatibility(env_cfg) + assert isinstance(env_cfg.sim.physics, NewtonCfg) + config_scan = validate_runtime_compatibility(env_cfg) + assert isinstance(env_cfg.tiled_camera.renderer_cfg, OVRTXRendererCfg) + assert config_scan.needs_kit is False def test_explicit_auto_physx_plus_ovrtx_resolves_to_ovphysx(): @@ -302,14 +304,14 @@ def test_default_preset_is_valid(): validate_runtime_compatibility(env_cfg) -def test_rtx_with_default_physx_is_valid_and_resolves_to_isaac_sim_backends(): - """The RTX selector follows the default concrete Isaac Sim PhysX backend.""" +def test_rtx_with_default_newton_is_valid_and_resolves_to_isaac_sim_backends(): + """The RTX selector retains default Newton physics and requires Isaac Sim.""" env_cfg = _resolve_with_presets("rtx") config_scan = validate_runtime_compatibility(env_cfg) - assert isinstance(env_cfg.sim.physics, PhysxCfg) - assert isinstance(env_cfg.tiled_camera.renderer_cfg, IsaacRtxRendererCfg) - assert config_scan.needs_kit is True + assert isinstance(env_cfg.sim.physics, NewtonCfg) + assert isinstance(env_cfg.tiled_camera.renderer_cfg, OVRTXRendererCfg) + assert config_scan.needs_kit is False def test_renderer_selector_physx_rtx_is_valid_and_resolves_to_ovphysx_and_ovrtx(): diff --git a/source/isaaclab_tasks/test/core/test_shadow_hand_camera_presets.py b/source/isaaclab_tasks/test/core/test_shadow_hand_camera_presets.py index cad2801dab19..48ab3ce80b96 100644 --- a/source/isaaclab_tasks/test/core/test_shadow_hand_camera_presets.py +++ b/source/isaaclab_tasks/test/core/test_shadow_hand_camera_presets.py @@ -229,7 +229,7 @@ def test_all_camera_presets_present(shadow_hand_camera_presets): _RENDERER_PRESETS = [ # preset_name, expected_class - ("default", IsaacRtxRendererCfg), + ("default", NewtonWarpRendererCfg), ("isaacsim_rtx", IsaacRtxRendererCfg), ("newton_renderer", NewtonWarpRendererCfg), pytest.param("ovrtx", OVRTXRendererCfg, marks=pytest.mark.skip(reason="OVRTX testing disabled")), diff --git a/source/isaaclab_tasks/test/env_test_utils.py b/source/isaaclab_tasks/test/env_test_utils.py index 3547c175fd66..c47fea95436a 100644 --- a/source/isaaclab_tasks/test/env_test_utils.py +++ b/source/isaaclab_tasks/test/env_test_utils.py @@ -5,6 +5,7 @@ """Shared test utilities for Isaac Lab environments.""" +import gc import importlib import os import sys @@ -521,6 +522,12 @@ def _check_random_actions( if env is not None: env.close() + # Drop unreachable environment objects while the device is still alive. Warp arrays + # free their device memory from a finalizer, so any array left for a later collection + # runs ``wp_free_device_async`` against streams that the teardown below has already + # destroyed, which segfaults the interpreter mid-run. + gc.collect() + # Clear the simulation context singleton (also closes the USD context stage) SimulationContext.clear_instance() diff --git a/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/default_physics-default_renderer-albedo.png b/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/isaacsim_physx-isaacsim_rtx-albedo.png similarity index 100% rename from source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/default_physics-default_renderer-albedo.png rename to source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/isaacsim_physx-isaacsim_rtx-albedo.png diff --git a/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/default_physics-default_renderer-depth.png b/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/isaacsim_physx-isaacsim_rtx-depth.png similarity index 100% rename from source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/default_physics-default_renderer-depth.png rename to source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/isaacsim_physx-isaacsim_rtx-depth.png diff --git a/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/default_physics-default_renderer-rgb.png b/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/isaacsim_physx-isaacsim_rtx-rgb.png similarity index 100% rename from source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/default_physics-default_renderer-rgb.png rename to source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/isaacsim_physx-isaacsim_rtx-rgb.png diff --git a/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/default_physics-default_renderer-rgba.png b/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/isaacsim_physx-isaacsim_rtx-rgba.png similarity index 100% rename from source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/default_physics-default_renderer-rgba.png rename to source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/isaacsim_physx-isaacsim_rtx-rgba.png diff --git a/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/default_physics-default_renderer-simple_shading_constant_diffuse.png b/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/isaacsim_physx-isaacsim_rtx-simple_shading_constant_diffuse.png similarity index 100% rename from source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/default_physics-default_renderer-simple_shading_constant_diffuse.png rename to source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/isaacsim_physx-isaacsim_rtx-simple_shading_constant_diffuse.png diff --git a/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/default_physics-default_renderer-simple_shading_diffuse_mdl.png b/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/isaacsim_physx-isaacsim_rtx-simple_shading_diffuse_mdl.png similarity index 100% rename from source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/default_physics-default_renderer-simple_shading_diffuse_mdl.png rename to source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/isaacsim_physx-isaacsim_rtx-simple_shading_diffuse_mdl.png diff --git a/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/default_physics-default_renderer-simple_shading_full_mdl.png b/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/isaacsim_physx-isaacsim_rtx-simple_shading_full_mdl.png similarity index 100% rename from source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/default_physics-default_renderer-simple_shading_full_mdl.png rename to source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Cartpole-Camera-Direct/isaacsim_physx-isaacsim_rtx-simple_shading_full_mdl.png diff --git a/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Repose-Cube-Shadow-Vision-Direct-v0/default_physics-default_renderer-depth.png b/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Repose-Cube-Shadow-Vision-Direct-v0/isaacsim_physx-isaacsim_rtx-depth.png similarity index 100% rename from source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Repose-Cube-Shadow-Vision-Direct-v0/default_physics-default_renderer-depth.png rename to source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Repose-Cube-Shadow-Vision-Direct-v0/isaacsim_physx-isaacsim_rtx-depth.png diff --git a/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Repose-Cube-Shadow-Vision-Direct-v0/default_physics-default_renderer-rgb.png b/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Repose-Cube-Shadow-Vision-Direct-v0/isaacsim_physx-isaacsim_rtx-rgb.png similarity index 100% rename from source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Repose-Cube-Shadow-Vision-Direct-v0/default_physics-default_renderer-rgb.png rename to source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Repose-Cube-Shadow-Vision-Direct-v0/isaacsim_physx-isaacsim_rtx-rgb.png diff --git a/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Repose-Cube-Shadow-Vision-Direct-v0/default_physics-default_renderer-rgba.png b/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Repose-Cube-Shadow-Vision-Direct-v0/isaacsim_physx-isaacsim_rtx-rgba.png similarity index 100% rename from source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Repose-Cube-Shadow-Vision-Direct-v0/default_physics-default_renderer-rgba.png rename to source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Repose-Cube-Shadow-Vision-Direct-v0/isaacsim_physx-isaacsim_rtx-rgba.png diff --git a/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Repose-Cube-Shadow-Vision-Direct-v0/default_physics-default_renderer-semantic_segmentation.png b/source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Repose-Cube-Shadow-Vision-Direct-v0/isaacsim_physx-isaacsim_rtx-semantic_segmentation.png similarity index 100% rename from source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Repose-Cube-Shadow-Vision-Direct-v0/default_physics-default_renderer-semantic_segmentation.png rename to source/isaaclab_tasks/test/golden_images/registered_tasks/Isaac-Repose-Cube-Shadow-Vision-Direct-v0/isaacsim_physx-isaacsim_rtx-semantic_segmentation.png diff --git a/source/isaaclab_tasks/test/golden_stages/registered_tasks_Isaac-Cartpole-Camera-Direct/default_physics-default_renderer-stage.usda b/source/isaaclab_tasks/test/golden_stages/registered_tasks_Isaac-Cartpole-Camera-Direct/isaacsim_physx-isaacsim_rtx-stage.usda similarity index 100% rename from source/isaaclab_tasks/test/golden_stages/registered_tasks_Isaac-Cartpole-Camera-Direct/default_physics-default_renderer-stage.usda rename to source/isaaclab_tasks/test/golden_stages/registered_tasks_Isaac-Cartpole-Camera-Direct/isaacsim_physx-isaacsim_rtx-stage.usda diff --git a/source/isaaclab_tasks/test/golden_stages/registered_tasks_Isaac-Reorient-Cube-Shadow-Camera-Direct/default_physics-default_renderer-stage.usda b/source/isaaclab_tasks/test/golden_stages/registered_tasks_Isaac-Reorient-Cube-Shadow-Camera-Direct/isaacsim_physx-isaacsim_rtx-stage.usda similarity index 100% rename from source/isaaclab_tasks/test/golden_stages/registered_tasks_Isaac-Reorient-Cube-Shadow-Camera-Direct/default_physics-default_renderer-stage.usda rename to source/isaaclab_tasks/test/golden_stages/registered_tasks_Isaac-Reorient-Cube-Shadow-Camera-Direct/isaacsim_physx-isaacsim_rtx-stage.usda diff --git a/source/isaaclab_visualizers/changelog.d/default-newton-rsl.skip b/source/isaaclab_visualizers/changelog.d/default-newton-rsl.skip new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/source/isaaclab_visualizers/test/visualizer_integration_utils.py b/source/isaaclab_visualizers/test/visualizer_integration_utils.py index 17c4351ad927..5b458ff574ad 100644 --- a/source/isaaclab_visualizers/test/visualizer_integration_utils.py +++ b/source/isaaclab_visualizers/test/visualizer_integration_utils.py @@ -1585,7 +1585,7 @@ def _make_anymal_d_env(visualizer_kind: str | tuple[str, ...], backend_kind: str from isaaclab.envs import ManagerBasedRLEnv env_cfg = copy.deepcopy(AnymalDFlatEnvCfg()) - preset_key = "newton_mjwarp" if backend_kind == "newton" else "default" + preset_key = "newton_mjwarp" if backend_kind == "newton" else "isaacsim_physx" env_cfg.sim.physics = getattr(env_cfg.sim.physics, preset_key) env_cfg.scene.num_envs = ( _ANYMAL_D_TILED_CAMERA_INTEGRATION_NUM_ENVS if tiled_camera else _ANYMAL_D_INTEGRATION_NUM_ENVS @@ -1840,6 +1840,9 @@ def _make_cartpole_camera_env( env_cfg.observation_space = [th, tw, env_cfg.observation_space[2]] env_cfg.seed = None env_cfg.sim.physics, _ = _get_physics_cfg(backend_kind) + # Pin the camera renderer: these goldens compare visualizer output, so the frames must not + # shift when the MultiBackendRendererCfg default changes. + env_cfg.tiled_camera.default.renderer_cfg = env_cfg.tiled_camera.default.renderer_cfg.isaacsim_rtx visualizer_kinds = (visualizer_kind,) if isinstance(visualizer_kind, str) else tuple(visualizer_kind) visualizer_cfgs = [_get_visualizer_cfg(kind, tiled_camera=tiled_camera)[0] for kind in visualizer_kinds] env_cfg.sim.visualizer_cfgs = visualizer_cfgs[0] if len(visualizer_cfgs) == 1 else visualizer_cfgs