Skip to content

examples(deviceio_live_view): package under isaacteleop_examples - #1034

Merged
jiwenc-nv merged 3 commits into
mainfrom
jiwenc-nv/examples-deviceio-live-view
Aug 29, 2026
Merged

examples(deviceio_live_view): package under isaacteleop_examples#1034
jiwenc-nv merged 3 commits into
mainfrom
jiwenc-nv/examples-deviceio-live-view

Conversation

@jiwenc-nv

@jiwenc-nv jiwenc-nv commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Description

Part of #985; #1035 has landed. Split into three commits per review — the two preparation pieces stand on their own and can be read (or landed) without the conversion.

1. cmake: let install_python_example() take either example layoutexamples/README.md already tells authors to put pyproject.toml at the example root and call install_python_example(DESTINATION examples/<name>), but the macro only read python/pyproject.toml, so that call installed nothing usable. It now picks the layout by where pyproject.toml sits, which decides the find-links depth and whether python/ is installed as a directory or flattened. No example uses the converted layout at this commit, so it is a no-op; the legacy branch goes away with the last conversion.

2. examples: bind viser viewers to every interface by default@ivany-nv was right that a one-example flip was wrong, so this goes the other way and moves all eight. These viewers run where the headset is and get opened from a laptop elsewhere on the network; 127.0.0.1 means the one machine that cannot practically open the browser is the only one allowed to. The startup line now reports the address it actually bound, which was already wrong whenever --host was passed. The # noqa: S104 is gone — ruff selects no S rules here. --host 127.0.0.1 restores the old behaviour.

3. examples(deviceio_live_view): package under isaacteleop_examples — the conversion itself. live_deviceio.py imported its sibling as a top-level module, which resolved only because the invoked script's directory landed on sys.path; that breaks under python -m, breaks when the files are copied into another project — what the Physical AI Developer team hit — and squats the bare name deviceio_viser. Plus the grid fix: it lay in viser's default XY plane, which stands up as a wall under set_up_direction("+y").

uv pip install -e ./examples/deviceio_live_view
python -m isaacteleop_examples.deviceio_live_view

Still open from review: install_python_example() does not install the example-root README.md, which #1044 / #1036 / #1046 need. Happy to add the install(FILES ... OPTIONAL) to commit 1 — say the word.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Testing

x86_64 / Ubuntu, Python 3.12. uv build --wheel ./examples/deviceio_live_view ships isaacteleop_examples/deviceio_live_view/{__init__,__main__,deviceio_viser,live_deviceio}.py and nothing else — no namespace __init__.py, no bare top-level name. SKIP=check-copyright-year pre-commit run clean on every touched file; all nine example scripts byte-compile.

The macro body is byte-identical to the previously approved a916fca56 (that diff is comments only), so @ivany-nv's install-tree verification still applies. Not re-run: the full CMake install tree, and a live headset run.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the linter and formatter with SKIP=check-copyright-year pre-commit run --all-files
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix/feature works (or explained why not)
  • I have signed off all my commits (git commit -s) per the DCO

No new tests: this is a move plus a default flip, and neither example has automated coverage today (TODO(#880)). Verification is the wheel-layout check above plus a human run on a headset.

@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: bf94a5a5-0890-403e-823c-81dd1f32fe68

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: a561fa38-3bcc-4b23-9952-307adb97592b

📥 Commits

Reviewing files that changed from the base of the PR and between c5fe662 and 3aafcb4.

📒 Files selected for processing (7)
  • docs/source/references/mcap_record_replay.rst
  • examples/deviceio_live_view/README.md
  • examples/deviceio_live_view/python/isaacteleop_examples/deviceio_live_view/__init__.py
  • examples/deviceio_live_view/python/isaacteleop_examples/deviceio_live_view/__main__.py
  • examples/deviceio_live_view/python/isaacteleop_examples/deviceio_live_view/deviceio_viser.py
  • examples/deviceio_live_view/python/isaacteleop_examples/deviceio_live_view/live_deviceio.py
  • examples/deviceio_live_view/python/pyproject.toml

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.


📝 Walkthrough

Walkthrough

Adds a packaged DeviceIO Live View example. The example combines human-tracking outputs and renders hands, controllers, full-body joints, and head pose through viser. It handles absent, invalid, and untracked inputs. It adds module-based launching, Hatchling packaging, a README, and updated reference documentation.

Estimated code review effort: 4 (Complex) | ~45 minutes

Merge Risk: ⚪ Minimal · up to 3aafc

This PR reorganizes the example into a namespaced package and adds a module entry point without changing its behavior; the documented checks cover the packaging and import paths, so no actionable merge-blocking risk remains.

Sequence Diagram(s)

sequenceDiagram
  participant DeviceIO
  participant OutputCombiner
  participant HumanDeviceIOViz
  participant Viser
  DeviceIO->>OutputCombiner: provide tracking outputs
  OutputCombiner->>HumanDeviceIOViz: deliver combined data
  HumanDeviceIOViz->>Viser: update geometry and controller HUD
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 20 functions across 4 files. (3 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: packaging the deviceio_live_view example under the isaacteleop_examples namespace.
Full details: Docstring Coverage

Explanation

Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 20 functions across 4 files. (3 skipped: 3 unsupported.)

✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jiwenc-nv/examples-deviceio-live-view

Comment @coderabbitai help to get the list of available commands.

@jiwenc-nv
jiwenc-nv requested review from ivany-nv and nv-jakob August 28, 2026 04:15
@jiwenc-nv
jiwenc-nv force-pushed the jiwenc-nv/examples-deviceio-live-view branch from 437d7bd to 02aa0b7 Compare August 28, 2026 04:19
@jiwenc-nv
jiwenc-nv force-pushed the jiwenc-nv/examples-deviceio-live-view branch from 02aa0b7 to 529e458 Compare August 28, 2026 05:00
@jiwenc-nv
jiwenc-nv changed the base branch from main to jiwenc-nv/examples-convention August 28, 2026 05:01
@jiwenc-nv
jiwenc-nv force-pushed the jiwenc-nv/examples-deviceio-live-view branch 2 times, most recently from 623bc27 to e9b6e9b Compare August 28, 2026 05:31

@ivany-nv ivany-nv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Built and installed the full CMake install tree on x86_64 Linux, default prefix — the case the description lists as not covered. Re-verified on e9b6e9b9. Layout, generated pyproject, and uv run python -m isaacteleop_examples.deviceio_live_view --help from the install tree all check out: no doubled python/python/, no stray isaacteleop_examples/__init__.py, find-links resolves to <prefix>/wheels with the built wheel, isaacteleop pinned and resolved from there rather than an index, legacy examples install unchanged, clang_format_check and pre-commit clean.

One fix needed, in the macro: the example-root README.md is not installed, since install_python_example() only installs python/. No-op for deviceio_live_view, but three downstream examples ship python/README.md into the install tree today and lose it on conversion:

  • #1044rename from examples/haptic_feedback/python/README.md to examples/haptic_feedback/README.md
  • #1036examples/teleop_session_manager/python/README.md deleted
  • #1046examples/oxr/python/README.md deleted
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/README.md"
    DESTINATION ${_IPE_DESTINATION} OPTIONAL)

Here or in #1036, your call.

@jiwenc-nv
jiwenc-nv force-pushed the jiwenc-nv/examples-deviceio-live-view branch 2 times, most recently from a9205a6 to f8239a8 Compare August 28, 2026 05:48

@ivany-nv ivany-nv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approving for f8239a89. Re-ran the install-tree verification on the new head: layout, generated pyproject, uv run python -m isaacteleop_examples.deviceio_live_view --help from the install tree, clang_format_check and pre-commit all still clean. The macro is byte-identical, and the delta since e9b6e9b9 is runtime-only (GroundGrid), so nothing in the packaging conclusion changes.

The two open items from the previous review still stand: the example-root README.md is still not installed, and the --host default flip is still there.

Comment thread cmake/InstallPythonExample.cmake
Comment thread cmake/InstallPythonExample.cmake
Base automatically changed from jiwenc-nv/examples-convention to main August 28, 2026 23:49
@jiwenc-nv
jiwenc-nv force-pushed the jiwenc-nv/examples-deviceio-live-view branch 2 times, most recently from a916fca to 46e2a82 Compare August 29, 2026 00:10
examples/README.md tells example authors to put pyproject.toml at the example
root with sources under python/, and to install with
`install_python_example(DESTINATION examples/<name>)`. The macro only reads
python/pyproject.toml, so that call installs nothing usable.

Pick the layout by where pyproject.toml sits. Two things follow from it: the
`find-links` depth, which is relative to the installed pyproject, and whether
python/ is installed as a directory or flattened into the destination -- a
converted example must keep it so the namespace root matches the source tree.

No example uses the converted layout yet, so this is a no-op today. The legacy
branch goes away with the last conversion (#985).

Signed-off-by: Jiwen Cai <jiwenc@nvidia.com>
Every viser viewer in examples/ runs where the headset is -- a workstation or a
Jetson under the play space -- and gets opened from a laptop somewhere else on
the network. Binding 127.0.0.1 means the one machine that cannot practically
open the browser is the only one allowed to.

Flip the default on all eight, and make the startup line report the address it
actually bound instead of always printing localhost, which was already wrong
whenever --host was passed.

Pass --host 127.0.0.1 for the old behaviour.

Signed-off-by: Jiwen Cai <jiwenc@nvidia.com>
live_deviceio.py imported its sibling as a top-level module, which resolved
only because the invoked script's own directory landed on sys.path. That breaks
under `python -m`, breaks when the files are copied into another project, and
squats the bare name `deviceio_viser`. Adopt the layout examples/README.md
describes: a distribution owning isaacteleop_examples/<name>, relative imports,
a `-m` entry point, and pyproject.toml at the example root.

    uv pip install -e ./examples/deviceio_live_view
    python -m isaacteleop_examples.deviceio_live_view

Fix the grid while here. It lay in viser's default XY plane, which stands up as
a wall once the up direction is +y; it is now an xz ground plane that follows
the lowest tracked joint, so it lands on the floor in a head-relative space too,
with a camera framed against it.

First of the per-example conversions for #985.

Signed-off-by: Jiwen Cai <jiwenc@nvidia.com>
@jiwenc-nv
jiwenc-nv force-pushed the jiwenc-nv/examples-deviceio-live-view branch from 46e2a82 to e956e4d Compare August 29, 2026 00:21
@jiwenc-nv
jiwenc-nv merged commit e3bf792 into main Aug 29, 2026
50 of 63 checks passed
@jiwenc-nv
jiwenc-nv deleted the jiwenc-nv/examples-deviceio-live-view branch August 29, 2026 01:19
github-actions Bot added a commit that referenced this pull request Aug 29, 2026
jiwenc-nv added a commit that referenced this pull request Sep 8, 2026
…y default

Split out per review on #1038: these run on a robot or workstation and
get opened from a laptop, same rationale as #1034's viser default flip.
127.0.0.1 stays available via --host.

Signed-off-by: Jiwen Cai <jiwenc@nvidia.com>
jiwenc-nv added a commit that referenced this pull request Sep 12, 2026
common.py's GroundGrid (mcap_record_replay) and deviceio_viser.py's
(deviceio_live_view, landed on main via #1034) are byte-identical. Not
deduping: each example package is self-contained by design (see
examples/README.md), and a shared helper would make one example
depend on another. Leave a pointer in each copy instead of letting the
duplication look accidental.

Flagged by ivany-nv's verification pass on #1038.

Signed-off-by: Jiwen Cai <jiwenc@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants