Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 30 additions & 9 deletions examples/egocap/CALIBRATION_TOOLS.md
Original file line number Diff line number Diff line change
Expand Up @@ -1550,15 +1550,36 @@ start its children with. What that leaves unknown:
`wrist_left` and `wrist_right` entries and the wrist intrinsics files are in place for it. The camera sender is
not part of this tree: where it corrects a wrist picture itself, that has to be switched off first, because a
picture corrected twice is bent again.
- **Calibration takes are ordinary takes.** They pass the recorder's checks, are kept, and appear in the day's
recordings and in the end-of-day report like any other. One in which no tracking row was recorded fails those
checks and is not kept. Their task text is `Calibration: head camera` (or `left wrist camera`,
`right wrist camera`, `controller–glove offset`), which is how to tell them apart; the operator's own task text
is put back when the take ends. One that was interrupted stays on disk unfinished and holds the next take, like
any interrupted take, until a new batch is started on the recording page. The tool says so of its own take (*the
take was interrupted and stays on disk unfinished; start a new batch on the recording page to go on*) and
refuses to start another meanwhile (*an interrupted take is waiting; start a new batch on the recording page
first*).
- **Calibration takes are the recorder's takes, exempt from the capture checks.** A take either tool records is
never judged by the capture checks: a board waved at one camera and hands held still are what those checks
reject or set aside. It is never rejected for its camera's rate, flagged or quarantined; its record says why
(`capture_checks_exempt` in its manifest, `capture_qc_exempt` in its metadata), and the recording page shows it
as kept with *The capture checks did not run on this take.* The tools start their takes that way themselves:
nothing a request carries decides it, and no take started from the recording page is exempt. In every other
respect they are takes like any other: kept, counted, handed to time alignment, and listed in the day's
recordings and in the end-of-day report. Their task text is `Calibration: head camera` (or
`left wrist camera`, `right wrist camera`, `controller–glove offset`), which is how to tell them apart; the
operator's own task text is put back when the take ends.
- **A calibration take can still fail, and then it waits on the recording page.** Storage integrity is checked
as for any take: one in which no tracking row was recorded fails it and is not kept, and the tool says so (*no
tracking was recorded: ...; its data stays on disk and can be discarded on the recording page*), followed by
the recording page's own sentence for what the check found. The page lists such a take, with Discard, while
the session it was recorded in is the one open for recording. One that was interrupted waits unfinished and
holds the next take, like any interrupted take, until it is recovered or discarded on the recording page. The
tool says so of its own take (*the take was interrupted and waits unfinished; recover or discard it on the
recording page to go on*) and refuses to start another meanwhile (*an interrupted take is waiting; recover or
discard it on the recording page first*). A take recovered there is finished exempt, as it was started, and
kept; the tool that recorded it does not take it up afterwards, so record the calibration take again.
- **A take that waits from before rectification was switched on is resolved in a run started without it.** A
session of a run that corrects a camera carries that run's files, and the recorder reopens a session to recover
or discard a take only as it was recorded. A take that waits from a run that corrected nothing is listed on the
recording page of a run that corrects a camera, and both of its buttons are refused there (*This take's session
cannot be reopened under the current settings: ...*). Recover or discard what waits before the capture stack is
started with a correction, or start it once with `--no-rectify` to do so.
- **A refusal of the recorder is said as the recording page says it.** When the recorder will not start or end a
calibration take, the tool answers with the sentence a refused Record or Stop gets: the readiness reason the
page shows, a recordings disk that is full or read-only named in words, and for anything unexpected *the take
could not be started; see the backend log* (or *ended*). What the recorder raised stays in the backend log.
- **A camera that arrives over LiveKit is guided only while a take records.** The backend holds no picture of it
before the take's first frame. The Rectification preview of such a camera is made on a frame of a recorded take.
- **The camera's lag is found only as well as the take shows it.** It is found from the take to within a 10 ms
Expand Down
66 changes: 44 additions & 22 deletions examples/egocap/DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ stale blocks a new take rather than starting one against outdated data.
Recording itself is a short loop: start an episode, perform the demonstration, then either keep
the take or discard it. The operator can edit the task description between takes without
interrupting the session, and can rotate to a fresh batch of episodes when moving on to a new
block of work. A kept take is checked automatically once it finishes writing, and any problem
found is reported to the operator.
block of work. Every take is checked automatically once it finishes writing, and the operator is
told what became of it and why.

The station's time is observed, not entered. The backend logs through the day whether the station
could record or was down, and why, and counts active and down time between the first and last take
Expand All @@ -67,7 +67,7 @@ kept as a blocker with its reason, in a daily log written on the station. A take
and waits to be recovered or discarded counts as down, as does time the backend could not observe.

At the end of the day a report lists every take of the day by session with what became of it: kept,
flagged, rejected, discarded, or still pending after an interruption. It is read from the recording
flagged, quarantined, rejected, discarded, or still pending after an interruption, with the reason. It is read from the recording
service's own record of each take, so a take that was not kept is counted rather than left out, and
each take belongs to the day it was actually recorded rather than the day its session was opened.
The report shows the station's active and down time with its blockers and the operator's notes, and
Expand Down Expand Up @@ -125,16 +125,31 @@ A kept episode is written to the station's local storage as one MP4 video file p
camera, numeric tracking data β€” headset and controller pose, hand skeleton β€” stored in Zarr, and
metadata: the task description and the operator who recorded it.

