Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ in your environment:
.. code-block:: bash

# Default Newton VBD physics with the Kit visualizer.
uv run python scripts/demos/cables.py
uv run --extra isaacsim python scripts/demos/cables.py

# Explicit Newton VBD physics with the Newton visualizer.
uv run python scripts/demos/cables.py --physics newton_vbd --visualizer newton
Expand Down
2 changes: 1 addition & 1 deletion docs/source/overview/showroom.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ A few quick showroom scripts to run and checkout:

.. code:: bash

uv run python scripts/demos/cables.py
uv run --extra isaacsim python scripts/demos/cables.py

.. tab-item:: isaaclab.sh / isaaclab.bat

Expand Down
12 changes: 6 additions & 6 deletions docs/source/tutorials/01_assets/run_deformable_object.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ commands to the mesh nodes to move the soft body.

.. note::

This tutorial automatically tetrahedralizes volume deformables. Run it with the
``tetrahedralization`` extra:
This tutorial automatically tetrahedralizes volume deformables, and its default
visualizer is Kit. Run it with the ``isaacsim`` and ``tetrahedralization`` extras:

.. code-block:: bash

uv run --extra tetrahedralization python scripts/tutorials/01_assets/run_deformable_object.py --visualizer kit
uv run --extra isaacsim --extra tetrahedralization python scripts/tutorials/01_assets/run_deformable_object.py --visualizer kit

With the legacy installer, install the optional dependencies first:

Expand All @@ -49,7 +49,7 @@ The tutorial corresponds to the ``run_deformable_object.py`` script in the ``scr

.. literalinclude:: ../../../../scripts/tutorials/01_assets/run_deformable_object.py
:language: python
:emphasize-lines: 65-102, 123-128, 130-139, 144-152, 154-162
:emphasize-lines: 71-117, 146-151, 153-162, 167-175, 177-178, 184-189
:linenos:


Expand Down Expand Up @@ -184,7 +184,7 @@ Now that we have gone through the code, let's run the script and see the result:

.. code-block:: bash

uv run python scripts/tutorials/01_assets/run_deformable_object.py --visualizer kit
uv run --extra isaacsim --extra tetrahedralization python scripts/tutorials/01_assets/run_deformable_object.py --visualizer kit

.. tab-item:: isaaclab.sh / isaaclab.bat

Expand All @@ -200,7 +200,7 @@ To run the same tutorial with the experimental Newton deformable backend:

.. code-block:: bash

uv run python scripts/tutorials/01_assets/run_deformable_object.py --backend newton_vbd --visualizer kit
uv run --extra isaacsim --extra tetrahedralization python scripts/tutorials/01_assets/run_deformable_object.py --backend newton_vbd --visualizer kit


.. tab-item:: isaaclab.sh / isaaclab.bat
Expand Down
9 changes: 7 additions & 2 deletions scripts/demos/cables.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
.. code-block:: bash

# Usage with default Newton VBD physics and Kit visualizer.
uv run python scripts/demos/cables.py
uv run --extra isaacsim python scripts/demos/cables.py

# Usage with explicit Newton VBD physics and Newton visualizer.
uv run python scripts/demos/cables.py --physics newton_vbd --visualizer newton
Expand All @@ -23,6 +23,7 @@
import argparse
import math
import random
from typing import TYPE_CHECKING

from isaaclab.app import add_launcher_args, launch_simulation

Expand All @@ -41,9 +42,11 @@
parser.error("--num_segments must be at least 2.")

import isaaclab.sim as sim_utils
from isaaclab.assets import CableObject, CableObjectCfg
from isaaclab.physics import PhysicsCfg

if TYPE_CHECKING:
from isaaclab.assets import CableObject


def design_scene(num_cables: int, num_segments: int, colorize: bool) -> dict[str, CableObject]:
"""Spawn a ground plane, light, and randomly oriented cable pile.
Expand All @@ -53,6 +56,8 @@ def design_scene(num_cables: int, num_segments: int, colorize: bool) -> dict[str
num_segments: Number of segments per cable.
colorize: Whether to give each cable a random visual material.
"""
from isaaclab.assets import CableObject, CableObjectCfg

ground_cfg = sim_utils.GroundPlaneCfg()
ground_cfg.func("/World/defaultGroundPlane", ground_cfg)
light_cfg = sim_utils.DomeLightCfg(intensity=3000.0, color=(0.75, 0.75, 0.75))
Expand Down
15 changes: 11 additions & 4 deletions scripts/tutorials/01_assets/run_deformable_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,22 @@
.. code-block:: bash

# Usage with default PhysX physics and default kit visualizer.
uv run python scripts/tutorials/01_assets/run_deformable_object.py
uv run --extra isaacsim --extra tetrahedralization python scripts/tutorials/01_assets/run_deformable_object.py

# Usage with Newton VBD physics and default kit visualizer.
uv run python scripts/tutorials/01_assets/run_deformable_object.py --backend newton_vbd
uv run --extra isaacsim --extra tetrahedralization python scripts/tutorials/01_assets/run_deformable_object.py \
--backend newton_vbd

# Usage with OvPhysX physics without a visualizer.
uv run python scripts/tutorials/01_assets/run_deformable_object.py --backend ovphysx
uv run --extra ovphysx --extra tetrahedralization python scripts/tutorials/01_assets/run_deformable_object.py \
--backend ovphysx

"""

"""Parse CLI first so we can decide whether to launch Isaac Sim Kit."""

import argparse
from typing import TYPE_CHECKING

from isaaclab.app import add_launcher_args, launch_simulation

Expand All @@ -45,12 +48,16 @@

import isaaclab.sim as sim_utils
import isaaclab.utils.math as math_utils
from isaaclab.assets import DeformableObject, DeformableObjectCfg
from isaaclab.physics import PhysicsCfg

if TYPE_CHECKING:
from isaaclab.assets import DeformableObject


def design_scene():
"""Designs the scene."""
from isaaclab.assets import DeformableObject, DeformableObjectCfg

# Ground-plane
cfg = sim_utils.GroundPlaneCfg()
cfg.func("/World/defaultGroundPlane", cfg)
Expand Down
Loading