Televiz#

Televiz is an example that shows a stereo camera in an XR headset so that the picture stays where the camera is looking. It tracks the camera’s orientation with cuVSLAM and shows the picture on a flat plane that turns with the camera and moves with your head. When a robot turns its head, the picture moves to where the robot now looks; when you turn your own head, it stays put.

Use it for a camera on something that moves on its own, such as a robot’s head. For a feed that is simply placed in front of you, use camera_viz (Camera Streaming).

The example lives at examples/televiz/. It opens its camera with the sources of camera_viz and draws with the visualization module (isaaccapture.viz). This page is the primary user guide for the example: setup, a first run without a camera, real cameras, configuration, and troubleshooting.

Requirements#

  • Ubuntu 22.04 or 24.04 on x86_64 with an NVIDIA GPU and the CUDA Toolkit 12 or 13; see the system requirements.

  • The tools for a source build of Isaac Capture: git, a C++ compiler, CMake, and make (sudo apt install git build-essential cmake), plus the prerequisites listed in Build from Source.

  • Camera — optional: a stereo camera from Running with a real camera. configs/synthetic.yaml draws one, so the first run needs none.

  • For the headset view, an XR headset to connect as the CloudXR client — follow the quick start step 5. Connect an XR headset. The example launches the CloudXR runtime itself. No headset handy? --mode window shows the view in a desktop window instead.

  • CloudXR setup: see Quick Start for first-launch requirements and firewall configuration.

Setup#

Run every command from the repository root.

  1. Isaac Capture. Build it from source with the visualization module (BUILD_VIZ, on when Vulkan and the CUDA Toolkit are detected) and install its wheel into .venv, following Build from Source through step 4. Activate that environment in every terminal you install or run from:

    source .venv/bin/activate
    
  2. The examples. The camera is opened by the code of camera_viz, so install both. The oakd extra adds depthai, which an OAK-D needs. --no-sources keeps the wheel installed (why):

    uv pip install -e "./examples/camera_viz[oakd]" --no-sources
    uv pip install -e ./examples/televiz --no-sources
    
  3. CuPy for CUDA 13. Only on a machine with the CUDA 13 Toolkit: the steps above install CuPy for CUDA 12, so swap it, and again whenever you reinstall the wheel or camera_viz:

    uv pip uninstall cupy-cuda12x
    uv pip install --reinstall-package cupy-cuda13x cupy-cuda13x
    
  4. cuVSLAM. It is not part of Isaac Capture. Read cuVSLAM first, which says what this command does and under which license:

    python -m isaaccapture_examples.televiz.fetch_cuvslam --accept-license
    
  5. Check the install. Run the first run below, which needs no camera and no headset.

  6. Your camera. A ZED needs its SDK’s Python API and an OAK-D a udev rule; see Running with a real camera.

Command overview#

One command runs the example. CONFIG is a YAML path, such as examples/televiz/configs/synthetic.yaml:

python -m isaaccapture_examples.televiz CONFIG [OPTIONS]

Option

Effect

--mode xr|window|none

Replace display.mode from the config; see Display modes.

--check

Resolve the config and print it and the pipeline, without starting anything. Needs no camera and no headset.

--stats S

Print each stage’s rate and latency every S seconds; see Statistics.

--max-runtime S

Stop the run after S seconds.

--verbose

Turn on debug logging.

--xr-wait S

In the headset mode, give up after S seconds without a headset. The default waits until one connects; 0 fails at once.

--accept-eula

Accept the CloudXR EULA non-interactively (first launch only).

--no-launch-cloudxr-runtime

Use the OpenXR runtime already configured in the process instead of attaching to or starting the CloudXR runtime.

--help lists the CloudXR launcher’s other options, such as --cloudxr-device-profile and --no-host-client. Ctrl+C stops the run.

First run — a drawn room, no camera required#

configs/synthetic.yaml names no hardware: camera_viz draws the camera, a pair of eyes that turns slowly in a furnished room (scene: room under Supported sources), and the tracker follows it. The run checks the install, the tracker, and the display.

Start without a display. This needs no headset and opens no window:

python -m isaaccapture_examples.televiz examples/televiz/configs/synthetic.yaml \
    --mode none --max-runtime 10 --stats 5

You should see both stages come up and then their rates, both about 60 Hz:

starting pipeline: camera:synthetic -> pose:cuvslam
camera:synthetic: 1280x720 rectified by the camera, 1280x720 out, fx=800.0 baseline=0.0630 m
pose:cuvslam tracks a 2x downsampled pair: 1280x720 -> 640x360
--- pipeline stats @ monotonic 1205058.7s ---
camera:synthetic   60.01 Hz  work   0.05 ms (p95   0.06)  wait   0.01 ms  age    0.0 ms (p95    0.1)  n=256
pose:cuvslam       60.01 Hz  work   0.38 ms (p95   0.48)  wait  16.22 ms  age    0.5 ms (p95    0.6)  n=256

Then run it in the headset, which is the default mode:

python -m isaaccapture_examples.televiz examples/televiz/configs/synthetic.yaml

The example attaches to the running CloudXR runtime, or starts one if none is serving (accept the EULA on first launch, or pass --accept-eula), and waits for the headset. Connect the headset as in 5. Connect an XR headset.

You should see an image plane 2 m in front of you. After two seconds it starts to swing left and right, nodding a little, as the drawn camera turns.

First-session checklist#

  • The plane follows the camera: it swings left and right as the drawn camera turns.

  • Head movement: turn your head; the plane stays where it is.

  • Leaning: lean or step sideways; the plane follows you, with no parallax. The view is stabilized in orientation only.

  • Recenter: press space in the terminal, or click the right controller’s stick; the plane comes back in front of you.

  • Controllers: push the left stick to resize the plane; Controller bindings lists the rest.

  • Restart: press Ctrl+C, rerun, and reconnect if needed.

If a check fails, see Troubleshooting.

Running with a real camera#

The tracker needs both eyes of one capture and a stereo calibration. Each camera has a config in configs/ to start from:

Camera

Config

Notes

A ZED stereo camera on USB

zed.yaml

Needs the ZED SDK, which also gives the calibration and the IMU.

An OAK-D on USB 3

oakd.yaml

A model ending in 97, whose colour camera is frame-synced with the stereo pair. The tracker runs on the mono pair; the picture is the colour camera’s, mono, at 45 fps.

A side-by-side stereo recording

replay.yaml

No recording is shipped: name your own, with its calibration file.

None: a drawn room

synthetic.yaml

The first run.

Attach the camera to the machine that runs the example and name its config:

python -m isaaccapture_examples.televiz examples/televiz/configs/zed.yaml

You should see an image plane 2 m in front of you, its orientation locked to the camera. Turn your head and it stays put in the world; rotate the camera and the plane rotates with it. With an IMU, the log first asks you to hold the camera still for two seconds while it measures gravity, so that the world is level whatever the camera’s tilt at start.

A camera that stops delivering ends the run with an error: three seconds without an image, or fifteen at start. When the tracker loses tracking, the picture holds its last pose and the log says so, and again when tracking is back.

ZED#

Install the ZED SDK on the machine, then its Python API into the environment. The SDK’s get_python_api.py downloads the wheel but installs it with pip, which a uv environment lacks, so from a directory outside this repository:

uv pip install requests
python /usr/local/zed/get_python_api.py
uv pip install ./pyzed-*.whl

The ZED SDK is not part of Isaac Capture and has its own license; see External materials.

OAK-D#

The machine needs the Luxonis udev rule; see OAK-D USB permissions. depthai itself comes with the oakd extra of step 2 in Setup.

A recording#

The recording is one video with the left and the right eye of each capture side by side, as captured (unrectified). In replay.yaml, set source.camera.path to it and source.calibration to its calibration file. A config whose recording is missing, or whose calibration file is missing or incomplete, is refused when it is loaded.

configs/calibrations/shw5g_calib.yaml shows the calibration format: K1, D1, K2, D2, R and T in OpenCV’s conventions, T in metres, and one eye’s image_width and image_height. Two frame-aligned recordings, one per eye, become one with:

ffmpeg -i left.mp4 -i right.mp4 -filter_complex hstack sbs.mp4

When a looped recording starts over, tracking starts over with it and the picture returns to where it was at the start.

The camera entry#

source.camera is one entry of camera_viz’s cameras: list, passed on as it is, so the keys described under Supported sources work here. An entry that does not give both eyes of one capture is refused: a single camera, a camera received over RTP, a single-view recording. View those with camera_viz. One camera is shown at a time.

Display modes#

display.mode in the config, or --mode on the command line, selects where the view goes:

Mode

Behavior

xr

The default. The plane is shown in the headset through the active OpenXR runtime; a stereo camera shows each eye its own image.

window

A desktop window shows the plane from outside, with a floor grid and a marker where the headset would be. Left-drag orbits, right-drag pans, scroll zooms, and R or the middle button resets the view. No headset or runtime is needed.

none

No display. The camera and the tracker run and print their rates.

Placement#

Where the picture sits is the placement section, in the keys of the display.placements block of camera_viz. Its lock_mode says how the picture follows you. In every mode but head the picture turns with the camera:

Mode

Behavior

gimbal

The default. The picture follows your position: turn your head and it stays where it is, lean or walk and it comes with you.

world

The picture stays where it was seated. Lean or walk and you move against it.

lazy

As world, and when you have looked away from the picture it glides back in front of you. That also happens when the camera turns and your head does not: the picture then sits in front of you and no longer where the camera looks, until the next recenter. The knobs are look_away_angle_deg, reposition_distance, reposition_delay_s and transition_duration_s.

head

The picture stays in front of your eyes and nothing is stabilized, as in camera_viz.

The picture is distance metres away, 2 by default. With size left out it covers the camera’s field of view at any distance, so what it shows keeps its true angular size. With size: [width, height] in metres it is a screen of that size, which looks smaller from farther away. A recenter seats the picture anew on the camera’s axis.

Controller bindings#

In the headset the controllers retune the view live, without editing the YAML and restarting. The configs in configs/ come with the layout of camera_viz bound. The right hand changes how the picture reads; the left, its size and height:

Televiz XR controller bindings: the left controller sets the picture's size and height and resets the view; the right controller sets depth, lock mode, mono or stereo, and recenters.

Bindings at a glance. The table below is the same thing in words.#

Input

Binding

Effect

Right stick ←/→

stereo_gap

The gap between the two eyes’ planes (placement.stereo_plane_distance_cm). Widening it sets the whole scene farther back. Stereo pictures only.

Right stick click

recenter

Puts the picture back in front of you.

A

lock_mode

Cycles the lock mode: world → head → gimbal → lazy.

B

mono_stereo

Shows both eyes the left image, or each eye its own again. Stereo pictures only.

Y

reset

Puts the view back to the YAML’s values: lock mode, size, height, gap and stereo.

Left stick ←/→

size

The picture’s size, with its aspect ratio kept.

Left stick ↑/↓

height

The picture’s height (placement.offset_y).

X is free: it cycles the shape in camera_viz, and this example has one. A change shows in the log and on a head-locked panel in the headset that hides again after about 2.5 seconds. Nothing is written back to the YAML.

The bindings are the bindings section. Each line gives one function its input, and the word none takes it away:

bindings:
  recenter: right_thumbstick       # click
  lock_mode: right_primary         # A
  mono_stereo: right_secondary     # B
  reset: left_secondary            # Y
  size: left_thumbstick_x
  height: left_thumbstick_y
  stereo_gap: right_thumbstick_x

