Repository navigation
egocap: the launcher starts, bridges and corrects every station camera - #1646
NVshawnhwang wants to merge 2 commits into
Conversation
The launcher bridged the one stream of its sender profile. It now takes a profile of one to three mono streams and starts one chain for all of them: one sender deployment, one receiver config listing every stream in the profile's order, one camera bridge with a --stream for each, and for each corrected stream a table built at launch from that camera's own calibration and a --gpu-step of its own. Each bridged camera has its own entry in the streams state, so the page, the calibration and rectification tools and the recorder know per camera what was done. Which camera is which - --stream-role STREAM=ROLE is the one authority. A profile's only stream is the head camera as before; among several, each stream needs its role, and nothing is guessed from a stream's name or its place. - Among several streams a lens file that names no camera is refused, and so is one lens file used for two cameras: a picture corrected with another camera's lens would be wrong without anything saying so. - A plan that cannot be built for one camera stops the whole start before anything is deployed, and names the stream. What a profile must hold - Streams at different rates are refused: the bridge takes one rate. - Refused before anything is deployed, where the sender would refuse it afterwards: two streams on one camera device, a stream without exactly one camera, a rate or bitrate that is not a whole number, a port out of range. A value that is no number gets a sentence. - A child that has already exited is reported in place of the line that announces the page. configs/three-camera-settings.example.yaml has the structure of a three-camera profile with a placeholder for every value that belongs to one station; the launcher refuses it while one is left. stations/ego_stations.bridged.example.yaml is a station file for a station whose cameras all arrive through the bridge. A one-stream profile that started before starts the same: every command, file and message is unchanged. Three cameras have not been run on an Orin; CAMERA_SETTINGS.md lists what a first run must check. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Shawn Hwang <shhwang@nvidia.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
|
🤖 Agent-generated (Claude Code · claude-sonnet-5-5) Summary This makes Conflict and ordering risk (concrete).
Legend: 🚫 Blocker · 💡 Suggestion · 🔍 Nit
Per-stream wiring checked. Stream ids are unique-checked, device-unique-checked and Questions for the author
Actionables (for bots — copy-paste-ready for AI)
|
NVdejung
left a comment
There was a problem hiding this comment.
🤖 Automated first-pass review (Claude, for Dejun) — I'll follow up personally where needed.
Summary: this PR makes tools/start_system.py run one sender, one receiver and one bridge for a profile of one to three mono streams. Each stream gets its own track, role, calibration and remap table. The launcher also refuses up front several profiles the sender would otherwise refuse only after the deploy. I read the new code against the bridge, receiver, CaptureServer and sender parsers in this tree and found no blocker; a test pins the one-stream start byte for byte. Two things need attention: the printed bitrate sum can come out too low, and #1606 needs a decision on which contract to keep.
Must fix
None found. This is a public repository: the internal-name scan is clean, and I found no internal names in the added configs, fixtures or docs.
Suggestions
-
examples/egocap/tools/start_system.py:394: a stream withoutbitrate_mbpscounts as 0, and an explicit 0 is accepted. The sender does neither:- it gives a missing value its default of 50 Mbit/s (
Config.h:76); - it refuses 0 for HEVC (
Config.cpp:480).
The guides tell stations to budget the link with the "N Mbit/s in all" line (
:663), so it can be 50 Mbit/s too low for each stream that leaves the value out. Fix: requirebitrate_mbps≥ 1 for an HEVC stream, as the sender does, or count a missing value at the sender's default. - it gives a missing value its default of 50 Mbit/s (
-
tests/tools/test_start_system_three_cameras.py:17: the new module imports about 20 private helpers and both fixtures fromtest_start_system.pyby bare module name.- This works only under pytest's default import mode, and only while
tests/tools/has no__init__.py. - Five other open PRs edit
test_start_system.py. If one of them renames a helper, every three-camera test fails at import, and no textual conflict warns anyone. - Fix: move
recorded_main,station_calibrationand the shared helpers intotests/tools/conftest.pyor a helper module. The one-stream wrappers (streams_yaml,receiver_yaml,mock_sender_command) now serve only the tests and could move with them.
- This works only under pytest's default import mode, and only while
-
start_system.py:555("None when it fills none") and:792("A stream without a role … is published as it arrives") are now stale. Every bridged stream has a role:stream_rolesgives a profile's only streamego, andstream_tracksrefuses a stream with no role when there are several. Update the comments, or narrowroletostr. -
test_start_system_three_cameras.py:1357readsargus_sender/src/Config.cppwithout a guard. The neighbouring tests skip when the receiver, mock sender or deploy tool is missing; add the sameskipifhere. -
The "never been run on an Orin" paragraph is copied into five guides:
CAMERA_SETTINGS.md:263,README.md:443,LIVEKIT_PREVIEW.md:194,backend/README.md:769andCALIBRATION_TOOLS.md:2662. Keep it inCAMERA_SETTINGS.mdand link to it from the others, so the first hardware run only has to update one place.
Conflicts
- With
nvShawnHwang/egocap_control_token_box(the head branch of#1645): the local 3-way merge is clean and the PR is 0 commits behind, so no rebase is needed. This PR is the top of the#1634…#1645stack and lands after it. #1606(Yunjuliii, draft, basemain) sharesstart_system.py,test_start_system.pyandCAMERA_SETTINGS.md. The earlier review comment says it builds the same feature with a different track-naming contract; that is still unresolved. Agree on one contract before either PR merges, and rebase the other onto it.#1566and#1571(gareth-morgan-nv) sharestart_system.py,test_start_system.py,default-camera-settings.yaml,CAMERA_SETTINGS.mdandREADME.md.- They have other bases, so textual conflicts were not computed. Conflicts are likely around
sender_settingsandparse_args. - Semantic risk: check that
#1566's range signalling agrees with the single--source-full-rangeflag this PR passes for every stream.
- They have other bases, so textual conflicts were not computed. Conflicts are likely around
#1586(gareth-morgan-nv) sharesstart_system.py,test_start_system.pyandREADME.md. Check that its per-session delivery test covers every LiveKit stream in the descriptor, which can now hold three.#1587(fvaloppi-nv) touches onlytest_start_system.py, but see suggestion 2.#1625shares onlyREADME.md; low risk.- Whichever of these PRs lands second should re-run both
test_start_system*.pyfiles. - I did not run any tests; this review only read the code.
Change-by-change (13 files)
| File / area | What changed | Makes sense? |
|---|---|---|
tools/start_system.py |
Profile loading: 1–3 mono streams through sender_streams, which checks per-stream settings, unique ids and devices, and one rate for all. Per-stream sizes come from stream_sizes. Placeholders are refused, and port, rate and bitrate must be whole numbers.Roles and tracks: stream_tracks maps role to track and requires a role for each of several streams.Rectification: planned per stream. With several streams, a lens file that names no camera and one lens file used for two roles are both refused. Child commands: the receiver config, descriptor, bridge and mock-sender commands now carry several streams. Output: the bitrate sum is printed, and a child that has already exited is reported before the page is announced. The old one-stream helpers are kept as wrappers. |
✅ Checked against the bridge's --stream/--gpu-step parsing, the receiver's index checks, CaptureServer's LiveKit limits and the sender's Config.cpp. |
tests/tools/test_start_system_three_cameras.py (new) |
Three-stream starts against stub programs; every refusal; output read with the real receiver, mock-sender, deploy-tool and CaptureServer parsers; a check of the example's keys against Config.cpp; stop order with real child processes; the one-stream output pinned byte for byte. |
✅ Read in full. Config.cpp read (suggestion 4). |
tests/tools/test_start_system.py |
The time-sync test now kills the bridge once the time-sync follower starts; otherwise the new pre-announcement check would catch it first. | ✅ The test still checks what it was written for. |
tests/backend/test_three_camera_run.py (new) |
The launcher's planning and streams state, read by the backend: seven session files, recorder assets, the Rectification and calibration tools for each role, alignment, and the bridged station example. | ✅ |
frontend/src/RectificationDialog.threeCameras.test.tsx (new) |
The Rectification dialog with three bridged cameras, each with its own facts and restart note. | ✅ The fixtures and props it uses exist. |
configs/three-camera-settings.example.yaml (new) |
A three-stream SIPL profile with a placeholder for every station value. | ✅ Every key is one the sender's parser knows (a test checks this). |
recording/egocap/stations/ego_stations.bridged.example.yaml (new) |
Station template with no CaptureServer cameras; index source head. |
✅ It copies record_fps: 60 from the base template; the backend does not read it, but it looks odd next to a 30 fps profile. |
configs/default-camera-settings.yaml |
The header comment now points to the three-camera example. | ✅ |
CALIBRATION_TOOLS.md |
Launcher steps rewritten for several streams, plus the refusal catalogue and limits. | ✅ Matches the code. |
CAMERA_SETTINGS.md |
New "A profile for three cameras" section, bitrate and GPU notes, receiver keys and a hardware checklist. | ✅ The bridge README's bitrate figures, the 48-byte table header and the discover/linktest subcommands all check out. |
README.md, LIVEKIT_PREVIEW.md, backend/README.md |
Three-camera usage and notes on what is not yet verified on hardware. |
Reviewed at 2b6dd98 · 13 files · 2026-12-01 15:20 PST
…g/egocap_three_camera_launch No conflict. Adds tests that every take the station starts carries the capture session's facts and each row's sequence, that a label correction leaves them as they were, and that upload sends them with the take. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Shawn Hwang <shhwang@nvidia.com>
Branch:
nvShawnHwang/egocap_three_camera_launch, opened againstnvShawnHwang/egocap_control_token_box.One commit:
egocap: the launcher starts, bridges and corrects every station cameraSummary
The launcher (
tools/start_system.py) bridged the one stream of its sender profile, so only the head camera wascorrected live. It now takes a profile of one to three mono streams and starts one chain for all of them: one
sender deployment, one receiver config listing every stream, one camera bridge with a
--streamfor each, and foreach corrected stream a table built at launch from that camera's own calibration and a
--gpu-stepof its own.Each bridged camera has its own entry in the streams state, so the page, the calibration and rectification tools
and the recorder know per camera what was done.
No change to
examples/camera_streamer/orexamples/camera_livekit_bridge/: both already take several streams.No backend, library or page code changed either; tests were added where three cameras were never exercised.
Which camera is which
--stream-role STREAM=ROLEis the one authority. A profile's only stream is the head camera, as before. Amongseveral, each stream needs its role; nothing is guessed from a stream's name or its place in the profile.
cameras: a picture corrected with another camera's lens would be wrong without anything saying so.
stream. One camera can still be left uncorrected beside corrected ones.
What a profile must hold
device, a stream without exactly one camera, a rate or bitrate that is not a whole number, a port out of range.
New files
configs/three-camera-settings.example.yaml: the structure of a three-camera profile with a placeholder forevery value that belongs to one station. The launcher refuses it while one is left.
recording/egocap/stations/ego_stations.bridged.example.yaml: a station file for a station whose cameras allarrive through the bridge.
What to know before relying on it
launcher against new, over the builder's 87 starts and an independent reviewer's 443. What differs is only what a
broken profile gets: an earlier refusal or a sentence where there was a traceback.
stops the whole stack.
to each, so a take fails whole when any one stream fails. The frame-count comparison across cameras stays off
unless a station switches it on.
link.
launcher's report and says where the two differ.
How it was reviewed and tested
Python; the backend suite; the page's lint, tests and build.
table's bytes with one planned from that role's own calibration across 43 starts, fed the launcher's output to
the real backend and recorder, and made 28 deliberate breakages of the launcher, all caught by the tests. Its
two findings (an unstamped lens file among several streams; profiles the sender refuses late) are fixed here.
Not yet verified on hardware
Three cameras have never been run through the launcher on an Orin.
CAMERA_SETTINGS.mdhas the first-runchecklist: that one platform file runs three mono streams; that each stream arrives as the camera its role says and
each corrected picture uses its own calibration; what happens when one camera stops; GPU load and memory for three
decode, remap and encode pipelines; the link under the summed bitrate; time sync for all three streams.
🤖 Generated with Claude Code