An automatic check runs once a take finishes recording and marks it kept, flagged, or rejected,
with the result and reason in the session status the backend reports back. A measured tracking
problem flags the take but keeps it, letting downstream consumers decide for themselves whether to
use it. A measured camera failure rejects the take and removes its media, since a recording
missing its camera content is not useful; a storage-integrity failure also rejects the take, but
keeps its data and reports its path for inspection. A take interrupted mid-recording, including by
a station restart, is retained as a pending episode that blocks a new take at that station. The
recording service exposes `recover_episode`/`discard_pending` to resolve it, but the browser page
has no command that calls either one yet -- clearing a pending episode today needs a direct call
into the service, not the page.
An automatic check runs once a take finishes recording and marks it kept, flagged, quarantined or
rejected, with the result and the reason in the session status the backend reports back: which
camera or stream, what was measured against which limit, and what to check. A measured tracking
problem marks the take bad but keeps it, letting downstream consumers decide for themselves whether
to use it; by a station switch that is on by default it is quarantined, set apart from its session
under the recording output, and otherwise it stays with its session, flagged. Either way it is not
time-aligned. A measured camera failure rejects the take and removes its media, since a recording
missing its camera content is not useful: a camera whose rate while it ran was under its minimum, or
that recorded too few frames for the take's length. A storage-integrity failure also rejects the take, but
keeps its data and reports where it is for inspection. The thresholds are deployment policy, read
from a documented defaults file that a site or a station can override, and each take's metadata
records the ones it was judged by.

A take interrupted mid-recording, including by a station restart, is retained as a pending episode.
In the session open for recording it holds the next take until the operator recovers or discards it
from the page; one left behind by an earlier session, recorded under any name the station has had,
holds nothing and is listed in the end-of-day report's dialog with the same two commands. A session
that a recorder still has open is not listed: the recorder marks it about once a second, which a
backend on another machine sharing the recordings folder can see without a shared lock, and when the
recorder cannot write that marker it refuses a new take and says so, without interrupting one that
is being recorded. Recover finishes the take and runs its checks, and is
offered only for a take that was completely written, while the station is set up as when it was
recorded. Discard removes the take's recorded media for good, so the page asks once before sending
it. A take the integrity check rejected is listed with Discard only while its session is the one
open for recording; afterwards its data stays on disk and is removed there.

Whichever of the station's calibration files are actually installed β€” the head camera's
intrinsics and extrinsics, each wrist camera's intrinsics, and the controller-to-glove wrist
Expand Down Expand Up @@ -202,7 +217,9 @@ to a new batch, available as on-screen buttons and keyboard shortcuts alike, usa
demonstrating a task. Buttons and keyboard shortcuts use the same readiness checks. A command that
cannot run β€” no operator entered, no camera ready, no task set β€” is rejected with the specific
reason, and a take's outcome is
reported once its check actually completes, not assumed from the stop command alone.
reported once its check actually completes, not assumed from the stop command alone. The outcome
stays above the cameras until the next take starts, in the backend's own sentences, and an outcome
the page does not recognise is shown as unknown rather than as kept.

If a browser tab reconnects mid-session, it is brought back to the same live state, since the
recording session itself lives in the backend, not in any one tab. The task description opens into
Expand Down Expand Up @@ -233,12 +250,15 @@ It is a separate thing from the controller-to-glove wrist offsets below.

The station's calibration files β€” the head camera's intrinsics and extrinsics, each wrist camera's
intrinsics, and the controller-to-glove wrist offsets β€” are made from the recording page, by the
calibration tools under Settings, Devices. Each tool records an ordinary take, solves from it, and
installs the result into the station's calibration directory. `recording/tools/calibrate_station.py
camera --install` runs the same camera solve on a recorded take without the backend; the wrist
offsets are made on the page only. The backend copies whichever of those files exist into each
session as it opens, so a take can be related back to the calibration active when it was recorded;
an install from the page ends the open batch, so that the next take's session holds the new files.
calibration tools under Settings, Devices. Each tool records a take of its own through the recorder,
solves from it, and installs the result into the station's calibration directory. Such a take is
exempt from the automatic check of capture quality, which a board waved at one camera or hands held
still would fail; its storage integrity is checked like any take's.
`recording/tools/calibrate_station.py camera --install` runs the same camera solve on a recorded
take without the backend; the wrist offsets are made on the page only. The backend copies whichever
of those files exist into each session as it opens, so a take can be related back to the calibration
active when it was recorded; an install from the page ends the open batch, so that the next take's
session holds the new files.

The recorder applies none of them to the data it stores. One of them is applied before the video
reaches it: a camera's lens calibration drives the correction of that camera's video into the
Expand Down Expand Up @@ -324,8 +344,10 @@ reconstructed per tab. The recording session stays in the backend when a browser
reconnecting tabs receive its current state. Rotating to a new batch ends the current batch; the
next take starts a new recording session, independent of the underlying capture connection, which
keeps running under it the whole time. The backend writes accepted samples to local storage, runs
the automatic check once a take stops, and reports the outcome β€” kept, flagged, or rejected β€” back
to every connected viewer, with the specific reason behind any failure.
the automatic check once a take stops, and reports the outcome β€” kept, flagged, quarantined or
rejected β€” back to every connected viewer, with the specific reason behind any failure. It also
lists the takes waiting to be recovered or discarded, of the open session and of earlier ones, and
carries out those two commands; removing a take's media stays in the recording service.

### Recordings browser (PoC demo, not part of the final design)

Expand Down
Loading
Loading