Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion docs/source/_static/css/demo-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,13 @@
const extraOrder = ["isaacsim", "ovphysx", "ovrtx", "tetrahedralization", "teleop", "rerun", "viser"];
const extras = extraOrder.filter((extra) => requiredExtras.has(extra));

const parts = ["uvx"];
const parts = ["uvx", "--torch-backend", "cu130"];
if (extras.length) {
parts.push("--from", `'isaaclab[${extras.join(",")}]'`);
}
for (const dependency of splitValues(selectedCard.dataset.demoPackages)) {
parts.push("--with", `'${dependency}'`);
}
parts.push("isaaclab", "demo", selectedCard.dataset.demoId);
if (selectedCard.dataset.demoFixedPhysics !== "true") {
parts.push("--physics", fields.physics.value);
Expand Down Expand Up @@ -101,6 +104,8 @@
}
selectedName.textContent = selectedCard.dataset.demoId;
selectedDescription.textContent = selectedCard.dataset.demoDescription;
fields.physics.value = "";
fields.visualizer.value = "";
populateSelect(fields.physics, splitValues(selectedCard.dataset.demoPhysics), ["newton_mjwarp", "isaacsim_physx"]);
updateVisualizer();
};
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/_static/demos/sonic.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/_static/demos/zoo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 9 additions & 9 deletions docs/source/concepts/using_mpm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ for resolution, convergence, material settings, and the nearly rigid MPM limit.
Examples and tasks
------------------

These examples and demos introduce MPM construction and interaction. They
These examples introduce MPM construction and interaction. They
default to Newton GL for interactive viewing. The launcher uses ``cuda:0`` by
default. Pass ``--device cuda:N`` to select a different GPU.

Expand Down Expand Up @@ -56,7 +56,7 @@ default. Pass ``--device cuda:N`` to select a different GPU.

.. code-block:: bash

uv run isaaclab demo snowball-smash
uv run isaaclab example snowball-smash

.. grid-item-card:: Teapot fill

Expand All @@ -68,7 +68,7 @@ default. Pass ``--device cuda:N`` to select a different GPU.

.. code-block:: bash

uv run isaaclab demo teapot-fill --fluid_render_mode particles
uv run isaaclab example teapot-fill --fluid_render_mode particles

.. _franka-pour-reset-artifact:

Expand Down Expand Up @@ -134,7 +134,7 @@ into named entries:
* a proxy mapping that exposes selected rigid bodies as colliders in the MPM
entry and feeds the resulting impulses back to the rigid entry.

The ``mpm-two-way-coupling`` example, the ``snowball-smash`` demo, and the
The ``mpm-two-way-coupling`` example, the ``snowball-smash`` example, and the
Franka Pour task all use this pattern. See :ref:`newton-coupled-solvers` for
proxy and ADMM coupling, exchange modes, and tuning.

Expand Down Expand Up @@ -304,18 +304,18 @@ Rendering a particle surface

MPM simulation state remains a set of particles. Surface reconstruction is an
optional visualization pass: it does not change particle motion, collisions, or
material behavior. Run the teapot demo to compare the available modes:
material behavior. Run the teapot example to compare the available modes:

.. code-block:: bash

# Reconstructed surface
uv run isaaclab demo teapot-fill \
uv run isaaclab example teapot-fill \
--visualizer newton_gl --fluid_render_mode surface
# Surface and source particles together
uv run isaaclab demo teapot-fill \
uv run isaaclab example teapot-fill \
--visualizer newton_gl --fluid_render_mode both

The teapot demo uses Newton GL and defaults to the reconstructed surface. Select
The teapot example uses Newton GL and defaults to the reconstructed surface. Select
``particles`` or ``both`` to inspect the source MPM state. Its ``--visualizer`` / ``--viz``
option accepts only ``newton_gl``; omit the option to use that default.

Expand All @@ -337,7 +337,7 @@ Surface rendering is available in the Kit, Newton GL, and Newton RTX visualizers
This recording demonstrates rendering appearance, not a different
constitutive model.

The teapot demo configures ``newton.geometry.ParticleSurface`` after
The teapot example configures ``newton.geometry.ParticleSurface`` after
``sim.reset()`` and updates the mesh before ``sim.render()``. Its renderer
captures extraction on CUDA when enabled and stages the dynamic mesh inside
the viewer's frame lifecycle.
Expand Down
84 changes: 50 additions & 34 deletions docs/source/isaaclab/demos.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,19 @@ No source checkout is required.
data-demo-visualizers="kit,newton_gl,newton_rtx,rerun,viser"
data-demo-visualizers-isaacsim-physx="kit,newton_gl,rerun,viser"
data-demo-visualizers-newton-mjwarp="kit,newton_gl,newton_rtx,rerun,viser"
data-demo-description="Animate an arm, biped, quadruped, dexterous hand, quadcopter, and rigid props in one deterministic scene.">
<img src="../../_static/demos/zoo.jpg" alt="Robots in the Isaac Lab Zoo demo" loading="lazy">
data-demo-description="Explore twenty robot models: humanoids, quadrupeds, industrial and collaborative arms, dexterous hands, MicroDuck, and a hovering quadcopter.">
<img src="../../_static/demos/zoo.jpg" alt="Twenty robot models arranged across the Isaac Lab Zoo" loading="lazy">
<span>Zoo</span>
</button>
<button type="button" class="demo-card" aria-pressed="false"
data-demo-name="MicroDuck Warehouse" data-demo-id="microduck-warehouse"
data-demo-physics="newton_xpbd" data-demo-fixed-physics="true"
data-demo-physics="newton_mjwarp,isaacsim_physx"
data-demo-visualizers="kit,newton_gl,newton_rtx,rerun,viser"
data-demo-visualizers-isaacsim-physx="kit,newton_gl,rerun,viser"
data-demo-extras="ovrtx"
data-demo-description="View the static MicroDuck Warehouse through selectable renderers and saved cameras.">
<img src="../../_static/browser_demos/previews/microduck.jpg"
alt="MicroDuck warehouse scene" loading="lazy">
<img src="../../_static/demos/microduck_warehouse.jpg"
alt="MicroDuck among cans and warehouse shelves in the native rendering demo" loading="lazy">
<span>MicroDuck Warehouse</span>
</button>
<button type="button" class="demo-card" aria-pressed="false"
Expand All @@ -78,8 +80,10 @@ No source checkout is required.
data-demo-visualizers="newton_gl,kit,newton_rtx,rerun,viser"
data-demo-visualizers-isaacsim-physx="kit,newton_gl,rerun,viser"
data-demo-visualizers-newton-mjwarp="newton_gl,kit,newton_rtx,rerun,viser"
data-demo-description="Record G1 traversing deformable gravel and sand with released SONIC policies.">
<img src="../../_static/browser_demos/previews/g1.jpg" alt="G1 humanoid robot in Isaac Lab" loading="lazy">
data-demo-extras="isaacsim"
data-demo-packages="huggingface-hub>=0.34,onnxruntime-gpu>=1.22"
data-demo-description="Run G1 over deformable gravel and sand with released SONIC policies.">
<img src="../../_static/demos/sonic.jpg" alt="G1 on the native SONIC gravel and sand course" loading="lazy">
<span>SONIC</span>
</button>
<button type="button" class="demo-card" aria-pressed="false"
Expand All @@ -97,32 +101,6 @@ No source checkout is required.
<img src="../../_static/demos/pick_and_place.jpg" alt="Interactive pick and place demo" loading="lazy">
<span>Pick and Place</span>
</button>
<button type="button" class="demo-card" aria-pressed="false"
data-demo-name="Newton Block and Tackle" data-demo-id="newton-block-and-tackle"
data-demo-physics="newton_vbd" data-demo-fixed-physics="true"
data-demo-visualizers="newton_gl"
data-demo-description="Drag a cable handle to lift a load through a 4:1 pulley system.">
<img src="../../_static/demos/newton_block_and_tackle.jpg" alt="Block and tackle pulleys and a red load" loading="lazy">
<span>Newton Block and Tackle</span>
</button>
<button type="button" class="demo-card" aria-pressed="false"
data-demo-name="Snowball Smash" data-demo-id="snowball-smash"
data-demo-physics="newton_mpm" data-demo-fixed-physics="true"
data-demo-visualizers="kit,newton_gl,newton_rtx,rerun,viser"
data-demo-args="--device cuda:0"
data-demo-description="Smash rigid crates with coupled MPM snowballs.">
<img src="../../_static/demos/snowball_smash.jpg" alt="Snowballs striking a stack of colored crates" loading="lazy">
<span>Snowball Smash</span>
</button>
<button type="button" class="demo-card" aria-pressed="false"
data-demo-name="Teapot Fill" data-demo-id="teapot-fill"
data-demo-physics="newton_mpm" data-demo-fixed-physics="true"
data-demo-visualizers="newton_gl"
data-demo-args="--device cuda:0"
data-demo-description="Fill a Utah teapot with MPM water particles and pour them into a bowl.">
<img src="../../_static/demos/teapot_fill.jpg" alt="Utah teapot pouring simulated water" loading="lazy">
<span>Teapot Fill</span>
</button>
<button type="button" class="demo-card" aria-pressed="false"
data-demo-name="Rizon–Sharpa Coffee" data-demo-id="rizon-sharpa-coffee"
data-demo-physics="newton_coupler" data-demo-fixed-physics="true"
Expand Down Expand Up @@ -182,6 +160,7 @@ MicroDuck Warehouse rendering
-----------------------------

View the static MicroDuck Warehouse through selectable renderers and saved cameras, without advancing physics.
Newton MJWarp and the Newton GL visualizer are the defaults; the camera uses OVRTX for rendering.

.. code-block:: bash

Expand All @@ -199,7 +178,8 @@ SONIC on gravel and sand
------------------------

The SONIC demo runs a G1 robot over gravel and sand with Newton MJWarp and MPM,
or Isaac Sim PhysX and PBD. It requires an NVIDIA GPU and uses Kit for RTX rendering.
or Isaac Sim PhysX and PBD. It requires an NVIDIA GPU. Default offscreen recording
uses Kit for RTX rendering.

From the repository root, install the simulator, recording dependencies, and the
additional packages used to download and run the released ONNX models:
Expand Down Expand Up @@ -248,6 +228,42 @@ Focused examples
.. grid:: 1 1 2 2
:gutter: 2

.. grid-item-card:: Newton Block and Tackle

.. image:: ../_static/examples/newton_block_and_tackle.jpg
:width: 100%
:alt: Block and tackle pulleys and a red load.

Drag a cable handle to lift a load through a 4:1 pulley system with Newton VBD.

.. code-block:: bash

uvx --torch-backend cu130 isaaclab example newton-block-and-tackle

.. grid-item-card:: Snowball Smash

.. image:: ../_static/examples/snowball_smash.jpg
:width: 100%
:alt: Snowballs striking a stack of colored crates.

Smash rigid crates with coupled MPM snowballs.

.. code-block:: bash

uvx --torch-backend cu130 isaaclab example snowball-smash --device cuda:0

.. grid-item-card:: Teapot Fill

.. image:: ../_static/examples/teapot_fill.jpg
:width: 100%
:alt: Utah teapot pouring simulated water.

Fill a Utah teapot with MPM water particles and pour them into a bowl.

.. code-block:: bash

uvx --torch-backend cu130 isaaclab example teapot-fill --device cuda:0

.. grid-item-card:: Tablecloth trick (Newton VBD, experimental)

