Primer: Robot Page
Directory Layout
src/pages/robot/
├── html/ # Entry HTML page (headless, no visible UI)
├── css/ # Minimal stylesheet
└── tsx/
├── index.tsx # Module entry point — bootstraps Robot, WebRTC, and media streams
├── robot.tsx # Robot class — all ROS2 interaction lives here
├── videostreams.tsx # VideoStream class — decodes compressed images and produces a MediaStream
└── audiostreams.tsx # AudioStream class — captures microphone audio for WebRTCEntry Point: tsx/index.tsx
tsx/index.tsxStartup Sequence
Session Lifecycle (handleSessionStart)
handleSessionStart)Incoming Message Handler (handleMessage)
handleMessage)Message type
Robot method called
Forwarding Callbacks
Callback
WebRTC message type sent
robot.tsx — The Robot Class
robot.tsx — The Robot ClassROS Connection
Robot Modes
Mode
Description
Movement Methods
Method
ROS interface
Notes
Full Data Flow (Robot Page)
How to Add a New Robot Capability (Summary)
Last updated
Was this helpful?
