Skip to content

feat(teleop): add PICO WebXR body tracking - #3695

Merged
TomCC7 merged 29 commits into
mainfrom
cc/feat/pico-bodypose
Sep 16, 2026
Merged

TomCC7 merged 29 commits into
mainfrom
cc/feat/pico-bodypose

Conversation

@TomCC7

@TomCC7 TomCC7 commented Aug 26, 2026

Copy link
Copy Markdown
Member

Contribution path

Problem

The renamed WebXR teleop stack has no way to request PICO body-tracking permission, decode the browser's joint poses, or inspect tracking health on hardware.

Solution

  • Add a device-neutral BodyTrackingSnapshot output and strict JSON decoder.
  • Keep body tracking off by default, with explicit optional and required WebXR session modes.
  • Capture XRFrame.body poses in bounded-floor space when available and fall back to local-floor.
  • Add a PICO API-test blueprint and live monitor without coupling body data to controller or viewer poses.
  • Accept PICO's six-button WebXR controller packets, where the platform-reserved menu button is omitted.

How to Test

Run the hardware-facing API test:

dimos run demo-pico-body-tracking

Automated checks run locally:

CI=1 uv run pytest dimos/teleop/webxr dimos/robot/test_all_blueprints_generation.py dimos/robot/test_all_blueprints.py -q
uv run ruff check dimos/teleop/webxr dimos/robot/all_blueprints.py
uv run ruff format --check dimos/teleop/webxr dimos/robot/all_blueprints.py
uv run --group lint mypy --disable-error-code=misc dimos/teleop/webxr
node --check dimos/teleop/webxr/web/static/teleop.js
node --check dimos/teleop/webxr/web/static/webxr_body.mjs

Result: 150 passed, 3 skipped, 40 deselected.

Physical PICO validation remains to be completed with the command above.

AI assistance

OpenAI Codex with GPT-5 implemented the change, resolved the parent rebase conflicts, and ran the checks. The author should review and understand the final diff before merge.

Checklist

  • I have read and approved the CLA.

@TomCC7 TomCC7 changed the title cc/feat/pico bodypose feat(teleop): add PICO WebXR body tracking Aug 26, 2026
@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.65753% with 1 line in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
dimos/teleop/webxr/module.py 98.59% 0 Missing and 1 partial ⚠️
@@            Coverage Diff             @@
##             main    #3695      +/-   ##
==========================================
+ Coverage   78.89%   78.96%   +0.06%     
==========================================
  Files        1469     1471       +2     
  Lines      138999   139279     +280     
  Branches    11941    12172     +231     
==========================================
+ Hits       109665   109975     +310     
+ Misses      25934    25903      -31     
- Partials     3400     3401       +1     
Components Coverage Δ
Tests 94.77% <100.00%> (+0.01%) ⬆️
Flag Coverage Δ
OS-ubuntu-24.04-arm 74.93% <99.65%> (+0.07%) ⬆️
OS-ubuntu-latest 75.63% <99.65%> (+0.07%) ⬆️
Py-3.10 75.40% <99.65%> (+0.07%) ⬆️
Py-3.11 75.61% <99.65%> (+0.07%) ⬆️
Py-3.12 75.61% <99.65%> (+0.07%) ⬆️
SelfHosted-Large 30.72% <23.97%> (-0.02%) ⬇️
SelfHosted-Linux 36.11% <23.97%> (-0.03%) ⬇️
SelfHosted-macOS 35.44% <23.97%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
dimos/robot/all_blueprints.py 100.00% <ø> (ø)
dimos/teleop/webxr/blueprints.py 100.00% <100.00%> (ø)
dimos/teleop/webxr/body_tracking.py 100.00% <100.00%> (ø)
dimos/teleop/webxr/controller_types.py 96.55% <100.00%> (+4.59%) ⬆️
dimos/teleop/webxr/test_blueprints.py 100.00% <100.00%> (ø)
dimos/teleop/webxr/test_body_tracking.py 100.00% <100.00%> (ø)
dimos/teleop/webxr/test_module.py 100.00% <100.00%> (ø)
dimos/utils/logging_config.py 81.20% <100.00%> (+1.34%) ⬆️
dimos/utils/test_logging_config.py 100.00% <100.00%> (ø)
dimos/teleop/webxr/module.py 81.03% <98.59%> (+10.01%) ⬆️

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@TomCC7
TomCC7 marked this pull request as ready for review August 26, 2026 07:41
@TomCC7
TomCC7 marked this pull request as draft August 26, 2026 07:41
@greptile-apps

greptile-apps Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

No blocking failure remains; the browser loaded and executed the updated WebXR client assets.