.. figure:: ../_static/examples/tablecloth_h2.jpg
Expand Down
23 changes: 18 additions & 5 deletions examples/demos/microduck_warehouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@
parser.add_argument(
"--max_steps", type=int, default=-1, help="Number of render frames; -1 runs until the viewer closes."
)
parser.add_argument(
"--physics",
choices=["newton_mjwarp", "isaacsim_physx"],
help="Physics backend (default: MJWarp, or PhysX with renderer=isaacsim_rtx).",
)
add_launcher_args(parser)
parser.set_defaults(visualizer=["newton_gl"])
args_cli, overrides = setup_preset_cli(parser)
Expand All @@ -42,7 +47,7 @@

from isaaclab_isaacsim.physics import PhysxCfg
from isaaclab_isaacsim.renderers import IsaacRtxRendererCfg, IsaacRtxRendererGlobalSettingsCfg
from isaaclab_newton.physics import NewtonCfg, XPBDSolverCfg
from isaaclab_newton.physics import MJWarpSolverCfg, NewtonCfg
from isaaclab_newton.renderers import NewtonOptixRendererCfg, NewtonWarpRendererCfg
from isaaclab_ov.renderers import OVRTXRendererCfg

Expand Down Expand Up @@ -83,7 +88,6 @@ class WarehouseSceneCfg(InteractiveSceneCfg):
instance_segmentation=["instance_segmentation"],
),
renderer_cfg=MultiBackendRendererCfg(
default=OVRTXRendererCfg(enable_shadows=True),
ovrtx=OVRTXRendererCfg(enable_shadows=True),
newton_warp=NewtonWarpRendererCfg(enable_textures=True, enable_shadows=True),
newton_optix=NewtonOptixRendererCfg(enable_textures=True, enable_shadows=True),
Expand All @@ -95,6 +99,7 @@ class WarehouseSceneCfg(InteractiveSceneCfg):
),
)
),
default=MultiBackendRendererCfg().rtx,
),
)

Expand All @@ -111,8 +116,12 @@ class WarehouseDemoCfg(ManagerBasedEnvCfg):
scene: WarehouseSceneCfg = WarehouseSceneCfg(num_envs=1, env_spacing=0.0)
sim: sim_utils.SimulationCfg = sim_utils.SimulationCfg(
physics=preset(
default=NewtonCfg(solver_cfg=XPBDSolverCfg(), use_cuda_graph=False, load_visual_shapes=True),
isaacsim_rtx=PhysxCfg(),
newton_mjwarp=NewtonCfg(solver_cfg=MJWarpSolverCfg(), use_cuda_graph=False, load_visual_shapes=True),
isaacsim_physx=PhysxCfg(),
default=preset(
default=NewtonCfg(solver_cfg=MJWarpSolverCfg(), use_cuda_graph=False, load_visual_shapes=True),
isaacsim_rtx=PhysxCfg(),
),
),
visualizer_cfgs=VisualizerCfg(cameras=[SceneCameraCfg(prim_path="{ENV_REGEX_NS}/Camera")]),
)
Expand Down Expand Up @@ -151,7 +160,11 @@ def main() -> None:
raise ValueError(f"No USD camera at {cfg.camera_path!r} in {WAREHOUSE_USD!r}.")
camera = UsdGeom.Camera.Define(stage, "/World/envs/env_0/Camera")
camera.SetFromCamera(source_camera.GetCamera())
if output == "rgb" and cfg.camera_exposure_iso is not None:
if (
output == "rgb"
and isinstance(cfg.scene.camera.renderer_cfg, OVRTXRendererCfg)
and cfg.camera_exposure_iso is not None
):
# Use a fixed physical exposure for the warehouse's dim interior in OVRTX.
camera.GetPrim().AddAppliedSchema("OmniRtxCameraExposureAPI_1")
camera.CreateExposureFStopAttr(5.0)
Expand Down
Loading
Loading