Commit 12d46410 authored by Kelly Guo's avatar Kelly Guo Committed by Kelly Guo

Cleans up app file and updates livestream options (#186)

# Description

This PR cleans up settings applied in the app files and aligns them with
settings in Isaac Sim 4.5. In addition, new livestream versions and
documentation are updated to reflected changes in Isaac Sim 4.5.

## Type of change

<!-- As you go through the list, delete the ones that are not
applicable. -->

- Bug fix (non-breaking change which fixes an issue)
- This change requires a documentation update

## Checklist

- [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
- [x] 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
-->
parent da74b998
......@@ -280,23 +280,6 @@ The container defaults to ``FastRTPS``, but ``CylconeDDS`` is also supported. Ea
:language: bash
Known Issues
------------
WebRTC Streaming
~~~~~~~~~~~~~~~~
When streaming the GUI from Isaac Sim, there are `several streaming clients`_ available. There is a `known issue`_ when
attempting to use WebRTC streaming client on Google Chrome and Safari while running Isaac Sim inside a container.
To avoid this problem, we suggest using the Native Streaming Client or using the
Mozilla Firefox browser on which WebRTC works.
Streaming is the only supported method for visualizing the Isaac GUI from within the container. The Omniverse Streaming Client
is freely available from the Omniverse app, and is easy to use. The other streaming methods similarly require only a web browser.
If users want to use X11 forwarding in order to have the apps behave as local GUI windows, they can uncomment the relevant portions
in docker-compose.yaml.
.. _`NVIDIA Omniverse EULA`: https://docs.omniverse.nvidia.com/platform/latest/common/NVIDIA_Omniverse_License_Agreement.html
.. _`container installation`: https://docs.omniverse.nvidia.com/isaacsim/latest/installation/install_container.html
.. _`Docker website`: https://docs.docker.com/desktop/install/linux-install/
......
......@@ -136,11 +136,11 @@ We will now run the example script:
.. code-block:: console
LIVESTREAM=1 ./isaaclab.sh -p source/standalone/tutorials/00_sim/launch_app.py --size 0.5
LIVESTREAM=2 ./isaaclab.sh -p source/standalone/tutorials/00_sim/launch_app.py --size 0.5
This will spawn a 0.5m\ :sup:`3` volume cuboid in the simulation. No GUI will appear, equivalent
to if we had passed the ``--headless`` flag because headlessness is implied by our ``LIVESTREAM``
envar. If a visualization is desired, we could get one via Isaac's `Native Livestreaming`_. Streaming
envar. If a visualization is desired, we could get one via Isaac's `WebRTC Livestreaming`_. Streaming
is currently the only supported method of visualization from within the container. The
process can be killed by pressing ``Ctrl+C`` in the launching terminal.
......@@ -153,7 +153,7 @@ Now, let's look at how :class:`~app.AppLauncher` handles conflicting commands:
.. code-block:: console
LIVESTREAM=0 ./isaaclab.sh -p source/standalone/tutorials/00_sim/launch_app.py --size 0.5 --livestream 1
LIVESTREAM=0 ./isaaclab.sh -p source/standalone/tutorials/00_sim/launch_app.py --size 0.5 --livestream 2
This will cause the same behavior as in the previous run, because although we have set ``LIVESTREAM=0``
in our envars, CLI args such as ``--livestream`` take precedence in determining behavior. The process can
......@@ -164,7 +164,7 @@ Finally, we will examine passing arguments to :class:`~isaacsim.simulation_app.S
.. code-block:: console
LIVESTREAM=1 ./isaaclab.sh -p source/standalone/tutorials/00_sim/launch_app.py --size 0.5 --width 1920 --height 1080
LIVESTREAM=2 ./isaaclab.sh -p source/standalone/tutorials/00_sim/launch_app.py --size 0.5 --width 1920 --height 1080
This will cause the same behavior as before, but now the viewport will be rendered at 1920x1080p resolution.
This can be useful when we want to gather high-resolution video, or we can specify a lower resolution if we
......@@ -173,4 +173,4 @@ terminal.
.. _specification: https://docs.omniverse.nvidia.com/py/isaacsim/source/extensions/isaacsim.simulation_app/docs/index.html#isaacsim.simulation_app.SimulationApp.DEFAULT_LAUNCHER_CONFIG
.. _Native Livestreaming: https://docs.omniverse.nvidia.com/isaacsim/latest/installation/manual_livestream_clients.html#omniverse-streaming-client
.. _WebRTC Livestreaming: https://docs.omniverse.nvidia.com/isaacsim/latest/installation/manual_livestream_clients.html#isaac-sim-short-webrtc-streaming-client
......@@ -30,17 +30,12 @@ app.version = "4.5.0"
[settings]
renderer.active = "rtx"
app.content.emptyStageOnStart = false
# Disable print outs on extension startup information
# this only disables the app print_and_log function
app.enableStdoutOutput = false
# Setting the port for the embedded http server
exts."omni.services.transport.server.http".port = 8211
# default viewport is fill
app.runLoops.rendering_0.fillResolution = false
exts."omni.kit.window.viewport".blockingGetViewportDrawable = false
......@@ -56,32 +51,6 @@ persistent = true
dev_build = false
fabricDefaultStageFrameHistoryCount = 3 # needed for omni.syntheticdata TODO105 still true?
[settings.app.window]
title = "Isaac Sim"
hideUi = false
_iconSize = 256
iconPath = "${omni.isaac.app.setup}/data/omni.isaac.sim.png"
# width = 1700
# height = 900
# x = -1
# y = -1
# Fonts
[setting.app.font]
file = "${fonts}/OpenSans-SemiBold.ttf"
size = 16
# [setting.app.runLoops]
# main.rateLimitEnabled = false
# main.rateLimitFrequency = 60
# main.rateLimitUseBusyLoop = false
# rendering_0.rateLimitEnabled = false
[settings.exts.'omni.kit.window.extensions']
# List extensions here we want to show as featured when extension manager is opened
featuredExts = []
[settings.app.python]
# These disable the kit app from also printing out python output, which gets confusing
interceptSysStdOutput = false
......@@ -113,12 +82,6 @@ app.vulkan = true
exts."omni.kit.window.extensions".hideNonToggleableExts = true
exts."omni.kit.window.extensions".showFeatureOnly = false
# Hang Detector
################################
# app.hangDetector.enabled = false
# app.hangDetector.timeout = 120
# set the default ros bridge to disable on startup
isaac.startup.ros_bridge_extension = ""
......@@ -126,7 +89,7 @@ isaac.startup.ros_bridge_extension = ""
###############################
[settings.exts."omni.kit.registry.nucleus"]
registries = [
{ name = "kit/default", url = "https://ovextensionsprod.blob.core.windows.net/exts/kit/prod/shared" },
{ name = "kit/default", url = "https://ovextensionsprod.blob.core.windows.net/exts/kit/prod/106/shared" },
{ name = "kit/sdk", url = "https://ovextensionsprod.blob.core.windows.net/exts/kit/prod/sdk/${kit_version_short}/${kit_git_hash}" },
{ name = "kit/community", url = "https://dw290v42wisod.cloudfront.net/exts/kit/community" },
]
......@@ -135,51 +98,9 @@ registries = [
skipPublishVerification = false
registryEnabled = true
[settings.exts."omni.kit.window.modifier.titlebar"]
titleFormatString = " Isaac Sim {version:${app}/../SHORT_VERSION,font_color=0x909090,font_size=16} {separator} {file, board=true}"
showFileFullPath = true
icon.file = "${app}/../exts/omni.isaac.app.setup/data/nvidia-omniverse-isaacsim.ico"
icon.size = 256
defaultFont.name = "Arial"
defaultFont.size = 16
defaultFont.color = 0xD0D0D0
separator.color = 0x00B976
separator.width = 1
windowBorder.color = 0x0F0F0F
windowBorder.width = 2
colors.caption = 0x0F0F0F
colors.client = 0x0F0F0F
respondOnMouseUp = true
changeWindowRegion = true
[settings.crashreporter.data]
experience = "Isaac Sim"
# Isaac Sim Settings
###############################
[settings.app.renderer]
skipWhileMinimized = false
sleepMsOnFocus = 0
sleepMsOutOfFocus = 0
resolution.width=1280
resolution.height=720
# default camera position in meters
[settings.app.viewport]
defaultCamPos.x = 5
defaultCamPos.y = 5
defaultCamPos.z = 5
[settings.rtx]
raytracing.fractionalCutoutOpacity = false
hydra.enableSemanticSchema = true
mdltranslator.mdlDistilling = false
# descriptorSets=60000
# reservedDescriptors=500000
# sceneDb.maxInstances=1000000
# Enable this for static scenes, improves visual quality
# directLighting.sampledLighting.enabled = true
[settings.persistent]
app.file.recentFiles = []
app.stage.upAxis = "Z"
......
......@@ -94,7 +94,7 @@ exts."omni.replicator.core".Orchestrator.enabled = false
[settings.exts."omni.kit.registry.nucleus"]
registries = [
{ name = "kit/default", url = "https://ovextensionsprod.blob.core.windows.net/exts/kit/prod/shared" },
{ name = "kit/default", url = "https://ovextensionsprod.blob.core.windows.net/exts/kit/prod/106/shared" },
{ name = "kit/sdk", url = "https://ovextensionsprod.blob.core.windows.net/exts/kit/prod/sdk/${kit_version_short}/${kit_git_hash}" },
{ name = "kit/community", url = "https://dw290v42wisod.cloudfront.net/exts/kit/community" },
]
......
This diff is collapsed.
......@@ -105,7 +105,7 @@ fabricUpdateJointStates = false
[settings.exts."omni.kit.registry.nucleus"]
registries = [
{ name = "kit/default", url = "https://ovextensionsprod.blob.core.windows.net/exts/kit/prod/shared" },
{ name = "kit/default", url = "https://ovextensionsprod.blob.core.windows.net/exts/kit/prod/106/shared" },
{ name = "kit/sdk", url = "https://ovextensionsprod.blob.core.windows.net/exts/kit/prod/sdk/${kit_version_short}/${kit_git_hash}" },
{ name = "kit/community", url = "https://dw290v42wisod.cloudfront.net/exts/kit/community" },
]
......
......@@ -18,6 +18,7 @@ import os
import re
import signal
import sys
import warnings
from typing import Any, Literal
with contextlib.suppress(ModuleNotFoundError):
......@@ -161,8 +162,8 @@ class AppLauncher:
Valid options are:
- ``0``: Disabled
- ``1``: `Native <https://docs.omniverse.nvidia.com/extensions/latest/ext_livestream/native.html>`_
- ``2``: `WebRTC <https://docs.omniverse.nvidia.com/extensions/latest/ext_livestream/webrtc.html>`_
- ``1``: `Native [DEPRECATED] <https://docs.omniverse.nvidia.com/isaacsim/latest/installation/manual_livestream_clients.html#omniverse-streaming-client-deprecated>`_
- ``2``: `WebRTC <https://docs.omniverse.nvidia.com/isaacsim/latest/installation/manual_livestream_clients.html#isaac-sim-short-webrtc-streaming-client>`_
* ``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.
......@@ -527,7 +528,7 @@ class AppLauncher:
os.environ["PXR_WORK_THREAD_LIMIT"] = str(num_threads_per_process)
os.environ["OPENBLAS_NUM_THREADS"] = str(num_threads_per_process)
# pass command line variable to kit
sys.argv.append(f"--/plugins/carb.tasking.plugin/threadCount={num_threads_per_process}")
self._kit_args.append(f"--/plugins/carb.tasking.plugin/threadCount={num_threads_per_process}")
# set physics and rendering device
launcher_args["physics_gpu"] = self.device_id
......@@ -573,6 +574,38 @@ class AppLauncher:
" The file does not exist."
)
# Process livestream here before launching kit because some of the extensions only work when launched with the kit file
if self._livestream >= 1:
livestream_args = []
# 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."
)
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:
livestream_args += [
"--/app/livestream/allowResize=false",
"--enable",
"omni.kit.livestream.core-6.1.0",
"--enable",
"omni.kit.livestream.webrtc-6.0.0",
"--enable",
"omni.kit.streamsdk.plugins-6.1.7",
]
else:
raise ValueError(f"Invalid value for livestream: {self._livestream}. Expected: 1, 2 .")
sys.argv += livestream_args
# Resolve additional arguments passed to Kit
self._kit_args = []
if "kit_args" in launcher_args:
......@@ -631,37 +664,10 @@ class AppLauncher:
# These have to be loaded after SimulationApp is initialized
import carb
import omni.physx.bindings._physx as physx_impl
from isaacsim.core.utils.extensions import enable_extension
# Retrieve carb settings for modification
carb_settings_iface = carb.settings.get_settings()
if self._livestream >= 1:
# Ensure that a viewport exists in case an experience has been
# loaded which does not load it by default
enable_extension("omni.kit.viewport.window")
# Set carb settings to allow for livestreaming
carb_settings_iface.set_bool("/app/livestream/enabled", True)
carb_settings_iface.set_bool("/app/window/drawMouse", True)
carb_settings_iface.set_bool("/ngx/enabled", False)
carb_settings_iface.set_string("/app/livestream/proto", "ws")
carb_settings_iface.set_int("/app/livestream/websocket/framerate_limit", 120)
# Note: Only one livestream extension can be enabled at a time
if self._livestream == 1:
# Enable Native Livestream extension
# Default App: Streaming Client from the Omniverse Launcher
enable_extension("omni.kit.streamsdk.plugins-3.2.1")
enable_extension("omni.kit.livestream.core-3.2.0")
enable_extension("omni.kit.livestream.native-4.1.0")
elif self._livestream == 2:
# Enable WebRTC Livestream extension
# Default URL: http://localhost:8211/streaming/webrtc-client/
enable_extension("omni.services.streamclient.webrtc")
else:
raise ValueError(f"Invalid value for livestream: {self._livestream}. Expected: 1, 2 .")
else:
carb_settings_iface.set_bool("/app/livestream/enabled", False)
# set carb setting to indicate Isaac Lab's offscreen_render pipeline should be enabled
# this flag is used by the SimulationContext class to enable the offscreen_render pipeline
# when the render() method is called.
......
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