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
2 changes: 1 addition & 1 deletion .github/actions/multi-gpu/mgpu_shard_select.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
Signal: ``ISAACLAB_TEST_DEVICES`` -- the runtime device mask. This is the SAME
env var ``isaaclab.test.utils.devices.test_devices()`` reads to decide a test's
device parametrization, so this plugin's keep/drop decision agrees with what was
parametrized. Kit-backed tests derive their AppLauncher device from the same mask.
parametrized. Kit-backed tests derive their Kit launch device from the same mask.
The plugin reads the mask string directly -- no isaaclab import -- matching the
lib-free convention of every other conftest in the repo. The only shared knowledge
is the mask grammar below, mirrored from ``devices.py`` (position 0 = cpu,
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/run-tests/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ run_tests() {

if [ -n "$ovrtx_shader_cache_host_dir" ]; then
# Canonical OVRTX shader cache mount layout; other boundaries refer here.
# host kit/ -> /isaac-sim/kit/cache/nv_shadercache (Kit / AppLauncher rendering)
# host kit/ -> /isaac-sim/kit/cache/nv_shadercache (Kit rendering)
# host kitless/ -> OVRTX_SHADER_CACHE_PATH (standalone OVRTXRenderer)
#
# kit/ is a nested bind mount overlaying the nv_shadercache directory that the
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test-multi-gpu-pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ jobs:
triggered-jobs-pr: multi-GPU sharded unit tests
patterns: |
^source/isaaclab/isaaclab/test/utils/ :: Device-scope test helpers
^source/isaaclab/isaaclab/app/app_launcher\.py$ :: Device selection at launch
^source/isaaclab_physx/isaaclab_physx/app/kit_launcher\.py$ :: Device selection at launch
^source/isaaclab/isaaclab/app/sim_launcher\.py$ :: Device selection at launch
^source/.+/test/.+/test_.*\.py$ :: Device-parametrized test files
^\.github/workflows/test-multi-gpu-pytest\.yaml$ :: This workflow
^\.github/actions/(run-tests|run-package-tests|ecr-build-push-pull|multi-gpu|detect-changes)/ :: Shared actions
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-multi-gpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ name: Multi-GPU Training Tests
on:
pull_request:
paths:
- "source/isaaclab/isaaclab/app/app_launcher.py"
- "source/isaaclab_tasks/isaaclab_tasks/utils/sim_launcher.py"
- "source/isaaclab_physx/isaaclab_physx/app/kit_launcher.py"
- "source/isaaclab/isaaclab/app/sim_launcher.py"
- "scripts/reinforcement_learning/train.py"
- "source/isaaclab_rl/isaaclab_rl/entrypoints/**"
- ".github/workflows/test-multi-gpu.yaml"
Expand Down
2 changes: 1 addition & 1 deletion apps/isaaclab.python.headless.kit
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ logSysStdOutput = false

[settings]
# Use one renderer GPU by default. Applications that need single-process multi-GPU rendering can override these
# settings through AppLauncher's ``kit_args``.
# settings through the Kit launcher's ``kit_args``.
renderer.multiGpu.enabled = false
renderer.multiGpu.autoEnable = false
renderer.multiGpu.maxGpuCount = 1
Expand Down
2 changes: 1 addition & 1 deletion apps/isaaclab.python.kit
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ app.asyncRendering = false
app.asyncRenderingLowLatency = false

# Use one renderer GPU by default. Applications that need single-process multi-GPU rendering can override these
# settings through AppLauncher's ``kit_args``.
# settings through the Kit launcher's ``kit_args``.
renderer.multiGpu.enabled = false
renderer.multiGpu.autoEnable = false
renderer.multiGpu.maxGpuCount = 1
Expand Down
2 changes: 2 additions & 0 deletions docs/source/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ The following modules are available in the ``isaaclab_physx`` extension:
.. autosummary::
:toctree: lab_physx

app
assets
cloner
physics
Expand Down Expand Up @@ -173,6 +174,7 @@ The following modules are available in the ``isaaclab_ov`` extension:
.. autosummary::
:toctree: lab_ov

app
assets
cloner
physics
Expand Down
154 changes: 8 additions & 146 deletions docs/source/api/lab/isaaclab.app.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,168 +10,32 @@
AppLauncher
LoadingScreen
Scan
SimulationLauncher

.. rubric:: Functions

.. autosummary::

add_launcher_args
launch_simulation
make_physics_cfg
report_activity
scan


Environment variables
---------------------

The following details the behavior of the class based on the environment variables:

* **Headless mode**: If the environment variable ``HEADLESS=1``, then SimulationApp will be started in headless mode.
If ``LIVESTREAM={1,2}``, then it will supersede the ``HEADLESS`` envvar and force headlessness.

* ``HEADLESS=1`` causes the app to run in headless mode.

* **Livestreaming**: If the environment variable ``LIVESTREAM={1,2}`` , then `livestream`_ is enabled. Any
of the livestream modes being true forces the app to run in headless mode.

* ``LIVESTREAM=1`` enables streaming via the `WebRTC Livestream`_ extension over **public networks**. This allows users to
connect through the WebRTC Client using the WebRTC protocol.
* ``LIVESTREAM=2`` enables streaming via the `WebRTC Livestream`_ extension over **private and local networks**. This allows users to
connect through the WebRTC Client using the WebRTC protocol.

.. note::

Each Isaac Sim instance can only connect to one streaming client.
Connecting to an Isaac Sim instance that is currently serving a streaming client
results in an error for the second user.

* **Public IP Address**: When using the environment variable ``LIVESTREAM={1,2}``, set the ``PUBLIC_IP`` envvar to define the public IP address endpoint for livestreaming remotely.

Camera and offscreen rendering support is enabled automatically. No environment variable or command-line
option is required for camera tasks.


To set the environment variables, one can use the following command in the terminal:

.. tab-set::
:sync-group: os

.. tab-item:: :icon:`fa-brands fa-linux` Linux x86_64
:sync: linux-x86_64

.. code-block:: bash

export LIVESTREAM=2
# run the python script
uv run --extra isaacsim isaaclab demo zoo --physics isaacsim_physx --viz kit

Alternatively, set the environment variable inline for a single invocation:

.. code-block:: bash

LIVESTREAM=2 uv run --extra isaacsim isaaclab demo zoo --physics isaacsim_physx --viz kit

.. tab-item:: :icon:`fa-brands fa-linux` Linux aarch64 (DGX Spark)
:sync: linux-aarch64

.. code-block:: bash

export LIVESTREAM=2
# run the python script
LD_PRELOAD=/lib/aarch64-linux-gnu/libgomp.so.1 uv run --extra isaacsim isaaclab demo zoo --physics isaacsim_physx --viz kit

Alternatively, set the environment variable inline for a single invocation:

.. code-block:: bash

LIVESTREAM=2 LD_PRELOAD=/lib/aarch64-linux-gnu/libgomp.so.1 uv run --extra isaacsim isaaclab demo zoo --physics isaacsim_physx --viz kit

.. note::

Direct Python commands that import Isaac Sim on aarch64 require the
``LD_PRELOAD=/lib/aarch64-linux-gnu/libgomp.so.1`` prefix shown above. See
:ref:`installation-method-uv`.

.. warning::

Livestreaming is not currently supported or validated on DGX Spark. See the
:doc:`/source/setup/installation/index` for the current list of features not
yet validated on this platform.

.. tab-item:: :icon:`fa-brands fa-windows` Windows
:sync: windows

In Command Prompt:

.. code-block:: batch

set LIVESTREAM=2
uv run --extra isaacsim isaaclab demo zoo --physics isaacsim_physx --viz kit

In PowerShell:

.. code-block:: powershell

$env:LIVESTREAM = "2"
uv run --extra isaacsim isaaclab demo zoo --physics isaacsim_physx --viz kit

.. note::

The POSIX inline ``VAR=value <command>`` prefix form used on Linux (for example
``LIVESTREAM=2 uv run ...``) has no Windows equivalent; use one of the two forms
above instead.


Overriding the environment variables
------------------------------------

The environment variables can be overridden in the python script itself using the :class:`AppLauncher`.
These can be passed as a dictionary, a :class:`argparse.Namespace` object or as keyword arguments.
When the passed arguments are not the default values, then they override the environment variables.

The following snippet shows how use the :class:`AppLauncher` in different ways:

.. code:: python

import argparse

from isaaclab.app import AppLauncher

# add argparse arguments
parser = argparse.ArgumentParser()
# add your own arguments
# ....
# add app launcher arguments for cli
AppLauncher.add_app_launcher_args(parser)
# parse arguments
args = parser.parse_args()

# launch omniverse isaac-sim app
# -- Option 1: Pass the settings as a Namespace object
app_launcher = AppLauncher(args).app
# -- Option 2: Pass the settings as keywords arguments
app_launcher = AppLauncher(headless=args.headless, livestream=args.livestream)
# -- Option 3: Pass the settings as a dictionary
app_launcher = AppLauncher(vars(args))
# -- Option 4: Pass no settings
app_launcher = AppLauncher()
Simulation Launcher
-------------------

# obtain the launched app
simulation_app = app_launcher.app
.. autofunction:: launch_simulation

.. autofunction:: add_launcher_args

Simulation App Launcher
-----------------------
.. autoclass:: SimulationLauncher
:members:

.. autoclass:: AppLauncher
:members:


Simulation Launcher
-------------------

.. autofunction:: launch_simulation

.. autofunction:: make_physics_cfg

.. autofunction:: scan
Expand All @@ -180,8 +44,6 @@ Simulation Launcher
:members:


.. _livestream: https://docs.isaacsim.omniverse.nvidia.com/latest/installation/manual_livestream_clients.html
.. _`WebRTC Livestream`: https://docs.isaacsim.omniverse.nvidia.com/latest/installation/manual_livestream_clients.html#isaac-sim-short-webrtc-streaming-client

Additional Public Classes
-------------------------
Expand Down
9 changes: 9 additions & 0 deletions docs/source/api/lab_ov/isaaclab_ov.app.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
isaaclab\_ov.app
================

.. automodule:: isaaclab_ov.app

.. currentmodule:: isaaclab_ov.app

.. autoclass:: OvrtxLauncher
:show-inheritance:
Loading
Loading