diff --git a/source/isaaclab_rl/changelog.d/default-newton-classic.skip b/source/isaaclab_rl/changelog.d/default-newton-classic.skip new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/source/isaaclab_rl/test/test_entrypoints_common.py b/source/isaaclab_rl/test/test_entrypoints_common.py index 6b3932b30501..c3594644bc98 100644 --- a/source/isaaclab_rl/test/test_entrypoints_common.py +++ b/source/isaaclab_rl/test/test_entrypoints_common.py @@ -376,9 +376,9 @@ def summary(self, title: str, fields: dict[str, str]) -> None: # ``physx`` reaches the physics backend the same way ``rtx`` reaches the renderer (["physics=physx", "renderer=rtx"], "physx (ovphysx)", "rtx (ovrtx)", "none"), # a run that names no backend reports the ones the task pinned as defaults - ([], "default (isaacsim_physx)", "default (isaacsim_rtx)", "none"), + ([], "default (newton_mjwarp)", "default (newton_renderer)", "none"), # a domain preset has no row of its own - (["physics=physx", "presets=depth"], "physx (isaacsim_physx)", "default (isaacsim_rtx)", "depth"), + (["physics=physx", "presets=depth"], "physx (ovphysx)", "default (newton_renderer)", "depth"), ], ) def test_run_summary_reports_the_backends_the_run_resolves_to( diff --git a/source/isaaclab_tasks/changelog.d/default-newton-classic.minor.rst b/source/isaaclab_tasks/changelog.d/default-newton-classic.minor.rst new file mode 100644 index 000000000000..b0bf84b1aae3 --- /dev/null +++ b/source/isaaclab_tasks/changelog.d/default-newton-classic.minor.rst @@ -0,0 +1,5 @@ +Changed +^^^^^^^ + +* **Breaking:** Changed the Cartpole task family to use Newton MJWarp and the Newton renderer by default. + Pass explicit physics and renderer presets to retain an Isaac Sim PhysX configuration. diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/cartpole/cartpole_direct_camera_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/core/cartpole/cartpole_direct_camera_env_cfg.py index 3f3ed473d55f..45a0d84cf3fc 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/cartpole/cartpole_direct_camera_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/cartpole/cartpole_direct_camera_env_cfg.py @@ -34,7 +34,9 @@ class BaseCartpoleTiledCameraCfg(CameraCfg): ) width: int = 96 height: int = 96 - renderer_cfg: MultiBackendRendererCfg = MultiBackendRendererCfg(newton_renderer=NewtonWarpRendererCfg()) + renderer_cfg: MultiBackendRendererCfg = MultiBackendRendererCfg( + default=NewtonWarpRendererCfg(), newton_renderer=NewtonWarpRendererCfg() + ) default = BaseCartpoleTiledCameraCfg(data_types=["rgb"]) depth = BaseCartpoleTiledCameraCfg(data_types=["depth"]) 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 8206bb303958..855d27439175 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_camera_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/core/cartpole/cartpole_manager_camera_env_cfg.py index fddcefc69c0d..825bd2570634 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/cartpole/cartpole_manager_camera_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/cartpole/cartpole_manager_camera_env_cfg.py @@ -46,7 +46,9 @@ class BaseCartpoleTiledCameraCfg(CameraCfg): ) width: int = 96 height: int = 96 - renderer_cfg: MultiBackendRendererCfg = MultiBackendRendererCfg(newton_renderer=NewtonWarpRendererCfg()) + renderer_cfg: MultiBackendRendererCfg = MultiBackendRendererCfg( + default=NewtonWarpRendererCfg(), newton_renderer=NewtonWarpRendererCfg() + ) default = BaseCartpoleTiledCameraCfg(data_types=["rgb"]) depth = BaseCartpoleTiledCameraCfg(data_types=["depth"]) 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/test/core/test_rendering_registered_tasks.py b/source/isaaclab_tasks/test/core/test_rendering_registered_tasks.py index 9e32e8b57c1b..c8e3697ebbef 100644 --- a/source/isaaclab_tasks/test/core/test_rendering_registered_tasks.py +++ b/source/isaaclab_tasks/test/core/test_rendering_registered_tasks.py @@ -63,8 +63,8 @@ def _collect_camera_outputs(env: object) -> dict[str, dict[str, torch.Tensor]]: # 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; -# ``None`` uses the default. +# env. These golden baselines validate Isaac Sim PhysX with Isaac RTX. The ``presets`` column +# selects a data-type variant on the consolidated cartpole camera task; ``None`` uses its default. _RENDER_CORRECTNESS_TASK_IDS = [ ("Isaac-Cartpole-Camera-Direct", None, "cartpole"), ("Isaac-Cartpole-Camera-Direct", "albedo", "cartpole"), @@ -96,7 +96,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_presets = {"isaacsim_physx", "isaacsim_rtx"} + if presets: + selected_presets.add(presets) + env_cfg = resolve_presets(env_cfg, selected_presets) env_cfg.sim.device = "cuda:0" env_cfg.scene.num_envs = 4 diff --git a/source/isaaclab_tasks/test/core/test_runtime_compatibility.py b/source/isaaclab_tasks/test/core/test_runtime_compatibility.py index 902b9e1c3106..fce37d4d4c01 100644 --- a/source/isaaclab_tasks/test/core/test_runtime_compatibility.py +++ b/source/isaaclab_tasks/test/core/test_runtime_compatibility.py @@ -16,6 +16,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 @@ -199,13 +200,15 @@ 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 supports the default OVRTX renderer.""" 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(): @@ -270,19 +273,19 @@ def test_auto_physx_explicit_experience_resolves_to_isaac_sim_backends(): def test_default_preset_is_valid(): - """The default preset (PhysX + Isaac RTX) is supported.""" + """The default preset (Newton + Newton renderer) is supported.""" env_cfg = _resolve_with_presets("default") 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_ovrtx(): + """The RTX selector resolves to OVRTX with the default Newton backend.""" 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_video_recording.py b/source/isaaclab_tasks/test/core/test_video_recording.py index e0a12d953a1c..c8ba164ffa6d 100644 --- a/source/isaaclab_tasks/test/core/test_video_recording.py +++ b/source/isaaclab_tasks/test/core/test_video_recording.py @@ -100,6 +100,7 @@ def _cartpole_cfg_newton(*, num_envs: int = 1): def _cartpole_camera_cfg_physx(*, num_envs: int = 1): from isaaclab_physx.physics import PhysxCfg + from isaaclab_physx.renderers import IsaacRtxRendererCfg from isaaclab_tasks.core.cartpole.cartpole_direct_camera_env_cfg import CartpoleCameraEnvCfg @@ -107,6 +108,7 @@ def _cartpole_camera_cfg_physx(*, num_envs: int = 1): cfg = cfg.default cfg.scene.num_envs = num_envs cfg.sim.physics = PhysxCfg() + cfg.tiled_camera.renderer_cfg = IsaacRtxRendererCfg() return cfg diff --git a/source/isaaclab_visualizers/changelog.d/default-newton-classic.skip b/source/isaaclab_visualizers/changelog.d/default-newton-classic.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 2b4a46c6c587..8a2dbc23e7da 100644 --- a/source/isaaclab_visualizers/test/visualizer_integration_utils.py +++ b/source/isaaclab_visualizers/test/visualizer_integration_utils.py @@ -1860,6 +1860,7 @@ 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) + 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