feat(teleop): replace Deno bridge with embedded FastAPI WebSocket server#1385
Merged
ruthwikdasyam merged 15 commits intodevfrom Mar 1, 2026
Merged
feat(teleop): replace Deno bridge with embedded FastAPI WebSocket server#1385ruthwikdasyam merged 15 commits intodevfrom
ruthwikdasyam merged 15 commits intodevfrom
Conversation
Contributor
Greptile SummaryThis PR eliminates the Deno bridge subprocess and embeds a FastAPI/uvicorn HTTPS server directly into each teleop module. The client now sends raw LCM-encoded bytes (without topic headers) over WebSocket, and Python uses fingerprint-based dispatch to decode messages. Key improvements:
Minor issues:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Browser as Quest/Phone Browser
participant WS as WebSocket (/ws)
participant Decoder as Fingerprint Decoder
participant Module as Teleop Module
participant Out as Output Streams
Browser->>WS: Connect via WSS
WS-->>Browser: Accept connection
loop Teleoperation Active
Browser->>Browser: Read sensors/controllers
Browser->>Browser: msg.encode() (raw LCM bytes)
Browser->>WS: Send binary data
WS->>Decoder: Extract fingerprint (first 8 bytes)
alt Known fingerprint
Decoder->>Module: Call decoder (acquire lock)
Module->>Module: Update state
else Unknown fingerprint
Decoder->>Decoder: Log warning
end
Module->>Module: Control loop (50Hz)
Module->>Out: Publish PoseStamped/TwistStamped
end
Browser->>WS: Disconnect
WS-->>Module: WebSocketDisconnect
Last reviewed commit: 338734f |
paul-nechifor
approved these changes
Feb 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
TypeScript/Deno server collects raw pose/button data from Quest/Phone browser, encodes as full LCM packets (with topic headers), publishes directly to LCM UDP and Python DimOS modules subscribe to LCM topics, transform data, publish outputs
This meant a hard dependency on LCM as the transport between TS and Python, blueprints couldn't understand the topics used, and the Deno runtime was an external dependency
#1222
Closes DIM-536
Closes DIM-552
Solution
Embed a FastAPI/uvicorn HTTPS server directly inside each teleop module (following the
WebInput+RobotWebInterfacepattern). The JS client sendsmsg.encode()- raw LCM-encoded bytes without topic headers - over WebSocket. Python side decodes and processes:Breaking Changes
None
How to Test
Contributor License Agreement