What we checked:

  • A headless browser session loaded /teleop and the teleop assets loaded successfully, with /static/teleop.js and /static/webxr_body.mjs returning 200 and window.connect defined after module evaluation. T-Rex
  • A controlled import-change test substituted the relative import with a missing module, which yielded GET /static/missing_webxr_body.mjs as 404 and window.connect undefined, confirming the current successful load depends on the existing static dependency. T-Rex
  • A review of teleop.js:8 corroborated that there is no vulnerability and the suggested P1 regression is disproved. T-Rex

Summary

  • This update adds configurable PICO WebXR body-tracking capture, heartbeat reporting, monitoring, and shared-memory attachment hardening. A browser check confirmed that the teleoperation page loads /static/webxr_body.mjs successfully and that the client module executes. No blocking failure remains.
  • Merge safety: safe to merge.

Reviews (6) · Last reviewed commit: "fix(shm): reject zero-sized attachment h..."

Comment thread dimos/teleop/webxr/blueprints.py Outdated
Comment thread dimos/teleop/webxr/body_tracking.py Outdated
Comment thread dimos/teleop/webxr/body_tracking_monitor.py Outdated
Comment thread dimos/teleop/webxr/controller_types.py Outdated
Comment thread dimos/teleop/webxr/module.py
@TomCC7
TomCC7 marked this pull request as ready for review August 26, 2026 19:25
@TomCC7
TomCC7 requested a review from aclauer as a code owner August 26, 2026 19:25
@TomCC7
TomCC7 requested a review from ruthwikdasyam August 26, 2026 19:26
@TomCC7
TomCC7 force-pushed the cc/feat/pico-bodypose branch from 07f3eb8 to 695122a Compare August 26, 2026 21:09
@TomCC7
TomCC7 marked this pull request as draft August 26, 2026 21:10
@TomCC7
TomCC7 marked this pull request as ready for review August 26, 2026 21:26
@TomCC7
TomCC7 force-pushed the cc/feat/pico-bodypose branch from 695122a to 6bcf67d Compare August 26, 2026 21:27
@TomCC7
TomCC7 marked this pull request as draft August 26, 2026 21:30
@TomCC7

TomCC7 commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

Addressed the Greptile P1 in 82d7bc6. WebXRControllerState now requires the six button slots it indexes while keeping the seventh menu button optional. A regression test sends a real five-button LCM Joy packet through WebXRTeleopModule and verifies the packet is rejected without escaping the callback, stale controller state is cleared, and zero velocity is published. Local verification: 54 WebXR tests passed; Ruff and mypy passed.

@TomCC7

TomCC7 commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

@greptileai please re-review the latest commit 82d7bc6. The prior P1 about short controller packets has been fixed and regression-tested.

@TomCC7
TomCC7 marked this pull request as ready for review August 27, 2026 00:13
Comment thread dimos/teleop/webxr/body_tracking_monitor.py Outdated
# Conflicts:
#	dimos/control/teleop_coordinator.py
#	dimos/robot/test_all_blueprints.py
#	dimos/teleop/webxr/blueprints.py
#	dimos/teleop/webxr/module.py
#	dimos/teleop/webxr/test_blueprints.py
#	dimos/teleop/webxr/test_module.py
#	dimos/teleop/webxr/web/static/teleop.js
@TomCC7

TomCC7 commented Sep 12, 2026

Copy link
Copy Markdown
Member Author

@greptileai please re-review the latest commit 23e047e. The branch now includes current main, explicit body-tracking heartbeats, and the SHM race fix.

— Codex (AI agent)

@github-actions github-actions Bot added the ready-to-merge Required CI checks have passed on this PR label Sep 12, 2026
Comment thread dimos/teleop/webxr/body_tracking_monitor.py Outdated
@github-actions github-actions Bot removed the ready-to-merge Required CI checks have passed on this PR label Sep 12, 2026
@TomCC7 TomCC7 added the backport:skip Skip creating a backport to any release branches label Sep 12, 2026
@github-actions github-actions Bot added the ready-to-merge Required CI checks have passed on this PR label Sep 12, 2026
@github-actions github-actions Bot removed the ready-to-merge Required CI checks have passed on this PR label Sep 14, 2026
mustafab0
mustafab0 previously approved these changes Sep 15, 2026
@github-actions github-actions Bot added the ready-to-merge Required CI checks have passed on this PR label Sep 15, 2026
@TomCC7 TomCC7 added backport release/0.0.14 and removed backport:skip Skip creating a backport to any release branches labels Sep 16, 2026
@TomCC7
TomCC7 added this pull request to the merge queue Sep 16, 2026
Merged via the queue into main with commit 180b252 Sep 16, 2026
38 checks passed
@TomCC7
TomCC7 deleted the cc/feat/pico-bodypose branch September 16, 2026 00:42
@github-actions

Copy link
Copy Markdown
Contributor

Successfully created backport PR for release/0.0.14:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport release/0.0.14 ready-to-merge Required CI checks have passed on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants