Split 5 of 7: capture adapters, camera producer hub and agent DataService - #1796
Draft
martien-wdy wants to merge 3 commits into
Draft
Split 5 of 7: capture adapters, camera producer hub and agent DataService#1796martien-wdy wants to merge 3 commits into
martien-wdy wants to merge 3 commits into
Conversation
Adds the audio, camera and Robot Operating System 2 (ROS 2) capture adapters, turns the video service into a multiplexing camera producer the sensor sockets subscribe to, and implements the agent-side DataService. Wires all of it into the agent. Getting sealed episodes off the device is deliberately left to chunk 6. Part 5 of 7 in the split of the Wendy Data Platform change.
| return err | ||
| } | ||
| if err := writeWAVHeader(f, audioSampleRate, audioChannels, 0); err != nil { | ||
| f.Close() |
| } | ||
| mappings, err := os.OpenFile(filepath.Join(dir, "clock_samples.jsonl"), os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0o640) | ||
| if err != nil { | ||
| index.Close() |
| } | ||
| hub, subID, frames, achievedW, achievedH, achievedFPS, err := a.subscribeHub(ctx, src.key, req) | ||
| if err != nil { | ||
| index.Close() |
| hub, subID, frames, achievedW, achievedH, achievedFPS, err := a.subscribeHub(ctx, src.key, req) | ||
| if err != nil { | ||
| index.Close() | ||
| mappings.Close() |
| case result := <-c.recordDone: | ||
| cancel() | ||
| <-c.samplerDone | ||
| clockFile.Close() |
| cancel() | ||
| result := <-c.recordDone | ||
| <-c.samplerDone | ||
| clockFile.Close() |
Joannis
marked this pull request as draft
August 27, 2026 18:57
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
See chunk 1 for why pull request #1751 is being split. This is chunk 5 of 7.
Cause
The episode store from chunk 2 and the sensor sockets from chunk 4 have no producer. Nothing captures from a camera, a microphone or a Robot Operating System 2 (ROS 2) bag, and nothing serves the agent side
DataServicethe protocol definitions in chunk 3 declared.Solution
Adds the capture side of the data platform:
sensorProviderinterface chunk 4 introduced.DataServiceimplementation.wendy-agentwiring these need: the data manager and its quota bounds, the data service and its audio, ROS 2 and video dependencies, the two app socket managers, and the sensor provider registration. The video service is now constructed before the socket managers, because it owns the camera producer the sensor sockets subscribe apps to and every per app sensor socket must be built with that provider already registered.Episode store bounds are configurable through
WENDY_DATA_MAX_BYTESandWENDY_DATA_RESERVE_BYTES. A value that is present but unusable is logged rather than silently ignored, so a device configured with a bad quota learns that its configuration did not take.Deliberately left to later chunks
Getting sealed episodes off the device. The transfer worker and the telemetry endpoint override are chunk 6, and the
main.gochanges for them are held back to that chunk. The read side command line tools and the example app are chunk 7.Depends on
Chunk 4 (
split/4-sensors-entitlement), which this pull request is based on.Verification
CC=/usr/bin/clang go build ./...succeeds.CC=/usr/bin/clang go test ./go/internal/agent/services/... ./go/cmd/...passes.gofmt -l go/is empty andgo vetis clean for the touched packages.