feat(teleop): stream robot camera into Quest VR headset#2198
Conversation
Greptile SummaryThis PR adds robot camera streaming into the Meta Quest VR headset for teleop sessions. JPEG frames are encoded server-side via TurboJPEG, pushed as binary WebSocket messages, and rendered as a world-locked WebGL quad in the XR scene.
Confidence Score: 5/5Safe to merge; changes are additive (new blueprints and modules), the existing arm teleop path is untouched, and the client/server threading model is sound. All changed code paths are new (new module classes, new blueprints, new static files). The base QuestTeleopModule changes are minimal and correct (client-set tracking with a lock and a finally cleanup). The two observations flagged are style/performance notes with no incorrect runtime behavior on the current code paths. dimos/teleop/quest/quest_extensions.py — the handle_color_image async/sync interaction is worth a second look, but does not block the existing teleop path. Important Files Changed
Sequence DiagramsequenceDiagram
participant Cam as Camera/Simulator
participant Trans as LCM/pSHM Transport
participant Mod as VideoArmTeleopModule
participant Push as _push_jpeg()
participant Ev as asyncio event loop
participant WS as WebSocket /ws
participant JS as teleop.js
participant GL as WebGL Texture
Cam->>Trans: publish Image frame
Trans->>Mod: handle_color_image(msg)
Mod->>Push: _push_jpeg(self, msg, quality)
Push->>Push: msg.to_jpeg_bytes() JPEG encode
Push->>Ev: run_coroutine_threadsafe(_ws_send_jpeg)
Ev->>WS: ws.send_bytes(jpeg)
WS->>JS: ws.onmessage Blob received
JS->>JS: URL.createObjectURL(blob)
JS->>JS: "videoEl.src = newUrl, onload sets videoDirty=true"
JS->>GL: uploadVideoTexture() on next XR frame
GL->>GL: gl.texImage2D with videoEl
GL->>GL: renderVideoPanel() per-eye quad draw
Reviews (4): Last reviewed commit: "Refactor: html into css+js for fontend/U..." | Re-trigger Greptile |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Pull request was converted to draft
|
yoooo can you add Yaw control for robot body? |
|
Want your agent to iterate on Greptile's feedback? Try greploops. |
Problem
Adding streaming to the VR, for teleop - sim camera, realsense camera addition, or go2 camera view will be displayed in the headset
Closes DIM-850
Solution
How to Test
Contributor License Agreement
VR_go2.mp4
VR_arm_sim.mp4