A button is named by role: left_ or right_ followed by squeeze, trigger, primary, secondary or thumbstick, and left_menu. A stick axis is left_ or right_ followed by thumbstick_x or thumbstick_y.

Note

Controllers worn for teleoperation already give their buttons and sticks a meaning. In a config for such a rig, leave the bindings section out, which binds nothing, or keep what you need behind a held input: with hold: left_squeeze every binding acts only while the left grip is held.

How fast a held stick changes its value, and whether the panel is shown, is the controls section; Configuration lists its keys.

Recenter#

Recentering puts the picture back in front of you. Two inputs do it:

  • Space, in the terminal the example runs in or in the window of --mode window.

  • The controller input bound to recenter: a click of the right stick in the shipped configs.

The view also recenters by itself onto the first tracked pose, and when the headset’s own origin jumps, which is what a recenter on the client looks like to the example.

cuVSLAM#

The command in Setup installs cuVSLAM 17.0.1.

Where that release has a wheel for your Python and system, the command downloads the wheel, checks its SHA-256 and installs it. Today that is Python 3.12 on Ubuntu 24.04.

Otherwise it downloads the release’s C++ SDK archive and checks its SHA-256, clones cuVSLAM at tag v17.0.1 and checks the commit, then builds cuVSLAM’s Python package against the SDK and installs it. The build takes about 15 seconds and fetches its build tools, nanobind and scikit-build-core, at pinned versions from your package index. --build does this where there is a wheel too.

What it downloads is kept in ~/cuvslam (--prefix names another directory, outside this checkout): the wheel, or the SDK with cuVSLAM’s LICENSE file and the clone. It matches the CUDA version of the installed CuPy (--cuda 12 or --cuda 13 overrides that).

cuVSLAM is not part of Isaac Capture and is not distributed with it. It is licensed under the NVIDIA Community License, dated February 25, 2026, which includes a restriction to NVIDIA Platforms; --accept-license accepts it. This example’s Apache-2.0 license does not apply to cuVSLAM. Read External materials before running the script.

Configuration#

A single YAML drives the example. Every key is shown with its default; a section or key left out keeps it. An unknown key is an error, so a typo fails at startup instead of being ignored, and a relative path is resolved against the config file’s directory.

display:
  mode: xr                   # xr | window | none
  window_width: 1280         # window mode
  window_height: 720
  window_fov_deg: 70.0       # the window camera's vertical field of view

source:
  camera: {...}              # one entry of camera_viz's cameras: list
  calibration: ""            # stereo calibration YAML, for a camera that
                             # stores none
  rectify_alpha: 0.0         # for images the example rectifies. 0: zoom in
                             # until valid pixels fill the frame; 1: keep
                             # every source pixel; -1: use the rectification
                             # stored in the calibration file

pose:
  type: cuvslam              # cuvslam | none (none: display.mode none only)
  mode: slam                 # vo: odometry only, smooth but it drifts
                             # slam: odometry with loop closure
  downsample: 0              # of the pair the tracker reads; the picture
                             # keeps its resolution. 0: automatic, near
                             # VGA; 1: off; 2; 4
  sync: false                # slam: loop closure on the tracking thread

corrections:
  gravity_align_s: 2.0       # hold the first pose this long and level the
                             # world from the camera's IMU; 0 skips it, as
                             # does a camera without an IMU

placement:
  lock_mode: gimbal          # gimbal | world | lazy | head
  distance: 2.0              # metres from the viewer
  size: null                 # [width, height] in metres; null: the
                             # camera's field of view at that distance
  offset_x: 0.0              # metres to the right of straight ahead
  offset_y: 0.0              # metres up, both as the camera sees it
  look_away_angle_deg: 45.0  # lazy: looking this far away from the picture
  reposition_distance: 0.5   # or moving this many metres from its seat,
  reposition_delay_s: 0.5    # for this long, brings it back
  transition_duration_s: 0.3 # over this long
  stereo_plane_distance_cm: 0.0
                             # the gap between the two eyes' planes,
                             # within -10..10

render:
  stereo: true               # false: both eyes show the same image
  composition: openxr        # openxr: the runtime composites the plane
                             # builtin: the visualization module draws it,
                             # for a runtime that shows a native quad black

viewpoint:
  recenter_on_first_pose: true
  auto_relatch: true         # recenter when the headset's origin jumps
  auto_recenter_threshold_m: 0.0
                             # recenter when the head stays farther than
                             # this from the anchor; 0: off
  latch: gravity             # gravity: a recenter changes heading and
                             # position only, so it cannot tilt the world
                             # 6dof: match the full attitudes
  anchor_eye: left           # the eye placed at the camera's optical
                             # centre: left | right | midpoint

bindings:                    # none: no controller input
  hold: none                 # an input that must be held for the others
  recenter: none
  lock_mode: none
  mono_stereo: none
  reset: none
  size: none
  height: none
  stereo_gap: none

controls:
  hud: true                  # show a change on a panel in the headset
  deadzone: 0.2              # a stick this near its centre is at rest
  size_rate_m_per_s: 0.5     # what a stick held all the way changes
  offset_rate_m_per_s: 0.5   # in a second
  plane_distance_rate_cm_per_s: 2.0

pipeline:
  stats_interval_s: null     # seconds between statistics; --stats replaces it
  max_runtime_s: null        # --max-runtime replaces it
  stop_timeout_s: 5.0        # time the stages get to stop

A camera that is shown as the picture of its one colour sensor, such as the OAK-D of oakd.yaml, needs render.stereo: false, and anchor_eye: midpoint puts that picture between the eyes. python -m isaaccapture_examples.televiz CONFIG --check prints the resolved values. See the configs/ directory for a complete, commented YAML per camera.

Statistics#

With --stats S, or pipeline.stats_interval_s in the config, the example prints one line per stage every S seconds:

--- pipeline stats @ monotonic 1205058.7s ---
camera:synthetic   60.01 Hz  work   0.05 ms (p95   0.06)  wait   0.01 ms  age    0.0 ms (p95    0.1)  n=256
pose:cuvslam       60.01 Hz  work   0.38 ms (p95   0.48)  wait  16.22 ms  age    0.5 ms (p95    0.6)  n=256

Column

Meaning

Hz

Steps the stage completed per second.

work

Processing time of a step, from its input being in hand to its end: the mean, and the 95th percentile.

wait

The rest of the step, spent waiting on inputs or pacing.

age

How old the frame is when the stage is done with it: the latency accumulated up to and including this stage.

n

The number of steps the figures are taken over.

With a display, a third line, render:quad, gives the view; its age is the end-to-end latency. Lines that start with └ add what a stage counts: captures that were replaced before being read, frames without a pose, or the runtime’s frame-request rate.

Troubleshooting#

  • “the camera is opened by the camera_viz example, which is not in this environment” — install camera_viz into the same environment: step 2 of Setup.

  • “pose.type cuvslam needs the cuvslam Python package”, or “the installed cuvslam … has a different Python API” — run step 4 of Setup, which installs the release this example uses.

  • “the wheel could not be installed; –build builds the Python package instead” — rerun the command of step 4 with --build.

  • CuPy cannot load its CUDA libraries on a CUDA 13 machine — reinstalling the wheel or camera_viz brings back CuPy for CUDA 12; repeat step 3 of Setup.

  • “No module named ‘isaaccapture_examples’” — the environment is not active, or the example is not installed in it. Activate .venv and repeat step 2.

  • The run waits at “waiting for the headset to connect” — the runtime is up and no headset has connected yet; connect one as in 5. Connect an XR headset. --xr-wait S gives up after S seconds, and --mode window needs no headset. For a session that fails to create, see the CloudXR logs named under Troubleshooting.

  • “the display is on CUDA device N and the camera stages on device M” — on a machine with several GPUs, the camera stages must run on the GPU that drives the display. Set CUDA_VISIBLE_DEVICES to that GPU.

  • “camera … delivered nothing within 15 s of starting” — the camera did not open; its own messages are above the error. Check the cable and the port (USB 3 for an OAK-D), the udev rule for an OAK-D, and the SDK’s Python API for a ZED.

  • “source.camera: no recording at …” — replay.yaml ships without a recording; name your own in the entry’s path, relative to the YAML’s directory.

  • “this camera is shown as the picture of its one colour sensor, so render.stereo must be false” — set render.stereo: false, as oakd.yaml does.

  • “display.mode window needs a desktop session” — --mode window needs a local display; run on the machine you are sitting at.

  • “tracking lost: the picture holds its last pose until tracking is back” — the tracker lost the scene, for example with the lens covered or pointed at a blank wall. The picture resumes when tracking is back.

  • The world is tilted — the log warns when the camera moved while gravity was measured. Restart with the camera still for the first two seconds. A camera without an IMU is taken to be level at start.

  • The plane is black in the headset — a runtime that shows a native quad layer black needs render.composition: builtin.

  • “[MuJoCo] OpenGL error 0x502 in or before mjr_makeContext” — the drawn room can log this once at start. The room is still drawn; judge by the rates that follow.

  • Not sure which stage is slow? — run with --stats 5 and read Statistics.

How it works#

A run is a pipeline of stages, each on its own thread, that hand each other the newest result:

camera  ->  tracker  ->  view
televiz/
├── configs/               — one YAML per camera, and an example calibration
└── python/isaaccapture_examples/televiz/
    ├── app.py             — command line, CloudXR runtime, session, shutdown
    ├── fetch_cuvslam.py   — downloads, builds and installs cuVSLAM
    ├── pipeline/          — config, stage base, mailboxes, statistics, actions
    ├── sources/           — the camera stage and its rectification
    ├── stages/            — the tracker stage and the corrections to its pose
    └── render/            — the plane, the viewpoint, recenter, the window
  • The camera stage (sources/stereo_camera.py) hands source.camera to build_stereo_camera of camera_viz, which opens the camera or says why the entry is not a stereo camera. Images that the camera does not rectify are rectified here, on the camera’s GPU.

  • The tracker stage (stages/pose_cuvslam.py) runs cuVSLAM on the rectified gray pair, downsampled to near VGA, which tracks more stably than full resolution. The picture keeps its resolution.

  • Pose corrections (stages/pose_corrections.py) decide what is published from the tracker’s output: the up direction at start, measured from the IMU when there is one, and nothing while tracking is lost.

  • The view stage (render/quad_stage.py) joins each image to the pose of the same timestamp and places one flat plane: its orientation follows the camera and its position follows the head. In the headset the plane is a native OpenXR quad layer on a VizSession; the desktop window draws the same plane itself.

  • The viewpoint (render/viewpoint.py) owns the one transform between the tracker’s map and the headset’s world, which a recenter changes.

Tests#

tests/python/examples/televiz runs without a GPU, a camera, or a headset. After a source build:

ctest --test-dir build -L televiz --output-on-failure

External materials#

The cuVSLAM script and the ZED SDK’s get_python_api.py retrieve software from their own projects. Each keeps its own license; the Apache-2.0 license of Isaac Capture does not apply to it.

NOTICE AND DISCLAIMER: This software automatically retrieves, accesses or interacts with external materials. Those retrieved materials are not distributed with this software and are governed solely by separate terms, conditions and licenses. You are solely responsible for finding, reviewing and complying with all applicable terms, conditions, and licenses, and for verifying the security, integrity and suitability of any retrieved materials for your specific use case. This software is provided “AS IS”, without warranty of any kind. The author makes no representations or warranties regarding any retrieved materials, and assumes no liability for any losses, damages, liabilities or legal consequences from your use or inability to use this software or any retrieved materials. Use this software and the retrieved materials at your own risk.

Next steps#