Deep-dive into AppLauncher
In this tutorial, we will dive into the app.AppLauncher class to configure the simulator using
CLI arguments and environment variables (envars). Particularly, we will demonstrate how to use
~app.AppLauncher to enable livestreaming and configure the isaacsim.simulation_app.SimulationApp
instance it wraps, while also allowing user-provided options.
The ~app.AppLauncher is a wrapper for ~isaacsim.simulation_app.SimulationApp to simplify
its configuration. The ~isaacsim.simulation_app.SimulationApp has many extensions that must be
loaded to enable different capabilities, and some of these extensions are order- and inter-dependent.
Additionally, there are startup options such as headless which must be set at instantiation time,
and which have an implied relationship with some extensions, e.g. the livestreaming extensions.
The ~app.AppLauncher presents an interface that can handle these extensions and startup
options in a portable manner across a variety of use cases. To achieve this, we offer CLI and envar
flags which can be merged with user-defined CLI args, while passing forward arguments intended
for ~isaacsim.simulation_app.SimulationApp.
The Code
The tutorial corresponds to the launch_app.py script in the
scripts/tutorials/00_sim directory.
The Code Explained
Adding arguments to the argparser
~app.AppLauncher is designed to be compatible with custom CLI args that users need for
their own scripts, while still providing a portable CLI interface.
In this tutorial, a standard argparse.ArgumentParser is instantiated and given the
script-specific --size argument, as well as the arguments --height and --width.
The latter are ingested by ~isaacsim.simulation_app.SimulationApp.
The argument --size is not used by ~app.AppLauncher, but will merge seamlessly
with the ~app.AppLauncher interface. In-script arguments can be merged with the
~app.AppLauncher interface via the ~app.AppLauncher.add_app_launcher_args method,
which will return a modified ~argparse.ArgumentParser with the ~app.AppLauncher
arguments appended. This can then be processed into an argparse.Namespace using the
standard argparse.ArgumentParser.parse_args method and passed directly to
~app.AppLauncher for instantiation.
The above only illustrates only one of several ways of passing arguments to ~app.AppLauncher.
Please consult its documentation page to see further options.
Understanding the output of —help
While executing the script, we can pass the --help argument and see the combined outputs of the
custom arguments and those from ~app.AppLauncher.
This readout details the --size, --height, and --width arguments defined in the script directly,
as well as the ~app.AppLauncher arguments.
The [INFO] messages preceding the help output also reads out which of these arguments are going
to be interpreted as arguments to the ~isaacsim.simulation_app.SimulationApp instance which the
~app.AppLauncher class wraps. In this case, it is --height and --width. These
are classified as such because they match the name and type of an argument which can be processed
by ~isaacsim.simulation_app.SimulationApp. Please refer to the specification for such arguments
for more examples.
Using environment variables
As noted in the help message, the ~app.AppLauncher arguments (--livestream, --headless)
have corresponding environment variables (envar) as well. These are detailed in isaaclab.app
documentation. Providing any of these arguments through CLI is equivalent to running the script in a shell
environment where the corresponding envar is set.
The support for ~app.AppLauncher envars are simply a convenience to provide session-persistent
configurations, and can be set in the user’s ${HOME}/.bashrc for persistent settings between sessions.
In the case where these arguments are provided from the CLI, they will override their corresponding envar,
as we will demonstrate later in this tutorial.
These arguments can be used with any script that starts the simulation using ~app.AppLauncher,
with one exception, --enable_cameras. This setting sets the rendering pipeline to use the
offscreen renderer. However, this setting is only compatible with the isaaclab.sim.SimulationContext.
It will not work with Isaac Sim’s isaacsim.core.api.simulation_context.SimulationContext class.
For more information on this flag, please see the ~app.AppLauncher API documentation.
The Code Execution
We will now run the example script:
This will spawn a 0.5m\ 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 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.

Now, let’s look at how ~app.AppLauncher handles conflicting commands:
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
be killed by pressing Ctrl+C in the launching terminal.
Finally, we will examine passing arguments to ~isaacsim.simulation_app.SimulationApp through
~app.AppLauncher:
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
want our simulation to be more performant. The process can be killed by pressing Ctrl+C in the launching
terminal.