diff --git a/docs/source/features/hydra.rst b/docs/source/features/hydra.rst index 703a531bf26e..6ff952adce3d 100644 --- a/docs/source/features/hydra.rst +++ b/docs/source/features/hydra.rst @@ -252,7 +252,7 @@ override is given: class PhysicsCfg(PresetCfg): isaacsim_physx: PhysxCfg = PhysxCfg() physx: PhysxAutoCfg = PhysxAutoCfg(isaacsim_physx=isaacsim_physx) - default: PhysxAutoCfg = physx + default: PhysxCfg = isaacsim_physx newton_mjwarp: NewtonCfg = NewtonCfg() @configclass @@ -264,11 +264,13 @@ override is given: # Use Newton physics backend python train.py --task=Isaac-Reach-Franka env.physics=newton_mjwarp -For tasks that expose automatic PhysX-family selection, ``physics=physx`` is -resolved at launch time: Isaac Sim PhysX is used when a Kit renderer or Kit viewer -is requested. For fully kit-less runs, OvPhysX is used when the task configures -an OvPhysX alternative; otherwise selection falls back to Isaac Sim PhysX and -requires Kit. Use ``physics=isaacsim_physx`` to force Isaac Sim PhysX. +The concrete ``isaacsim_physx`` variant is the default in this example. Select +``physics=physx`` to enable automatic PhysX-family selection at launch time: +Isaac Sim PhysX is used when a Kit renderer or Kit viewer is requested. For fully +kit-less runs, OvPhysX is used when the task configures an OvPhysX alternative; +otherwise selection falls back to Isaac Sim PhysX and requires Kit. This matches +renderer selection, where ``isaacsim_rtx`` is the concrete default and +``renderer=rtx`` is automatic. The ``default`` field can be set to ``None`` to make an optional feature that is disabled unless explicitly selected: @@ -321,7 +323,7 @@ Physics backend selection uses the same preset system. A task can define a isaacsim_physx=isaacsim_physx, ovphysx=ovphysx, ) - default = physx + default: PhysxCfg = isaacsim_physx newton_mjwarp: NewtonCfg = NewtonCfg( solver_cfg=MJWarpSolverCfg(njmax=5, nconmax=3), num_substeps=1, diff --git a/docs/source/migration/migrating_to_isaaclab_3-0.rst b/docs/source/migration/migrating_to_isaaclab_3-0.rst index f59106d8ebd5..e3846efc4a5c 100644 --- a/docs/source/migration/migrating_to_isaaclab_3-0.rst +++ b/docs/source/migration/migrating_to_isaaclab_3-0.rst @@ -652,20 +652,25 @@ when no CLI override is given. Other fields are named presets selectable with .. code-block:: python - from isaaclab_tasks.utils import PresetCfg + from isaaclab.physics import PhysxAutoCfg from isaaclab.utils.configclass import configclass + from isaaclab_ovphysx.physics import OvPhysxCfg + from isaaclab_tasks.utils import PresetCfg @configclass class MyPhysicsCfg(PresetCfg): - default: PhysxCfg = PhysxCfg(...) # used when no override is given - physx: PhysxCfg = PhysxCfg(...) # selected by physics=physx + isaacsim_physx: PhysxCfg = PhysxCfg(...) + ovphysx: OvPhysxCfg = OvPhysxCfg() + physx: PhysxAutoCfg = PhysxAutoCfg(isaacsim_physx=isaacsim_physx, ovphysx=ovphysx) + default: PhysxCfg = isaacsim_physx # used when no override is given newton_mjwarp: NewtonCfg = NewtonCfg(...) # selected by physics=newton_mjwarp Selecting a preset at launch ----------------------------- -Pass ``physics=newton_mjwarp`` (or ``physics=physx``) on the CLI to swap the entire config section. -The legacy ``presets=NAME`` form still works for the same values. +Pass ``physics=newton_mjwarp`` on the CLI to swap the entire config section. +Use ``physics=physx`` to opt into automatic PhysX-family selection. The legacy +``presets=NAME`` form still works for the same values. .. code-block:: bash @@ -673,7 +678,7 @@ The legacy ``presets=NAME`` form still works for the same values. uv run --extra isaacsim isaaclab train --rl_library rsl_rl \ --task Isaac-Open-Drawer-Franka-Direct physics=newton_mjwarp - # Run with default (PhysX) backend + # Run with default (concrete Isaac Sim PhysX) backend uv run --extra isaacsim isaaclab train --rl_library rsl_rl \ --task Isaac-Open-Drawer-Franka-Direct @@ -693,18 +698,30 @@ subclass that carries both a PhysX and a Newton variant. self.sim.dt = 1 / 60 self.sim.physics = PhysxCfg(bounce_threshold_velocity=0.2) +.. important:: + + The ``After`` example below mirrors the current Reach task, which intentionally + uses Newton/MJWarp as its default. The ``Before`` snippet only illustrates the + older single-backend form, so the default differs between the two snippets. + When migrating a task that should retain PhysX by default, use + ``default: PhysxCfg = isaacsim_physx`` instead. Adding backend variants should + not silently change a task's established default. + *After:* .. code-block:: python + from isaaclab.physics import PhysxAutoCfg from isaaclab_newton.physics import MJWarpSolverCfg, NewtonCfg + from isaaclab_ovphysx.physics import OvPhysxCfg from isaaclab_physx.physics import PhysxCfg from isaaclab_tasks.utils import PresetCfg @configclass class ReachPhysicsCfg(PresetCfg): - default: PhysxCfg = PhysxCfg(bounce_threshold_velocity=0.2) - physx: PhysxCfg = PhysxCfg(bounce_threshold_velocity=0.2) + isaacsim_physx: PhysxCfg = PhysxCfg(bounce_threshold_velocity=0.2) + ovphysx: OvPhysxCfg = OvPhysxCfg() + physx: PhysxAutoCfg = PhysxAutoCfg(isaacsim_physx=isaacsim_physx, ovphysx=ovphysx) newton_mjwarp: NewtonCfg = NewtonCfg( solver_cfg=MJWarpSolverCfg( njmax=20, nconmax=20, ls_iterations=20, @@ -714,6 +731,7 @@ subclass that carries both a PhysX and a Newton variant. num_substeps=1, debug_mode=False, ) + default: NewtonCfg = newton_mjwarp # In the env cfg __post_init__: def __post_init__(self): diff --git a/docs/source/overview/core-concepts/multi_backend_architecture.rst b/docs/source/overview/core-concepts/multi_backend_architecture.rst index a43e80cdc5c4..9fbb72cf6844 100644 --- a/docs/source/overview/core-concepts/multi_backend_architecture.rst +++ b/docs/source/overview/core-concepts/multi_backend_architecture.rst @@ -176,6 +176,7 @@ below shows only the physics-related fields: .. code-block:: python from isaaclab.envs import DirectRLEnvCfg + from isaaclab.physics import PhysxAutoCfg from isaaclab.sim import SimulationCfg from isaaclab.utils.configclass import configclass from isaaclab_newton.physics import MJWarpSolverCfg, NewtonCfg @@ -185,12 +186,16 @@ below shows only the physics-related fields: @configclass class CartpolePhysicsCfg(PresetCfg): - default: PhysxCfg = PhysxCfg() - physx: PhysxCfg = PhysxCfg() + 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, nconmax=3) ) - ovphysx: OvPhysxCfg = OvPhysxCfg() @configclass class CartpoleEnvCfg(DirectRLEnvCfg): @@ -204,9 +209,12 @@ Users then select a physics backend at the command line: .. code-block:: bash - # Default (PhysX) + # Default (concrete Isaac Sim PhysX) uv run isaaclab train --rl_library rsl_rl --task Isaac-Cartpole-Direct + # Automatic PhysX-family selection + uv run isaaclab train --rl_library rsl_rl --task Isaac-Cartpole-Direct physics=physx + # MJWarp (Newton backend) uv run isaaclab train --rl_library rsl_rl --task Isaac-Cartpole-Direct physics=newton_mjwarp @@ -217,15 +225,26 @@ Users then select a physics backend at the command line: .. code-block:: bash - # Default (PhysX) + # Default (concrete Isaac Sim PhysX) ./isaaclab.sh train --rl_library rsl_rl --task Isaac-Cartpole-Direct + # Automatic PhysX-family selection + ./isaaclab.sh train --rl_library rsl_rl --task Isaac-Cartpole-Direct physics=physx + # MJWarp (Newton backend) ./isaaclab.sh train --rl_library rsl_rl --task Isaac-Cartpole-Direct physics=newton_mjwarp # OvPhysX backend ./isaaclab.sh train --rl_library rsl_rl --task Isaac-Cartpole-Direct physics=ovphysx +When a task's default would otherwise be automatic ``PhysxAutoCfg`` selection, +its ``default`` variant is the concrete ``isaacsim_physx`` configuration. +Explicit defaults such as Newton remain unchanged. The ``physics=physx`` +selector is opt-in and chooses between Isaac Sim PhysX and OvPhysX at launch +time according to whether the resolved runtime requires Kit. This mirrors +renderer presets: the default is concrete ``isaacsim_rtx``, while +``renderer=rtx`` opts into automatic selection. + The Physics Manager ------------------- diff --git a/docs/source/overview/core-concepts/physical-backends/index.rst b/docs/source/overview/core-concepts/physical-backends/index.rst index 4558a7d91268..18d07d11fc71 100644 --- a/docs/source/overview/core-concepts/physical-backends/index.rst +++ b/docs/source/overview/core-concepts/physical-backends/index.rst @@ -135,17 +135,23 @@ declares all three backends side by side: .. code-block:: python - from isaaclab_physx.physics import PhysxCfg + from isaaclab.physics import PhysxAutoCfg from isaaclab_newton.physics import MJWarpSolverCfg, NewtonCfg from isaaclab_ovphysx.physics import OvPhysxCfg + from isaaclab_physx.physics import PhysxCfg @configclass class CartpolePhysicsCfg(PresetCfg): - default: PhysxCfg = PhysxCfg() - physx: PhysxCfg = PhysxCfg() - newton_mjwarp: NewtonCfg = NewtonCfg(solver_cfg=MJWarpSolverCfg()) + 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()) -Users then select the backend at the command line via ``presets=`` or by -overriding the physics field directly. See :ref:`hydra-backend-solver-presets` for -the full Hydra interaction. +With no selector, the task uses concrete Isaac Sim PhysX. Users can select a +backend with ``physics=``; ``physics=physx`` explicitly opts into automatic +selection between the configured PhysX-family implementations. See +:ref:`hydra-backend-solver-presets` for the full Hydra interaction. diff --git a/docs/source/overview/core-concepts/physical-backends/physx/installation.rst b/docs/source/overview/core-concepts/physical-backends/physx/installation.rst index d56027cc34ad..c3fbbf912e69 100644 --- a/docs/source/overview/core-concepts/physical-backends/physx/installation.rst +++ b/docs/source/overview/core-concepts/physical-backends/physx/installation.rst @@ -37,5 +37,8 @@ default preset: ./isaaclab.sh -p scripts/environments/zero_agent.py --task Isaac-Cartpole --num_envs 128 -The ``default`` preset on most tasks resolves to PhysX. You can also pass -``physics=physx`` explicitly on tasks that declare multi-backend physics presets. +Environments whose previous default was automatic PhysX selection now use the +concrete ``isaacsim_physx`` variant by default. Existing explicit defaults, such +as Newton, remain unchanged. Pass ``physics=physx`` explicitly to opt into +automatic PhysX-family selection between Isaac Sim PhysX and OvPhysX on tasks +that support both. diff --git a/docs/source/overview/core-concepts/physical-backends/physx/supported-features.rst b/docs/source/overview/core-concepts/physical-backends/physx/supported-features.rst index 1b68ad147374..f94293f2d91b 100644 --- a/docs/source/overview/core-concepts/physical-backends/physx/supported-features.rst +++ b/docs/source/overview/core-concepts/physical-backends/physx/supported-features.rst @@ -3,8 +3,10 @@ Supported Features PhysX is the broadest backend in Isaac Lab. It is the reference for behaviour parity and supports most public asset, sensor, and renderer surfaces in the -framework. Tasks built before Isaac Lab 3.0 ran on PhysX, and the bulk of the -shipped tasks still default to the PhysX preset. +framework. Tasks built before Isaac Lab 3.0 ran on PhysX. Environments whose +previous default was automatic PhysX selection now use the concrete +``isaacsim_physx`` preset by default; explicit backend defaults remain +unchanged. The summary below is intentionally coarse; consult each component's API documentation for fine-grained capability details. @@ -52,8 +54,9 @@ Tasks and Workflows ------------------- * Direct and Manager-based workflows -* All ``isaaclab_tasks`` environments default to the PhysX preset unless the - task explicitly opts in to a different backend +* ``isaaclab_tasks`` environments that previously defaulted to automatic PhysX + selection now default to concrete Isaac Sim PhysX. Environments with an + explicit backend default, including Newton tasks, retain that default. * Imitation learning and motion-generation pipelines (Mimic, motion generators) diff --git a/docs/source/overview/environments.rst b/docs/source/overview/environments.rst index 504c300a16d7..47da6c69d8c3 100644 --- a/docs/source/overview/environments.rst +++ b/docs/source/overview/environments.rst @@ -90,13 +90,17 @@ modes. The **Presets** column in each table below is divided into three labeled * **physics=** — physics-backend name passed as ``physics=NAME`` (e.g. ``physx``, ``isaacsim_physx``, ``newton_mjwarp``, - ``newton_kamino``, ``ovphysx``, ``newton_mjwarp_vbd_proxy``). On tasks that - expose automatic PhysX-family selection, ``physx`` uses Isaac Sim PhysX when - Kit is required and OvPhysX otherwise when the task supports it. Tasks - without an OvPhysX alternative fall back to Isaac Sim PhysX; use - ``isaacsim_physx`` to force Isaac Sim PhysX directly. + ``newton_kamino``, ``ovphysx``, ``newton_mjwarp_vbd_proxy``). Environments + whose previous default was automatic PhysX selection use the concrete + ``isaacsim_physx`` variant by default; explicit backend defaults such as + Newton remain unchanged. Select ``physics=physx`` to opt into automatic + PhysX-family selection: it uses Isaac Sim PhysX when Kit is required and + OvPhysX otherwise when the task supports it. Tasks without an OvPhysX + alternative fall back to Isaac Sim PhysX. * **renderer=** — renderer-backend name passed as ``renderer=NAME`` - (e.g. ``isaacsim_rtx``, ``newton_renderer``, ``ovrtx``, ``rtx``) + (e.g. ``isaacsim_rtx``, ``newton_renderer``, ``ovrtx``, ``rtx``). Cameras + using the multi-backend renderer config default to concrete ``isaacsim_rtx``; + select ``renderer=rtx`` to opt into automatic RTX-family selection. * **presets=** — environment-specific (domain) preset name passed as ``presets=NAME[,NAME,...]`` (e.g. ``rgb``, ``depth``, ``single_camera``, ``duo_camera``) @@ -109,7 +113,7 @@ supported and causes configuration validation to fail. Pass ``--task= --help`` to a training script to see all available preset names grouped by selector type at the command line, or run -``./isaaclab.sh -p scripts/environments/list_envs.py --show_presets`` +``uv run python scripts/environments/list_envs.py --show_presets`` to list presets for every registered environment. See the :doc:`Hydra preset system documentation ` diff --git a/docs/source/overview/imitation-learning/augmented_imitation.rst b/docs/source/overview/imitation-learning/augmented_imitation.rst index 363f655c9aab..8ebba1e0d95c 100644 --- a/docs/source/overview/imitation-learning/augmented_imitation.rst +++ b/docs/source/overview/imitation-learning/augmented_imitation.rst @@ -311,8 +311,11 @@ To install the robomimic framework, use the following commands: # install the dependencies sudo apt install cmake build-essential - # install python module (for robomimic) - ./isaaclab.sh -i robomimic + # resolve and verify Robomimic in the uv-managed environment + uv run --extra mimic python -c "import robomimic" + +For a legacy environment, install the same dependencies with +``./isaaclab.sh -i mimic``. Training an agent ^^^^^^^^^^^^^^^^^ @@ -325,7 +328,7 @@ Using the generated data, we can now train a visuomotor BC agent for ``IsaacCont .. code:: bash - uv run python scripts/imitation_learning/robomimic/train.py \ + uv run --extra mimic python scripts/imitation_learning/robomimic/train.py \ --task IsaacContrib-Stack-Cube-Franka-IK-Rel-Visuomotor-Cosmos --algo bc \ --dataset ./datasets/mimic_cosmos_dataset.hdf5 \ --name bc_rnn_image_franka_stack_mimic_cosmos @@ -417,7 +420,7 @@ Example usage for the cube stacking task: .. code:: bash - uv run python scripts/imitation_learning/robomimic/robust_eval.py \ + uv run --extra mimic python scripts/imitation_learning/robomimic/robust_eval.py \ --task IsaacContrib-Stack-Cube-Franka-IK-Rel-Visuomotor-Cosmos \ --input_dir logs/robomimic/IsaacContrib-Stack-Cube-Franka-IK-Rel-Visuomotor-Cosmos/bc_rnn_image_franka_stack_mimic_cosmos/*/models \ --log_dir robust_results/bc_rnn_image_franka_stack_mimic_cosmos \ diff --git a/docs/source/overview/imitation-learning/teleop_imitation.rst b/docs/source/overview/imitation-learning/teleop_imitation.rst index 958f38f15f19..0011baecbfc3 100644 --- a/docs/source/overview/imitation-learning/teleop_imitation.rst +++ b/docs/source/overview/imitation-learning/teleop_imitation.rst @@ -459,9 +459,11 @@ Install the Robomimic framework using the following command: # install the dependencies sudo apt install cmake build-essential - # install python module (for robomimic) - ./isaaclab.sh -i robomimic + # resolve and verify Robomimic in the uv-managed environment + uv run --extra mimic python -c "import robomimic" +For a legacy environment, install the same dependencies with +``./isaaclab.sh -i mimic``. Train an Agent @@ -479,7 +481,7 @@ Using the Isaac Lab Mimic generated data we can now train a state-based BC RNN a .. code:: bash - uv run python scripts/imitation_learning/robomimic/train.py \ + uv run --extra mimic python scripts/imitation_learning/robomimic/train.py \ --task IsaacContrib-Stack-Cube-Franka-IK-Rel \ --algo bc \ --dataset ./datasets/generated_dataset.hdf5 @@ -489,7 +491,7 @@ Using the Isaac Lab Mimic generated data we can now train a state-based BC RNN a .. code:: bash - uv run python scripts/imitation_learning/robomimic/train.py \ + uv run --extra mimic python scripts/imitation_learning/robomimic/train.py \ --task IsaacContrib-Stack-Cube-Franka-IK-Rel-Visuomotor \ --algo bc \ --dataset ./datasets/generated_dataset.hdf5 @@ -512,7 +514,7 @@ Run the trained policy to visualize the results: .. code:: bash - uv run python scripts/imitation_learning/robomimic/play.py \ + uv run --extra mimic python scripts/imitation_learning/robomimic/play.py \ --task IsaacContrib-Stack-Cube-Franka-IK-Rel \ --viz kit \ --num_rollouts 50 \ @@ -523,7 +525,7 @@ Run the trained policy to visualize the results: .. code:: bash - uv run python scripts/imitation_learning/robomimic/play.py \ + uv run --extra mimic python scripts/imitation_learning/robomimic/play.py \ --task IsaacContrib-Stack-Cube-Franka-IK-Rel-Visuomotor \ --viz kit \ --num_rollouts 50 \ diff --git a/docs/source/overview/reinforcement-learning/rl_existing_scripts.rst b/docs/source/overview/reinforcement-learning/rl_existing_scripts.rst index d3b99cb3d186..5d6487736e48 100644 --- a/docs/source/overview/reinforcement-learning/rl_existing_scripts.rst +++ b/docs/source/overview/reinforcement-learning/rl_existing_scripts.rst @@ -155,6 +155,13 @@ The contributed Cartpole showcase tasks likewise pair each non-default configs, such as RSL-RL symmetry or recurrent policies and skrl's AMP/IPPO/MAPPO algorithms, are algorithm choices rather than preset requirements. +.. note:: + + RSL-RL is included in the default uv environment. RL-Games, SKRL, and + Stable-Baselines3 are optional, so their uv commands below select the + corresponding extra. RLinf commands assume the dedicated installation in + :ref:`rlinf-post-training` has been completed. + RL-Games -------- @@ -180,23 +187,21 @@ RL-Games .. code:: bash - # install python module (for rl-games) - ./isaaclab.sh -i rl_games # run command for training - uv run isaaclab train --rl_library rl_games --task Isaac-Ant + uv run --extra rl-games isaaclab train --rl_library rl_games --task Isaac-Ant # run command for training with Newton backend - uv run isaaclab train --rl_library rl_games --task Isaac-Ant physics=newton_mjwarp + uv run --extra rl-games isaaclab train --rl_library rl_games --task Isaac-Ant physics=newton_mjwarp # run command for playing with 32 environments - uv run isaaclab play --rl_library rl_games --task Isaac-Ant --num_envs 32 --checkpoint /PATH/TO/model.pth + uv run --extra rl-games isaaclab play --rl_library rl_games --task Isaac-Ant --num_envs 32 --checkpoint /PATH/TO/model.pth # run command for recording video of a trained agent - uv run --extra video isaaclab play --rl_library rl_games --task Isaac-Ant --video --video_length 200 + uv run --extra rl-games --extra video isaaclab play --rl_library rl_games --task Isaac-Ant --video --video_length 200 .. tab-item:: isaaclab.sh / isaaclab.bat .. code:: bash # install python module (for rl-games) - ./isaaclab.sh -i rl_games + ./isaaclab.sh -i 'rl[rl-games]' # run command for training ./isaaclab.sh train --rl_library rl_games --task Isaac-Ant # run command for training with Newton backend @@ -212,7 +217,7 @@ RL-Games .. code:: batch :: install python module (for rl-games) - isaaclab.bat -i rl_games + isaaclab.bat -i "rl[rl-games]" :: run command for training isaaclab.bat train --rl_library rl_games --task Isaac-Ant :: run command for training with Newton backend @@ -240,8 +245,6 @@ RSL-RL .. code:: bash - # install python module (for rsl-rl) - ./isaaclab.sh -i rsl_rl # run command for training uv run isaaclab train --rl_library rsl_rl --task Isaac-Reach-Franka # run command for training with Newton backend @@ -256,7 +259,7 @@ RSL-RL .. code:: bash # install python module (for rsl-rl) - ./isaaclab.sh -i rsl_rl + ./isaaclab.sh -i 'rl[rsl-rl]' # run command for training ./isaaclab.sh train --rl_library rsl_rl --task Isaac-Reach-Franka # run command for training with Newton backend @@ -272,7 +275,7 @@ RSL-RL .. code:: batch :: install python module (for rsl-rl) - isaaclab.bat -i rsl_rl + isaaclab.bat -i "rl[rsl-rl]" :: run command for training isaaclab.bat train --rl_library rsl_rl --task Isaac-Reach-Franka :: run command for training with Newton backend @@ -297,8 +300,6 @@ RSL-RL .. code:: bash - # install python module (for rsl-rl) - ./isaaclab.sh -i rsl_rl # run command for rl training of the teacher agent uv run isaaclab train --rl_library rsl_rl --task Isaac-Velocity-Flat-AnymalD # run command for rl training of the teacher agent with Newton backend @@ -313,7 +314,7 @@ RSL-RL .. code:: bash # install python module (for rsl-rl) - ./isaaclab.sh -i rsl_rl + ./isaaclab.sh -i 'rl[rsl-rl]' # run command for rl training of the teacher agent ./isaaclab.sh train --rl_library rsl_rl --task Isaac-Velocity-Flat-AnymalD # run command for rl training of the teacher agent with Newton backend @@ -329,7 +330,7 @@ RSL-RL .. code:: batch :: install python module (for rsl-rl) - isaaclab.bat -i rsl_rl + isaaclab.bat -i "rl[rsl-rl]" :: run command for rl training of the teacher agent isaaclab.bat train --rl_library rsl_rl --task Isaac-Velocity-Flat-AnymalD :: run command for rl training of the teacher agent with Newton backend @@ -361,23 +362,21 @@ SKRL .. code:: bash - # install python module (for skrl) - ./isaaclab.sh -i skrl # run command for training - uv run isaaclab train --rl_library skrl --task Isaac-Reach-Franka + uv run --extra skrl isaaclab train --rl_library skrl --task Isaac-Reach-Franka # run command for training with Newton backend - uv run isaaclab train --rl_library skrl --task Isaac-Reach-Franka physics=newton_mjwarp + uv run --extra skrl isaaclab train --rl_library skrl --task Isaac-Reach-Franka physics=newton_mjwarp # run command for playing with 32 environments - uv run isaaclab play --rl_library skrl --task Isaac-Reach-Franka --num_envs 32 --checkpoint /PATH/TO/model.pt + uv run --extra skrl isaaclab play --rl_library skrl --task Isaac-Reach-Franka --num_envs 32 --checkpoint /PATH/TO/model.pt # run command for recording video of a trained agent - uv run --extra video isaaclab play --rl_library skrl --task Isaac-Reach-Franka --video --video_length 200 + uv run --extra skrl --extra video isaaclab play --rl_library skrl --task Isaac-Reach-Franka --video --video_length 200 .. tab-item:: isaaclab.sh / isaaclab.bat .. code:: bash # install python module (for skrl) - ./isaaclab.sh -i skrl + ./isaaclab.sh -i 'rl[skrl]' # run command for training ./isaaclab.sh train --rl_library skrl --task Isaac-Reach-Franka # run command for training with Newton backend @@ -393,7 +392,7 @@ SKRL .. code:: batch :: install python module (for skrl) - isaaclab.bat -i skrl + isaaclab.bat -i "rl[skrl]" :: run command for training isaaclab.bat train --rl_library skrl --task Isaac-Reach-Franka :: run command for training with Newton backend @@ -432,7 +431,7 @@ SKRL .. code:: bash # install python module (for skrl) - ./isaaclab.sh -i skrl + uv run --extra skrl python -c "import skrl" # install JAX for CUDA 12 uv pip install -U "jax[cuda12]" # install skrl dependencies for JAX @@ -443,7 +442,7 @@ SKRL .. code:: bash # install python module (for skrl) - ./isaaclab.sh -i skrl + ./isaaclab.sh -i 'rl[skrl]' # install JAX for CUDA 12 ./isaaclab.sh -p -m pip install -U "jax[cuda12]" # install skrl dependencies for JAX @@ -459,7 +458,7 @@ SKRL .. code:: bash # install python module (for skrl) - ./isaaclab.sh -i skrl + uv run --extra skrl python -c "import skrl" # install JAX for CUDA 13 uv pip install -U "jax[cuda13]" # install skrl dependencies for JAX @@ -470,7 +469,7 @@ SKRL .. code:: bash # install python module (for skrl) - ./isaaclab.sh -i skrl + ./isaaclab.sh -i 'rl[skrl]' # install JAX for CUDA 13 ./isaaclab.sh -p -m pip install -U "jax[cuda13]" # install skrl dependencies for JAX @@ -483,13 +482,13 @@ SKRL .. code:: bash # run command for training - uv run isaaclab train --rl_library skrl --task Isaac-Reach-Franka --ml_framework jax + uv run --extra skrl isaaclab train --rl_library skrl --task Isaac-Reach-Franka --ml_framework jax # run command for training with Newton backend - uv run isaaclab train --rl_library skrl --task Isaac-Reach-Franka --ml_framework jax presets=newton_mjwarp + uv run --extra skrl isaaclab train --rl_library skrl --task Isaac-Reach-Franka --ml_framework jax presets=newton_mjwarp # run command for playing with 32 environments - uv run isaaclab play --rl_library skrl --task Isaac-Reach-Franka --num_envs 32 --ml_framework jax --checkpoint /PATH/TO/model.pt + uv run --extra skrl isaaclab play --rl_library skrl --task Isaac-Reach-Franka --num_envs 32 --ml_framework jax --checkpoint /PATH/TO/model.pt # run command for recording video of a trained agent - uv run --extra video isaaclab play --rl_library skrl --task Isaac-Reach-Franka --ml_framework jax --video --video_length 200 + uv run --extra skrl --extra video isaaclab play --rl_library skrl --task Isaac-Reach-Franka --ml_framework jax --video --video_length 200 .. tab-item:: isaaclab.sh / isaaclab.bat @@ -518,19 +517,17 @@ SKRL .. code:: bash - # install python module (for skrl) - ./isaaclab.sh -i skrl # run command for training with the MAPPO algorithm (IPPO is also supported) - uv run isaaclab train --rl_library skrl --task Isaac-Shadow-Handover-Direct --algorithm MAPPO + uv run --extra skrl isaaclab train --rl_library skrl --task Isaac-Shadow-Handover-Direct --algorithm MAPPO # run command for playing with 32 environments with the MAPPO algorithm (IPPO is also supported) - uv run isaaclab play --rl_library skrl --task Isaac-Shadow-Handover-Direct --num_envs 32 --algorithm MAPPO --checkpoint /PATH/TO/model.pt + uv run --extra skrl isaaclab play --rl_library skrl --task Isaac-Shadow-Handover-Direct --num_envs 32 --algorithm MAPPO --checkpoint /PATH/TO/model.pt .. tab-item:: isaaclab.sh / isaaclab.bat .. code:: bash # install python module (for skrl) - ./isaaclab.sh -i skrl + ./isaaclab.sh -i 'rl[skrl]' # run command for training with the MAPPO algorithm (IPPO is also supported) ./isaaclab.sh train --rl_library skrl --task Isaac-Shadow-Handover-Direct --algorithm MAPPO # run command for playing with 32 environments with the MAPPO algorithm (IPPO is also supported) @@ -542,7 +539,7 @@ SKRL .. code:: batch :: install python module (for skrl) - isaaclab.bat -i skrl + isaaclab.bat -i "rl[skrl]" :: run command for training with the MAPPO algorithm (IPPO is also supported) isaaclab.bat train --rl_library skrl --task Isaac-Shadow-Handover-Direct --algorithm MAPPO :: run command for playing with 32 environments with the MAPPO algorithm (IPPO is also supported) @@ -567,23 +564,21 @@ Stable-Baselines3 .. code:: bash - # install python module (for stable-baselines3) - ./isaaclab.sh -i sb3 # run command for training - uv run isaaclab train --rl_library sb3 --task IsaacContrib-Velocity-Flat-UnitreeA1 + uv run --extra sb3 isaaclab train --rl_library sb3 --task IsaacContrib-Velocity-Flat-UnitreeA1 # run command for training with Newton backend - uv run isaaclab train --rl_library sb3 --task IsaacContrib-Velocity-Flat-UnitreeA1 physics=newton_mjwarp + uv run --extra sb3 isaaclab train --rl_library sb3 --task IsaacContrib-Velocity-Flat-UnitreeA1 physics=newton_mjwarp # run command for playing with 32 environments - uv run isaaclab play --rl_library sb3 --task IsaacContrib-Velocity-Flat-UnitreeA1 --num_envs 32 --checkpoint /PATH/TO/model.zip + uv run --extra sb3 isaaclab play --rl_library sb3 --task IsaacContrib-Velocity-Flat-UnitreeA1 --num_envs 32 --checkpoint /PATH/TO/model.zip # run command for recording video of a trained agent - uv run --extra video isaaclab play --rl_library sb3 --task IsaacContrib-Velocity-Flat-UnitreeA1 --video --video_length 200 + uv run --extra sb3 --extra video isaaclab play --rl_library sb3 --task IsaacContrib-Velocity-Flat-UnitreeA1 --video --video_length 200 .. tab-item:: isaaclab.sh / isaaclab.bat .. code:: bash # install python module (for stable-baselines3) - ./isaaclab.sh -i sb3 + ./isaaclab.sh -i 'rl[sb3]' # run command for training ./isaaclab.sh train --rl_library sb3 --task IsaacContrib-Velocity-Flat-UnitreeA1 # run command for training with Newton backend @@ -599,7 +594,7 @@ Stable-Baselines3 .. code:: batch :: install python module (for stable-baselines3) - isaaclab.bat -i sb3 + isaaclab.bat -i "rl[sb3]" :: run command for training isaaclab.bat train --rl_library sb3 --task IsaacContrib-Velocity-Flat-UnitreeA1 :: run command for training with Newton backend diff --git a/docs/source/refs/troubleshooting.rst b/docs/source/refs/troubleshooting.rst index 6b466b0b0c2a..b58f35c42e97 100644 --- a/docs/source/refs/troubleshooting.rst +++ b/docs/source/refs/troubleshooting.rst @@ -93,8 +93,10 @@ Isaac Sim version before installing Isaac Lab. ``ModuleNotFoundError: No module named 'rsl_rl'`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Include the RL framework: ``./isaaclab.sh -i rsl_rl``, or use -``./isaaclab.sh -i`` to install all frameworks. +RSL-RL is included in the default uv environment. Run ``uv sync`` and retry the +command with ``uv run``. For the legacy installer, use +``./isaaclab.sh -i 'rl[rsl-rl]'`` or ``./isaaclab.sh -i`` to install all +frameworks. Crash in ``libusd_tf`` / USD Symbol Collision with OVRTX ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/source/setup/quickstart_details.rst b/docs/source/setup/quickstart_details.rst index ad4cc9663d3f..cfc7f59156df 100644 --- a/docs/source/setup/quickstart_details.rst +++ b/docs/source/setup/quickstart_details.rst @@ -32,6 +32,11 @@ options (observation modes, camera configs, etc.). They fold into Hydra override .. code-block:: bash + # Default: concrete Isaac Sim PhysX + uv run isaaclab train --rl_library rsl_rl \ + --task=Isaac-Cartpole-Direct \ + --num_envs=4096 + # Kit-less: Newton MJWarp + Newton visualizer uv run isaaclab train --rl_library rsl_rl \ --task=Isaac-Cartpole-Direct \ @@ -80,18 +85,18 @@ Available Presets **Physics backends** (``physics=NAME``): +- ``isaacsim_physx`` — concrete PhysX via Isaac Sim / Kit; this is the default when an environment would otherwise default to automatic PhysX selection - ``physx`` — automatic PhysX-family selection: Isaac Sim PhysX when Kit is required, otherwise OvPhysX when the task supports it; tasks without OvPhysX support fall back to Isaac Sim PhysX -- ``isaacsim_physx`` — force PhysX via Isaac Sim / Kit - ``newton_mjwarp`` — Newton with the MuJoCo-Warp solver - ``newton_kamino`` — Newton with the Kamino solver (beta, limited tasks) - ``ovphysx`` — OV PhysX (kit-less; incompatible with ``--visualizer kit``) **Renderer backends** (``renderer=NAME``): -- ``isaacsim_rtx`` — Isaac Sim RTX (default with Isaac Sim) +- ``isaacsim_rtx`` — concrete Isaac Sim RTX; this is the default for cameras that use the multi-backend renderer config - ``newton_renderer`` — Newton Warp renderer - ``ovrtx`` — OV RTX renderer (kit-less) -- ``rtx`` — Automatic RTX renderer selection +- ``rtx`` — automatic RTX renderer selection Automatic RTX selection is available only when the camera exposes the renderer choices with :class:`~isaaclab_tasks.utils.presets.MultiBackendRendererCfg`: diff --git a/skills/user/use-presets/examples.md b/skills/user/use-presets/examples.md index 6e584647aafa..825683a45a74 100644 --- a/skills/user/use-presets/examples.md +++ b/skills/user/use-presets/examples.md @@ -26,19 +26,25 @@ This is enough when the task only supports PhysX and there are no renderer, sens ## Physics Presets Use `PresetCfg` when the same task supports multiple physics backends. +The example below applies when the task's established default is PhysX. Preserve +an explicit Newton or other backend default when adding more variants. ```python +from isaaclab.physics import PhysxAutoCfg from isaaclab.sim import SimulationCfg from isaaclab.utils.configclass import configclass from isaaclab_newton.physics import MJWarpSolverCfg, NewtonCfg +from isaaclab_ovphysx.physics import OvPhysxCfg from isaaclab_physx.physics import PhysxCfg from isaaclab_tasks.utils import PresetCfg @configclass class PhysicsCfg(PresetCfg): - default = PhysxCfg(gpu_max_rigid_patch_count=10 * 2**15) - physx = default + isaacsim_physx = PhysxCfg(gpu_max_rigid_patch_count=10 * 2**15) + ovphysx = OvPhysxCfg() + physx = PhysxAutoCfg(isaacsim_physx=isaacsim_physx, ovphysx=ovphysx) + default = isaacsim_physx newton_mjwarp = NewtonCfg( solver_cfg=MJWarpSolverCfg(njmax=120, nconmax=15), num_substeps=1, @@ -53,6 +59,7 @@ class MyMultiBackendEnvCfg: Command examples: ```bash +uv run python scripts/environments/random_agent.py --task Isaac-Ant --num_envs 4 uv run python scripts/environments/random_agent.py --task Isaac-Ant --num_envs 4 physics=physx uv run python scripts/environments/random_agent.py --task Isaac-Ant --num_envs 4 physics=newton_mjwarp ``` @@ -90,7 +97,7 @@ uv run python scripts/environments/random_agent.py --task Isaac-Cartpole-Camera- For camera tasks that expose physics, renderer, and data-type variants, combine selectors: ```bash -uv run python scripts/environments/random_agent.py --task Isaac-Cartpole-Camera-Direct --num_envs 4 physics=physx renderer=isaacsim_rtx_renderer presets=rgb +uv run python scripts/environments/random_agent.py --task Isaac-Cartpole-Camera-Direct --num_envs 4 physics=isaacsim_physx renderer=isaacsim_rtx presets=rgb uv run python scripts/environments/random_agent.py --task Isaac-Cartpole-Camera-Direct --num_envs 4 physics=newton_mjwarp renderer=newton_renderer presets=depth ``` diff --git a/skills/user/use-presets/reference.md b/skills/user/use-presets/reference.md index 1ec8871dcd19..feac0cf3bcfd 100644 --- a/skills/user/use-presets/reference.md +++ b/skills/user/use-presets/reference.md @@ -49,9 +49,11 @@ From the Isaac Lab checkout, use `uv run python scripts/environments/list_envs.p Import paths: ```python +from isaaclab.physics import PhysxAutoCfg from isaaclab.sim import SimulationCfg from isaaclab.utils.configclass import configclass from isaaclab_newton.physics import MJWarpSolverCfg, NewtonCfg +from isaaclab_ovphysx.physics import OvPhysxCfg from isaaclab_physx.physics import PhysxCfg from isaaclab_tasks.utils import PresetCfg ``` @@ -61,8 +63,10 @@ Pattern: ```python @configclass class PhysicsCfg(PresetCfg): - default = PhysxCfg() - physx = default + isaacsim_physx = PhysxCfg() + ovphysx = OvPhysxCfg() + physx = PhysxAutoCfg(isaacsim_physx=isaacsim_physx, ovphysx=ovphysx) + default = isaacsim_physx newton_mjwarp = NewtonCfg(solver_cfg=MJWarpSolverCfg()) @@ -73,11 +77,13 @@ class MyEnvCfg: For multi-backend tasks, keep backend-specific solver values in the preset wrapper. Do not branch on backend names inside step, reward, or reset logic unless behavior truly cannot be represented as config. +When a task currently defaults to `PhysxAutoCfg`, replace that default with the concrete `isaacsim_physx` variant. Preserve explicit Newton and other backend defaults. Keep `physx` as the explicit automatic selector through `PhysxAutoCfg`, matching the renderer convention where `isaacsim_rtx` is concrete and `rtx` is automatic. + For schema presets, import universal fragments and base cfgs from `isaaclab.sim.schemas`, PhysX-specific cfgs from `isaaclab_physx.sim.schemas`, and Newton or MuJoCo cfgs from `isaaclab_newton.sim.schemas`. ## Validation Checklist -- The `default` variant is valid. +- A default that previously aliased `PhysxAutoCfg` now aliases `isaacsim_physx`; explicit backend defaults remain unchanged. - Every named variant is tested. - Selector names match existing conventions such as `physx`, `newton_mjwarp`, `newton_kamino`, `ovphysx`, `rgb`, and `depth`. - A small random-agent rollout succeeds for each variant. diff --git a/source/isaaclab/changelog.d/fix-install-hints.rst b/source/isaaclab/changelog.d/fix-install-hints.rst new file mode 100644 index 000000000000..f090ccdf20d7 --- /dev/null +++ b/source/isaaclab/changelog.d/fix-install-hints.rst @@ -0,0 +1,4 @@ +Fixed +^^^^^ + +* Fixed visualizer runtime errors to recommend valid uv-managed commands. diff --git a/source/isaaclab/isaaclab/sim/simulation_context.py b/source/isaaclab/isaaclab/sim/simulation_context.py index fe89d8d7ff14..a73558f4a29d 100644 --- a/source/isaaclab/isaaclab/sim/simulation_context.py +++ b/source/isaaclab/isaaclab/sim/simulation_context.py @@ -33,6 +33,7 @@ from isaaclab.utils.string import clear_resolve_matching_names_cache from isaaclab.utils.version import has_kit from isaaclab.visualizers.base_visualizer import BaseVisualizer +from isaaclab.visualizers.visualizer_cfg import _get_visualizer_install_hint if TYPE_CHECKING: from pxr import Usd @@ -392,10 +393,9 @@ def _create_default_visualizer_configs(self, requested_visualizers: list[str]) - # isaaclab_visualizers is optional; log once at warning level if "isaaclab_visualizers" in str(exc): logger.warning( - "[SimulationContext] Visualizer '%s' skipped: isaaclab_visualizers is not installed. " - "Install with: pip install isaaclab_visualizers[%s]", - viz_type, + "[SimulationContext] Visualizer '%s' skipped: isaaclab_visualizers is not installed. %s", viz_type, + _get_visualizer_install_hint(viz_type), ) else: logger.error( @@ -509,11 +509,15 @@ def _resolve_visualizer_cfgs(self) -> list[Any]: resolved_types = {getattr(cfg, "visualizer_type", None) for cfg in resolved} missing = [t for t in cli_requested if t not in resolved_types] if missing: + install_hints = " ".join( + _get_visualizer_install_hint(visualizer_type) + for visualizer_type in missing + if visualizer_type in _VISUALIZER_TYPES + ) raise RuntimeError( f"Explicitly requested visualizer(s) {missing} could not be configured. " f"Valid types: {', '.join(repr(t) for t in _VISUALIZER_TYPES)}. " - "Ensure the required package is installed " - "(e.g., pip install isaaclab_visualizers[])." + f"{install_hints}" ) # XR auto-start: auto-inject a KitVisualizer when XR is active and no @@ -533,9 +537,9 @@ def _resolve_visualizer_cfgs(self) -> list[Any]: logger.info("[SimulationContext] Auto-injecting KitVisualizer for XR app-update pumping.") except (ImportError, ModuleNotFoundError, AttributeError) as exc: logger.warning( - "[SimulationContext] XR mode could not auto-inject a KitVisualizer: %s. " - "Install isaaclab_visualizers[kit] or pass --visualizer kit.", + "[SimulationContext] XR mode could not auto-inject a KitVisualizer: %s. %s", exc, + _get_visualizer_install_hint("kit"), ) return resolved diff --git a/source/isaaclab/isaaclab/visualizers/visualizer_cfg.py b/source/isaaclab/isaaclab/visualizers/visualizer_cfg.py index 76d0ea70df50..c63d1cfdfdc7 100644 --- a/source/isaaclab/isaaclab/visualizers/visualizer_cfg.py +++ b/source/isaaclab/isaaclab/visualizers/visualizer_cfg.py @@ -22,6 +22,14 @@ } +def _get_visualizer_install_hint(visualizer_type: str) -> str: + """Return the uv command needed to run a visualizer backend.""" + extra = _VISUALIZER_EXTRAS.get(visualizer_type) + if extra is None: + return "Run your command with: uv run ." + return f"Run your command with: uv run --extra {extra} ." + + @configclass class VisualizerCfg: """Base configuration for all visualizer backends. @@ -141,13 +149,8 @@ def create_visualizer(self) -> BaseVisualizer: return Visualizer(self) except (ValueError, ImportError, ModuleNotFoundError) as exc: if self.visualizer_type in ("newton", "rerun", "viser", "kit"): - extra = _VISUALIZER_EXTRAS.get(self.visualizer_type) - if extra is None: - install_hint = "Synchronize the project environment with: uv sync." - else: - install_hint = f"Run your command with: uv run --extra {extra} ." raise ImportError( f"Could not import visualizer '{self.visualizer_type}' from isaaclab_visualizers. " - f"{install_hint}\nOriginal error: {exc}" + f"{_get_visualizer_install_hint(self.visualizer_type)}\nOriginal error: {exc}" ) from exc raise diff --git a/source/isaaclab_ov/changelog.d/fix-install-hints.rst b/source/isaaclab_ov/changelog.d/fix-install-hints.rst new file mode 100644 index 000000000000..8aa48738e655 --- /dev/null +++ b/source/isaaclab_ov/changelog.d/fix-install-hints.rst @@ -0,0 +1,5 @@ +Fixed +^^^^^ + +* Fixed OVRTX missing-runtime errors to recommend supported uv-managed and + direct-wheel commands. diff --git a/source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_renderer.py b/source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_renderer.py index 6af04ee8359d..14de1a819a7a 100644 --- a/source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_renderer.py +++ b/source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_renderer.py @@ -70,7 +70,8 @@ raise ModuleNotFoundError( "The OVRTX renderer requires the optional 'ovrtx' runtime wheel, which is not installed. " "Run your command with: uv run --extra ovrtx " - "(or, manually: pip install --extra-index-url https://pypi.nvidia.com -e 'source/isaaclab_ov[ovrtx]')." + "(or, manually: python -m pip install --extra-index-url https://pypi.nvidia.com " + "'ovrtx>=0.4.0,<0.5.0')." ) from exc from isaaclab.cloner.clone_plan import ClonePlan @@ -178,7 +179,9 @@ def ovrtx_use_ovstage_enabled() -> bool: if value == "1" and not _OVSTAGE_AVAILABLE: raise RuntimeError( f"`{_USE_OVSTAGE_ENV}=1` requests the ovstage scene-ownership path, but the 'ovstage' " - "package is not installed. Install it with: ./isaaclab.sh -i 'ov[ovstage]' " + "package is not installed. Run your command with: uv run --extra ovrtx " + "(or, manually: python -m pip install --extra-index-url https://pypi.nvidia.com " + "'ovstage>=0.1.0,<0.2.0')." ) return value == "1" diff --git a/source/isaaclab_ov/test/test_ovrtx_renderer_contract.py b/source/isaaclab_ov/test/test_ovrtx_renderer_contract.py index 7ccb5402fc54..ac6b64313607 100644 --- a/source/isaaclab_ov/test/test_ovrtx_renderer_contract.py +++ b/source/isaaclab_ov/test/test_ovrtx_renderer_contract.py @@ -353,7 +353,7 @@ def test_ovrtx_use_ovstage_raises_when_requested_but_unavailable(monkeypatch): monkeypatch.setenv("ISAAC_LAB_OVRTX_USE_OVSTAGE", "1") monkeypatch.setattr(ovrtx_renderer_module, "_OVSTAGE_AVAILABLE", False) - with pytest.raises(RuntimeError, match="ov\\[ovstage\\]"): + with pytest.raises(RuntimeError, match="uv run --extra ovrtx"): ovrtx_use_ovstage_enabled() diff --git a/source/isaaclab_ovphysx/changelog.d/fix-ovphysx-install-hint.rst b/source/isaaclab_ovphysx/changelog.d/fix-ovphysx-install-hint.rst new file mode 100644 index 000000000000..22809e04bb69 --- /dev/null +++ b/source/isaaclab_ovphysx/changelog.d/fix-ovphysx-install-hint.rst @@ -0,0 +1,5 @@ +Fixed +^^^^^ + +* Fixed the OvPhysX missing-runtime error to recommend installing the supported + ``ovphysx`` wheel instead of a nonexistent source-package extra. diff --git a/source/isaaclab_ovphysx/isaaclab_ovphysx/_runtime.py b/source/isaaclab_ovphysx/isaaclab_ovphysx/_runtime.py index 38bbff1015a1..acbd236b760d 100644 --- a/source/isaaclab_ovphysx/isaaclab_ovphysx/_runtime.py +++ b/source/isaaclab_ovphysx/isaaclab_ovphysx/_runtime.py @@ -13,8 +13,7 @@ _OVPHYSX_INSTALL_MESSAGE = ( "The OvPhysX backend requires the optional 'ovphysx' runtime wheel, which is not installed. " "Run your command with: uv run --extra ovphysx " - "(or, manually: pip install --extra-index-url https://pypi.nvidia.com " - "-e 'source/isaaclab_ovphysx[ovphysx]')." + "(or, manually: python -m pip install --extra-index-url https://pypi.nvidia.com ovphysx)." ) diff --git a/source/isaaclab_ovphysx/test/assets/test_rigid_object.py b/source/isaaclab_ovphysx/test/assets/test_rigid_object.py index 7e3ef125d625..3f93e3f5808b 100644 --- a/source/isaaclab_ovphysx/test/assets/test_rigid_object.py +++ b/source/isaaclab_ovphysx/test/assets/test_rigid_object.py @@ -1051,10 +1051,12 @@ def test_body_root_state_properties(num_cubes, device, with_offset): # center of mass vel will be constant (i.e. spinning around com) torch.testing.assert_close(torch.zeros_like(root_com_vel_w[..., :3]), root_com_vel_w[..., :3]) torch.testing.assert_close(torch.zeros_like(body_com_vel_w[..., :3]), body_com_vel_w[..., :3]) - # link frame will be moving, and should be equal to input angular velocity cross offset + # link frame will be moving, and should account for the reported COM velocity and offset lin_vel_rel_root_gt = quat_apply_inverse(root_link_pose_w[..., 3:], root_link_vel_w[..., :3]) lin_vel_rel_body_gt = quat_apply_inverse(body_link_pose_w[..., 3:], body_link_vel_w[..., :3]) - lin_vel_rel_gt = torch.linalg.cross(spin_twist.repeat(num_cubes, 1)[..., 3:], -offset) + com_lin_vel_rel_gt = quat_apply_inverse(root_link_pose_w[..., 3:], root_com_vel_w[..., :3]) + com_ang_vel_rel_gt = quat_apply_inverse(root_link_pose_w[..., 3:], root_com_vel_w[..., 3:]) + lin_vel_rel_gt = com_lin_vel_rel_gt + torch.linalg.cross(com_ang_vel_rel_gt, -offset) torch.testing.assert_close(lin_vel_rel_gt, lin_vel_rel_root_gt, atol=1e-4, rtol=1e-4) torch.testing.assert_close(lin_vel_rel_gt, lin_vel_rel_body_gt.squeeze(-2), atol=1e-4, rtol=1e-4) diff --git a/source/isaaclab_tasks/changelog.d/default-isaacsim-physx.major.rst b/source/isaaclab_tasks/changelog.d/default-isaacsim-physx.major.rst new file mode 100644 index 000000000000..4931a1e698fc --- /dev/null +++ b/source/isaaclab_tasks/changelog.d/default-isaacsim-physx.major.rst @@ -0,0 +1,8 @@ +Changed +^^^^^^^ + +* **Breaking:** Changed environments whose default physics preset was automatic + ``physx`` to use concrete ``isaacsim_physx``. Environments with explicit + backend defaults, including Newton, remain unchanged. Select + ``physics=physx`` to retain automatic PhysX-family resolution between Isaac + Sim PhysX and OvPhysX. diff --git a/source/isaaclab_tasks/isaaclab_tasks/contrib/place/config/agibot/place_toy2box_rmp_rel_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/contrib/place/config/agibot/place_toy2box_rmp_rel_env_cfg.py index 24eae22f7071..4d82e25ea065 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/contrib/place/config/agibot/place_toy2box_rmp_rel_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/contrib/place/config/agibot/place_toy2box_rmp_rel_env_cfg.py @@ -204,7 +204,7 @@ class PhysicsCfg(PresetCfg): debug_mode=False, ) physx = PhysxAutoCfg(isaacsim_physx=isaacsim_physx) - default = physx + default = isaacsim_physx # Robot USD assets whose gripper revolute joints are authored with reversed @@ -232,7 +232,7 @@ def raise_if_reversed_joints_on_newton(env_cfg) -> None: raise ValueError( "This task's robot has gripper joints authored with reversed body0/body1 ordering, " "which the Newton backend's USD parser does not support ('Reversed joints are not " - "supported'). Re-run this task with physics=physx (the default)." + "supported'). Re-run this task with physics=isaacsim_physx (the default)." ) diff --git a/source/isaaclab_tasks/isaaclab_tasks/contrib/stack/config/so101/stack_joint_pos_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/contrib/stack/config/so101/stack_joint_pos_env_cfg.py index 9105def1b2ed..1a6d241d9ef1 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/contrib/stack/config/so101/stack_joint_pos_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/contrib/stack/config/so101/stack_joint_pos_env_cfg.py @@ -64,7 +64,7 @@ class SO101StackPhysicsCfg(PhysicsCfg): isaacsim_physx = PhysicsCfg().isaacsim_physx.replace(solve_articulation_contact_last=True) physx = PhysxAutoCfg(isaacsim_physx=isaacsim_physx) - default = physx + default = isaacsim_physx @configclass diff --git a/source/isaaclab_tasks/isaaclab_tasks/contrib/stack/stack_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/contrib/stack/stack_env_cfg.py index b9303ead168e..e9a7c1168d51 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/contrib/stack/stack_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/contrib/stack/stack_env_cfg.py @@ -318,7 +318,7 @@ class PhysicsCfg(PresetCfg): debug_mode=False, ) physx = PhysxAutoCfg(isaacsim_physx=isaacsim_physx) - default = physx + default = isaacsim_physx def raise_if_surface_gripper_on_newton(env_cfg) -> None: @@ -336,7 +336,7 @@ def raise_if_surface_gripper_on_newton(env_cfg) -> None: if isinstance(env_cfg.sim.physics, NewtonCfg): raise ValueError( "Surface grippers are only supported by the PhysX backend; the Newton backend has no " - "surface-gripper implementation. Re-run this task with physics=physx (the default)." + "surface-gripper implementation. Re-run this task with physics=isaacsim_physx (the default)." ) diff --git a/source/isaaclab_tasks/isaaclab_tasks/contrib/velocity/config/a1/flat_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/contrib/velocity/config/a1/flat_env_cfg.py index 9bcb41b9144b..523117be4cdf 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/contrib/velocity/config/a1/flat_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/contrib/velocity/config/a1/flat_env_cfg.py @@ -33,7 +33,7 @@ class PhysicsCfg(PresetCfg): debug_mode=False, ) newton_kamino = NewtonCfg(solver_cfg=KaminoSolverCfg(max_contacts_per_world=64)) - default = physx + default = isaacsim_physx @configclass diff --git a/source/isaaclab_tasks/isaaclab_tasks/contrib/velocity/config/anymal_b/flat_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/contrib/velocity/config/anymal_b/flat_env_cfg.py index c47a0e4b76c0..a88b960e50ec 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/contrib/velocity/config/anymal_b/flat_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/contrib/velocity/config/anymal_b/flat_env_cfg.py @@ -33,7 +33,7 @@ class PhysicsCfg(PresetCfg): debug_mode=False, ) newton_kamino = NewtonCfg(solver_cfg=KaminoSolverCfg(max_contacts_per_world=64)) - default = physx + default = isaacsim_physx @configclass diff --git a/source/isaaclab_tasks/isaaclab_tasks/contrib/velocity/config/anymal_c/flat_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/contrib/velocity/config/anymal_c/flat_env_cfg.py index 6c41bccb3590..7f100e452a58 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/contrib/velocity/config/anymal_c/flat_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/contrib/velocity/config/anymal_c/flat_env_cfg.py @@ -33,7 +33,7 @@ class PhysicsCfg(PresetCfg): debug_mode=False, ) newton_kamino = NewtonCfg(solver_cfg=KaminoSolverCfg(max_contacts_per_world=64)) - default = physx + default = isaacsim_physx @configclass diff --git a/source/isaaclab_tasks/isaaclab_tasks/contrib/velocity/config/digit/rough_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/contrib/velocity/config/digit/rough_env_cfg.py index c1e8b7d99bac..2284d162e340 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/contrib/velocity/config/digit/rough_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/contrib/velocity/config/digit/rough_env_cfg.py @@ -31,7 +31,7 @@ class DigitPhysicsCfg(PresetCfg): gpu_total_aggregate_pairs_capacity=2**23, ) physx = PhysxAutoCfg(isaacsim_physx=isaacsim_physx) - default = physx + default = isaacsim_physx @configclass diff --git a/source/isaaclab_tasks/isaaclab_tasks/contrib/velocity/config/go1/flat_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/contrib/velocity/config/go1/flat_env_cfg.py index 2c9cb9575bd7..f239a431f3f7 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/contrib/velocity/config/go1/flat_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/contrib/velocity/config/go1/flat_env_cfg.py @@ -33,7 +33,7 @@ class PhysicsCfg(PresetCfg): debug_mode=False, ) newton_kamino = NewtonCfg(solver_cfg=KaminoSolverCfg(max_contacts_per_world=64)) - default = physx + default = isaacsim_physx @configclass diff --git a/source/isaaclab_tasks/isaaclab_tasks/contrib/velocity/config/spot/flat_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/contrib/velocity/config/spot/flat_env_cfg.py index 14cdf9d258cb..81b7a35999a7 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/contrib/velocity/config/spot/flat_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/contrib/velocity/config/spot/flat_env_cfg.py @@ -38,7 +38,7 @@ class PhysicsCfg(PresetCfg): isaacsim_physx = PhysxCfg(gpu_max_rigid_patch_count=10 * 2**15) physx = PhysxAutoCfg(isaacsim_physx=isaacsim_physx) - default = physx + default = isaacsim_physx newton_mjwarp = NewtonCfg( solver_cfg=MJWarpSolverCfg( njmax=130, @@ -231,10 +231,10 @@ class SpotPhysxEventCfg(SpotNewtonEventCfg, SpotStartupEventCfg): @configclass class SpotEventCfg(PresetCfg): - default = SpotPhysxEventCfg() - newton_mjwarp = SpotNewtonEventCfg() - physx = default + physx = SpotPhysxEventCfg() isaacsim_physx = physx + default = isaacsim_physx + newton_mjwarp = SpotNewtonEventCfg() newton_kamino = newton_mjwarp diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/cabinet/cabinet_direct_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/core/cabinet/cabinet_direct_env_cfg.py index 8498fdc946e7..ee409c63d2b0 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/cabinet/cabinet_direct_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/cabinet/cabinet_direct_env_cfg.py @@ -36,7 +36,7 @@ class CabinetDirectPhysicsCfg(PresetCfg): ), num_substeps=1, ) - default = physx + default = isaacsim_physx @configclass 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 7800d12fc7ff..6acdc084b92a 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 @@ -55,7 +55,7 @@ class CabinetSimCfg(PresetCfg): physics=PhysxCfg(bounce_threshold_velocity=0.01, friction_correlation_distance=0.00625), ) physx: SimulationCfg = isaacsim_physx.replace(physics=PhysxAutoCfg(isaacsim_physx=isaacsim_physx.physics)) - default: SimulationCfg = physx + default: SimulationCfg = isaacsim_physx newton_mjwarp: SimulationCfg = SimulationCfg( dt=1 / 600, render_interval=1, @@ -261,9 +261,9 @@ class _CabinetNewtonEventCfg: @configclass class CabinetEventCfg(PresetCfg): - default: EventCfg = EventCfg() physx: EventCfg = EventCfg() isaacsim_physx: EventCfg = physx + default: EventCfg = isaacsim_physx newton_mjwarp: _CabinetNewtonEventCfg = _CabinetNewtonEventCfg() 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 2333bc85e286..4185d7b85536 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 @@ -28,7 +28,7 @@ class CartpolePhysicsCfg(PresetCfg): isaacsim_physx: PhysxCfg = PhysxCfg() ovphysx: OvPhysxCfg = OvPhysxCfg() physx: PhysxAutoCfg = PhysxAutoCfg(isaacsim_physx=isaacsim_physx, ovphysx=ovphysx) - default = physx + default = isaacsim_physx newton_mjwarp: NewtonCfg = NewtonCfg( solver_cfg=MJWarpSolverCfg( njmax=5, 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 cf7e3601fc82..d8c4fa12483e 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 @@ -38,7 +38,7 @@ class CartpolePhysicsCfg(PresetCfg): isaacsim_physx: PhysxCfg = PhysxCfg() ovphysx: OvPhysxCfg = OvPhysxCfg() physx: PhysxAutoCfg = PhysxAutoCfg(isaacsim_physx=isaacsim_physx, ovphysx=ovphysx) - default: PhysxAutoCfg = physx + default: PhysxCfg = isaacsim_physx newton_mjwarp: NewtonCfg = NewtonCfg( solver_cfg=MJWarpSolverCfg( njmax=5, 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 dbc75bfdbea9..e350e15355b8 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 @@ -37,12 +37,13 @@ class KukaAllegroObjectCfg(lift.ObjectCfg): class KukaAllegroPhysicsCfg(lift.PhysicsCfg): """Physics presets supported by the Kuka Allegro tasks.""" + isaacsim_physx = lift.PhysicsCfg().isaacsim_physx ovphysx = OvPhysxCfg( gpu_max_rigid_patch_count=4 * 5 * 2**15, gpu_found_lost_pairs_capacity=2**26, ) - physx = PhysxAutoCfg(isaacsim_physx=lift.PhysicsCfg().isaacsim_physx, ovphysx=ovphysx) - default = physx + physx = PhysxAutoCfg(isaacsim_physx=isaacsim_physx, ovphysx=ovphysx) + default = isaacsim_physx @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 e12f5e0c7963..711ce6e1c314 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 @@ -506,7 +506,7 @@ class PhysicsCfg(PresetCfg): debug_mode=False, ) physx = PhysxAutoCfg(isaacsim_physx=isaacsim_physx) - default = physx + default = isaacsim_physx @configclass 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 84a7a5f9abb0..c6c89bbe8820 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 @@ -28,7 +28,7 @@ class AntPhysicsCfg(PresetCfg): isaacsim_physx: PhysxCfg = PhysxCfg() ovphysx: OvPhysxCfg = OvPhysxCfg() physx: PhysxAutoCfg = PhysxAutoCfg(isaacsim_physx=isaacsim_physx, ovphysx=ovphysx) - default = physx + default = isaacsim_physx newton_mjwarp: NewtonCfg = NewtonCfg( solver_cfg=MJWarpSolverCfg( njmax=45, 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 d40b4d6c68c7..d438a86dd0e0 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 @@ -34,7 +34,7 @@ class AntPhysicsCfg(PresetCfg): isaacsim_physx: PhysxCfg = PhysxCfg(bounce_threshold_velocity=0.2) physx: PhysxAutoCfg = PhysxAutoCfg(isaacsim_physx=isaacsim_physx) - default: PhysxAutoCfg = physx + default: PhysxCfg = isaacsim_physx newton_mjwarp: NewtonCfg = NewtonCfg( solver_cfg=MJWarpSolverCfg( njmax=38, @@ -153,9 +153,9 @@ def __post_init__(self): @configclass class AntObservationsCfg(PresetCfg): - default: ObservationsCfg = ObservationsCfg() physx: ObservationsCfg = ObservationsCfg() isaacsim_physx: ObservationsCfg = physx + default: ObservationsCfg = isaacsim_physx newton_mjwarp: ObservationsCfg = ObservationsCfg() 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 9fa34ccc5edc..34c0b8ba8e97 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 @@ -28,7 +28,7 @@ class HumanoidPhysicsCfg(PresetCfg): isaacsim_physx: PhysxCfg = PhysxCfg() ovphysx: OvPhysxCfg = OvPhysxCfg() physx: PhysxAutoCfg = PhysxAutoCfg(isaacsim_physx=isaacsim_physx, ovphysx=ovphysx) - default = physx + default = isaacsim_physx newton_mjwarp: NewtonCfg = NewtonCfg( solver_cfg=MJWarpSolverCfg( njmax=80, 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 ab774c3d3f43..6725ce8da6e6 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 @@ -31,7 +31,7 @@ class HumanoidPhysicsCfg(PresetCfg): isaacsim_physx: PhysxCfg = PhysxCfg(bounce_threshold_velocity=0.2) physx: PhysxAutoCfg = PhysxAutoCfg(isaacsim_physx=isaacsim_physx) - default: PhysxAutoCfg = physx + default: PhysxCfg = isaacsim_physx newton_mjwarp: NewtonCfg = NewtonCfg( solver_cfg=MJWarpSolverCfg( njmax=80, @@ -137,9 +137,9 @@ def __post_init__(self): @configclass class HumanoidObservationsCfg(PresetCfg): - default: ObservationsCfg = ObservationsCfg() physx: ObservationsCfg = ObservationsCfg() isaacsim_physx: ObservationsCfg = physx + default: ObservationsCfg = isaacsim_physx newton_mjwarp: ObservationsCfg = ObservationsCfg() diff --git a/source/isaaclab_tasks/isaaclab_tasks/core/reorient/config/shadow_hand/shadow_hand_direct_camera_env_cfg.py b/source/isaaclab_tasks/isaaclab_tasks/core/reorient/config/shadow_hand/shadow_hand_direct_camera_env_cfg.py index 19292a97429f..bbc5a11c3f51 100644 --- a/source/isaaclab_tasks/isaaclab_tasks/core/reorient/config/shadow_hand/shadow_hand_direct_camera_env_cfg.py +++ b/source/isaaclab_tasks/isaaclab_tasks/core/reorient/config/shadow_hand/shadow_hand_direct_camera_env_cfg.py @@ -131,7 +131,7 @@ def __post_init__(self): # for the depth-only Newton-warp-renderer benchmark path (``presets=newton_renderer``). super().__post_init__() for backend_cfg in (self.sim.physics, self.robot_cfg, self.object_cfg): - backend_cfg.default = backend_cfg.physx + backend_cfg.default = backend_cfg.isaacsim_physx def validate_config(self): """Check renderer/data-type and feature-extractor compatibility.""" 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 7bbf9ff3b052..c53b1d32bfeb 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=KaminoSolverCfg(max_contacts_per_world=64)) - default = physx + default = isaacsim_physx @configclass 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 e6293b9995ca..e64feb5fff75 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=KaminoSolverCfg(max_contacts_per_world=64)) - default = physx + default = isaacsim_physx @configclass 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 d2b40ac55134..bcc3f7139f4a 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=KaminoSolverCfg(max_contacts_per_world=64)) - default = physx + default = isaacsim_physx @configclass 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 5b78264b7114..6a9883bf5e20 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=KaminoSolverCfg(max_contacts_per_world=64)) - default = physx + default = isaacsim_physx @configclass 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 0be27558d27f..d78ec6098966 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=KaminoSolverCfg(max_contacts_per_world=64)) - default = physx + default = isaacsim_physx @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 fb89db49208a..6e9dd535159c 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 @@ -67,7 +67,7 @@ class RoughPhysicsCfg(PresetCfg): # on triangle-mesh terrain. See isaaclab_newton 0.5.22 changelog. default_shape_cfg=NewtonShapeCfg(margin=0.01), ) - default = physx + default = isaacsim_physx ## diff --git a/source/isaaclab_tasks/test/contrib/stack/test_so101_stack_physics_cfg.py b/source/isaaclab_tasks/test/contrib/stack/test_so101_stack_physics_cfg.py index aa640d9f0aad..ba66ecf22ca0 100644 --- a/source/isaaclab_tasks/test/contrib/stack/test_so101_stack_physics_cfg.py +++ b/source/isaaclab_tasks/test/contrib/stack/test_so101_stack_physics_cfg.py @@ -25,7 +25,7 @@ def test_preset_enables_contact_last_and_keeps_stack_tuning(): preset = SO101StackPhysicsCfg() - assert preset.default == preset.physx + assert preset.default == preset.isaacsim_physx for physx in (preset.isaacsim_physx, preset.physx.isaacsim_physx): assert physx.solve_articulation_contact_last is True assert physx.bounce_threshold_velocity == 0.01 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 3a9ae2280534..337678d04af2 100644 --- a/source/isaaclab_tasks/test/core/test_preset_kit_decision.py +++ b/source/isaaclab_tasks/test/core/test_preset_kit_decision.py @@ -87,8 +87,8 @@ def test_isaacsim_physx_is_physics_selector(): assert "isaacsim_physx" in preset_map[PresetTarget.PHYSICS] -def test_registered_task_physx_presets_use_explicit_auto_cfg(): - """Every task with Isaac Sim PhysX exposes automatic and concrete presets.""" +def test_registered_task_physx_presets_keep_auto_selection_explicit(): + """PhysX defaults are concrete while ``physx`` remains the automatic selector.""" 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: @@ -102,8 +102,12 @@ def test_registered_task_physx_presets_use_explicit_auto_cfg(): if any(isinstance(value, PhysxCfg) for value in physics_fields.values()): auto_cfg = physics_fields.get("physx") isaacsim_cfg = physics_fields.get("isaacsim_physx") + default_cfg = physics_fields.get("default") assert isinstance(auto_cfg, PhysxAutoCfg), location assert isinstance(isaacsim_cfg, PhysxCfg), location + assert not isinstance(default_cfg, PhysxAutoCfg), location + if isinstance(default_cfg, PhysxCfg): + assert default_cfg == isaacsim_cfg, location assert auto_cfg.isaacsim_physx == isaacsim_cfg, location assert auto_cfg.ovphysx == physics_fields.get("ovphysx"), location elif has_auto_physx and "physx" in fields: @@ -133,24 +137,24 @@ def test_preset_mjwarp_ovrtx_does_not_need_kit(): assert needs_kit is False -def test_preset_rtx_resolves_to_ovphysx_and_ovrtx_without_kit(): - """The RTX preset uses kitless PhysX-family backends when no Kit runtime is requested.""" +def test_preset_rtx_with_default_physx_resolves_to_isaac_sim_backends(): + """Automatic RTX follows the default concrete Isaac Sim PhysX backend.""" env_cfg = _resolve_with_presets("rtx") config_scan = _resolve_runtime_renderer(env_cfg) - assert isinstance(env_cfg.sim.physics, OvPhysxCfg) - assert isinstance(env_cfg.tiled_camera.renderer_cfg, OVRTXRendererCfg) - assert config_scan.needs_kit is False + assert isinstance(env_cfg.sim.physics, PhysxCfg) + assert isinstance(env_cfg.tiled_camera.renderer_cfg, IsaacRtxRendererCfg) + assert config_scan.needs_kit is True -def test_renderer_selector_rtx_resolves_to_ovphysx_and_ovrtx_without_kit(): - """The RTX renderer selector uses kitless PhysX-family backends without Kit signals.""" +def test_renderer_selector_rtx_with_default_physx_resolves_to_isaac_sim_backends(): + """The RTX selector follows the default concrete Isaac Sim PhysX backend.""" env_cfg = _resolve_with_args("renderer=rtx") config_scan = _resolve_runtime_renderer(env_cfg) - assert isinstance(env_cfg.sim.physics, OvPhysxCfg) - assert isinstance(env_cfg.tiled_camera.renderer_cfg, OVRTXRendererCfg) - assert config_scan.needs_kit is False + assert isinstance(env_cfg.sim.physics, PhysxCfg) + assert isinstance(env_cfg.tiled_camera.renderer_cfg, IsaacRtxRendererCfg) + assert config_scan.needs_kit is True def test_renderer_selector_physx_rtx_resolves_to_ovphysx_without_kit(): @@ -233,7 +237,7 @@ def test_preset_physx_with_default_kit_camera_resolves_to_physx(): def test_preset_default_needs_kit(): - """Default automatic PhysX plus Isaac RTX requires Kit.""" + """Default concrete Isaac Sim PhysX plus Isaac RTX requires Kit.""" env_cfg = _resolve_with_presets("default") needs_kit = scan(env_cfg).needs_kit assert needs_kit is True diff --git a/source/isaaclab_tasks/test/core/test_runtime_compatibility.py b/source/isaaclab_tasks/test/core/test_runtime_compatibility.py index fb3f25e1cc77..10573906fbd7 100644 --- a/source/isaaclab_tasks/test/core/test_runtime_compatibility.py +++ b/source/isaaclab_tasks/test/core/test_runtime_compatibility.py @@ -226,17 +226,13 @@ def test_newton_plus_ovrtx_is_valid(): validate_runtime_compatibility(env_cfg) -def test_default_auto_physx_plus_ovrtx_resolves_to_ovphysx(): - """Default automatic PhysX uses OvPhysX when OVRTX is the only renderer signal.""" +def test_default_isaacsim_physx_plus_ovrtx_raises(): + """The concrete default Isaac Sim PhysX backend is incompatible with OVRTX.""" env_cfg = _resolve_with_presets("ovrtx") - assert isinstance(env_cfg.sim.physics, PhysxAutoCfg) - - config_scan = validate_runtime_compatibility(env_cfg) - - assert isinstance(env_cfg.sim.physics, OvPhysxCfg) - assert isinstance(env_cfg.tiled_camera.renderer_cfg, OVRTXRendererCfg) - assert config_scan.needs_kit is False + assert isinstance(env_cfg.sim.physics, PhysxCfg) + with pytest.raises(ValueError, match="PhysxCfg"): + validate_runtime_compatibility(env_cfg) def test_explicit_auto_physx_plus_ovrtx_resolves_to_ovphysx(): @@ -306,14 +302,14 @@ def test_default_preset_is_valid(): validate_runtime_compatibility(env_cfg) -def test_rtx_with_default_physx_is_valid_and_resolves_to_ovphysx_and_ovrtx(): - """The RTX preset chooses kitless PhysX-family backends when no Kit runtime is needed.""" +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.""" env_cfg = _resolve_with_presets("rtx") config_scan = validate_runtime_compatibility(env_cfg) - assert isinstance(env_cfg.sim.physics, OvPhysxCfg) - assert isinstance(env_cfg.tiled_camera.renderer_cfg, OVRTXRendererCfg) - assert config_scan.needs_kit is False + assert isinstance(env_cfg.sim.physics, PhysxCfg) + assert isinstance(env_cfg.tiled_camera.renderer_cfg, IsaacRtxRendererCfg) + assert config_scan.needs_kit is True def test_renderer_selector_physx_rtx_is_valid_and_resolves_to_ovphysx_and_ovrtx():