Commit 25200735 authored by Kelly Guo's avatar Kelly Guo Committed by Kelly Guo

Updates livestream options for Isaac Sim 5.0 (#441)

Native livestreaming was previous deprecated and has now been removed.
We kept the 2 livestream options, now both using WebRTC livestreaming

LIVESTREAM=1 can now be used for WebRTC streaming over a public network
LIVESTREAM=2 can be used for WebRTC streaming over a local or private
network.

- New feature (non-breaking change which adds functionality)
- Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- This change requires a documentation update

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [ ] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

<!--
As you go through the checklist above, you can mark something as done by
putting an x character in it

For example,
- [x] I have done this task
- [ ] I have not done this task
-->

---------
Signed-off-by: 's avatarKelly Guo <kellyg@nvidia.com>
parent 9139ec44
...@@ -23,10 +23,9 @@ The following details the behavior of the class based on the environment variabl ...@@ -23,10 +23,9 @@ The following details the behavior of the class based on the environment variabl
* **Livestreaming**: If the environment variable ``LIVESTREAM={1,2}`` , then `livestream`_ is enabled. Any * **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. of the livestream modes being true forces the app to run in headless mode.
* ``LIVESTREAM=1`` [DEPRECATED] enables streaming via the Isaac `Native Livestream`_ extension. This allows users to * ``LIVESTREAM=1`` enables streaming via the `WebRTC Livestream`_ extension over **public networks**. This allows users to
connect through the Omniverse Streaming Client. This method is deprecated from Isaac Sim 4.5. Please use the WebRTC connect through the WebRTC Client using the WebRTC protocol.
livestreaming instead. * ``LIVESTREAM=2`` enables streaming via the `WebRTC Livestream`_ extension over **private and local networks**. This allows users to
* ``LIVESTREAM=2`` enables streaming via the `WebRTC Livestream`_ extension. This allows users to
connect through the WebRTC Client using the WebRTC protocol. connect through the WebRTC Client using the WebRTC protocol.
.. note:: .. note::
...@@ -55,16 +54,16 @@ To set the environment variables, one can use the following command in the termi ...@@ -55,16 +54,16 @@ To set the environment variables, one can use the following command in the termi
.. code:: bash .. code:: bash
export REMOTE_DEPLOYMENT=3 export LIVESTREAM=2
export ENABLE_CAMERAS=1 export ENABLE_CAMERAS=1
# run the python script # run the python script
./isaaclab.sh -p scripts/demo/play_quadrupeds.py ./isaaclab.sh -p scripts/demos/quadrupeds.py
Alternatively, one can set the environment variables to the python script directly: Alternatively, one can set the environment variables to the python script directly:
.. code:: bash .. code:: bash
REMOTE_DEPLOYMENT=3 ENABLE_CAMERAS=1 ./isaaclab.sh -p scripts/demo/play_quadrupeds.py LIVESTREAM=2 ENABLE_CAMERAS=1 ./isaaclab.sh -p scripts/demos/quadrupeds.py
Overriding the environment variables Overriding the environment variables
...@@ -113,5 +112,4 @@ Simulation App Launcher ...@@ -113,5 +112,4 @@ Simulation App Launcher
.. _livestream: https://docs.omniverse.nvidia.com/app_isaacsim/app_isaacsim/manual_livestream_clients.html .. _livestream: https://docs.omniverse.nvidia.com/app_isaacsim/app_isaacsim/manual_livestream_clients.html
.. _`Native Livestream`: https://docs.isaacsim.omniverse.nvidia.com/latest/installation/manual_livestream_clients.html#omniverse-streaming-client-deprecated
.. _`WebRTC Livestream`: https://docs.isaacsim.omniverse.nvidia.com/latest/installation/manual_livestream_clients.html#isaac-sim-short-webrtc-streaming-client .. _`WebRTC Livestream`: https://docs.isaacsim.omniverse.nvidia.com/latest/installation/manual_livestream_clients.html#isaac-sim-short-webrtc-streaming-client
...@@ -11,6 +11,8 @@ Breaking Changes ...@@ -11,6 +11,8 @@ Breaking Changes
---------------- ----------------
* :attr:`~isaaclab.sim.spawners.PhysicsMaterialCfg.improve_patch_friction` is now removed. The simulation will always behave as if this attribute is set to true. * :attr:`~isaaclab.sim.spawners.PhysicsMaterialCfg.improve_patch_friction` is now removed. The simulation will always behave as if this attribute is set to true.
* Native Livestreaming support has been removed. ``LIVESTREAM=1`` can now be used for WebRTC streaming over public networks and
``LIVESTREAM=2`` for private and local networks with WebRTC streaming.
v2.1.0 v2.1.0
====== ======
......
...@@ -281,7 +281,7 @@ Changed ...@@ -281,7 +281,7 @@ Changed
:meth:`~isaaclab.utils.math.quat_apply` and :meth:`~isaaclab.utils.math.quat_apply_inverse` for speed. :meth:`~isaaclab.utils.math.quat_apply` and :meth:`~isaaclab.utils.math.quat_apply_inverse` for speed.
0.40.10 (2025-05-19) 0.40.11 (2025-05-19)
~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
Fixed Fixed
...@@ -291,8 +291,8 @@ Fixed ...@@ -291,8 +291,8 @@ Fixed
of assets and sensors.used from the experience files and the double definition is removed. of assets and sensors.used from the experience files and the double definition is removed.
0.40.9 (2025-01-30) 0.40.10 (2025-01-30)
~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
Added Added
^^^^^ ^^^^^
...@@ -301,7 +301,7 @@ Added ...@@ -301,7 +301,7 @@ Added
in the simulation. in the simulation.
0.40.8 (2025-05-16) 0.40.9 (2025-05-16)
~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
Added Added
...@@ -316,7 +316,7 @@ Changed ...@@ -316,7 +316,7 @@ Changed
resampling call. resampling call.
0.40.7 (2025-05-16) 0.40.8 (2025-05-16)
~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
Fixed Fixed
...@@ -325,7 +325,7 @@ Fixed ...@@ -325,7 +325,7 @@ Fixed
* Fixed penetration issue for negative border height in :class:`~isaaclab.terrains.terrain_generator.TerrainGeneratorCfg`. * Fixed penetration issue for negative border height in :class:`~isaaclab.terrains.terrain_generator.TerrainGeneratorCfg`.
0.40.6 (2025-05-20) 0.40.7 (2025-05-20)
~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
Changed Changed
...@@ -340,7 +340,7 @@ Added ...@@ -340,7 +340,7 @@ Added
* Added :meth:`~isaaclab.utils.math.rigid_body_twist_transform` * Added :meth:`~isaaclab.utils.math.rigid_body_twist_transform`
0.40.5 (2025-05-15) 0.40.6 (2025-05-15)
~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
Fixed Fixed
...@@ -354,14 +354,23 @@ Fixed ...@@ -354,14 +354,23 @@ Fixed
unused USD camera parameters. unused USD camera parameters.
0.40.4 (2025-05-14) 0.40.5 (2025-05-14)
~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
* Added a new attribute :attr:`articulation_root_prim_path` to the :class:`~isaaclab.assets.ArticulationCfg` class * Added a new attribute :attr:`articulation_root_prim_path` to the :class:`~isaaclab.assets.ArticulationCfg` class
to allow explicitly specifying the prim path of the articulation root. to allow explicitly specifying the prim path of the articulation root.
0.40.3 (2025-05-14) 0.40.4 (2025-05-14)
~~~~~~~~~~~~~~~~~~~
Changed
^^^^^^^
* Changed livestreaming options to use ``LIVESTREAM=1`` for WebRTC over public networks and ``LIVESTREAM=2`` for WebRTC over private networks.
0.40.3 (2025-05-20)
~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
Changed Changed
......
...@@ -19,7 +19,6 @@ import re ...@@ -19,7 +19,6 @@ import re
import signal import signal
import sys import sys
import toml import toml
import warnings
from typing import Any, Literal from typing import Any, Literal
import flatdict import flatdict
...@@ -112,7 +111,7 @@ class AppLauncher: ...@@ -112,7 +111,7 @@ class AppLauncher:
# Define config members that are read from env-vars or keyword args # Define config members that are read from env-vars or keyword args
self._headless: bool # 0: GUI, 1: Headless self._headless: bool # 0: GUI, 1: Headless
self._livestream: Literal[0, 1, 2] # 0: Disabled, 1: Native, 2: WebRTC self._livestream: Literal[0, 1, 2] # 0: Disabled, 1: WebRTC public, 2: WebRTC private
self._offscreen_render: bool # 0: Disabled, 1: Enabled self._offscreen_render: bool # 0: Disabled, 1: Enabled
self._sim_experience_file: str # Experience file to load self._sim_experience_file: str # Experience file to load
...@@ -196,8 +195,8 @@ class AppLauncher: ...@@ -196,8 +195,8 @@ class AppLauncher:
Valid options are: Valid options are:
- ``0``: Disabled - ``0``: Disabled
- ``1``: `Native [DEPRECATED] <https://docs.isaacsim.omniverse.nvidia.com/latest/installation/manual_livestream_clients.html#omniverse-streaming-client-deprecated>`_ - ``1``: `WebRTC <https://docs.isaacsim.omniverse.nvidia.com/latest/installation/manual_livestream_clients.html#isaac-sim-short-webrtc-streaming-client>`_ over public network
- ``2``: `WebRTC <https://docs.isaacsim.omniverse.nvidia.com/latest/installation/manual_livestream_clients.html#isaac-sim-short-webrtc-streaming-client>`_ - ``2``: `WebRTC <https://docs.isaacsim.omniverse.nvidia.com/latest/installation/manual_livestream_clients.html#isaac-sim-short-webrtc-streaming-client>`_ over local/private network
* ``enable_cameras`` (bool): If True, the app will enable camera sensors and render them, even when in * ``enable_cameras`` (bool): If True, the app will enable camera sensors and render them, even when in
headless mode. This flag must be set to True if the environments contains any camera sensors. headless mode. This flag must be set to True if the environments contains any camera sensors.
...@@ -501,29 +500,26 @@ class AppLauncher: ...@@ -501,29 +500,26 @@ class AppLauncher:
else: else:
self._livestream = livestream_env self._livestream = livestream_env
# Set public IP address of a remote instance
public_ip_env = os.environ.get("PUBLIC_IP", "127.0.0.1")
# Process livestream here before launching kit because some of the extensions only work when launched with the kit file # Process livestream here before launching kit because some of the extensions only work when launched with the kit file
self._livestream_args = [] self._livestream_args = []
if self._livestream >= 1: if self._livestream >= 1:
# Note: Only one livestream extension can be enabled at a time # Note: Only one livestream extension can be enabled at a time
if self._livestream == 1: if self._livestream == 1:
warnings.warn( # WebRTC public network
"Native Livestream is deprecated. Please use WebRTC Livestream instead with --livestream 2."
)
self._livestream_args += [ self._livestream_args += [
'--/app/livestream/proto="ws"', f"--/app/livestream/publicEndpointAddress={public_ip_env}",
"--/app/livestream/allowResize=true", "--/app/livestream/port=49100",
"--enable",
"omni.kit.livestream.core-4.1.2",
"--enable",
"omni.kit.livestream.native-5.0.1",
"--enable", "--enable",
"omni.kit.streamsdk.plugins-4.1.1", "omni.services.livestream.nvcf",
] ]
elif self._livestream == 2: elif self._livestream == 2:
# WebRTC private network
self._livestream_args += [ self._livestream_args += [
"--/app/livestream/allowResize=false",
"--enable", "--enable",
"omni.kit.livestream.webrtc", "omni.services.livestream.nvcf",
] ]
else: else:
raise ValueError(f"Invalid value for livestream: {self._livestream}. Expected: 1, 2 .") raise ValueError(f"Invalid value for livestream: {self._livestream}. Expected: 1, 2 .")
...@@ -718,37 +714,6 @@ class AppLauncher: ...@@ -718,37 +714,6 @@ class AppLauncher:
" The file does not exist." " The file does not exist."
) )
# Set public IP address of a remote instance
public_ip_env = os.environ.get("PUBLIC_IP", "127.0.0.1")
# Process livestream here before launching kit because some of the extensions only work when launched with the kit file
self._livestream_args = []
if self._livestream >= 1:
# Note: Only one livestream extension can be enabled at a time
if self._livestream == 1:
warnings.warn(
"Native Livestream is deprecated. Please use WebRTC Livestream instead with --livestream 2."
)
self._livestream_args += [
'--/app/livestream/proto="ws"',
"--/app/livestream/allowResize=true",
"--enable",
"omni.kit.livestream.core-4.1.2",
"--enable",
"omni.kit.livestream.native-5.0.1",
"--enable",
"omni.kit.streamsdk.plugins-4.1.1",
]
elif self._livestream == 2:
self._livestream_args += [
f"--/app/livestream/publicEndpointAddress={public_ip_env}",
"--/app/livestream/port=49100",
"--enable",
"omni.services.livestream.nvcf",
]
else:
raise ValueError(f"Invalid value for livestream: {self._livestream}. Expected: 1, 2 .")
sys.argv += self._livestream_args
# Resolve the absolute path of the experience file # Resolve the absolute path of the experience file
self._sim_experience_file = os.path.abspath(self._sim_experience_file) self._sim_experience_file = os.path.abspath(self._sim_experience_file)
print(f"[INFO][AppLauncher]: Loading experience file: {self._sim_experience_file}") print(f"[INFO][AppLauncher]: Loading experience file: {self._sim_experience_file}")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment