Repository navigation
rig_nodes: bias_health (from the okey-cokey rig) + a derive hook on foxglove_json.convert - #1
Merged
Merged
Conversation
…rive` hook on foxglove_json.convert * `rig_nodes/bias_health.py` — CountRate (frame rate as the slope of the BIAS frameCount over the last 2 s of status polls) and bias_drops (the sum of the loss counters the Atlas10 build reports; None when it reports none). Moved verbatim from webDisplayTools `rig/nodes/bias_health.py` (PR reiserlab/webDisplayTools#269), where the arena visualization node and the dashboard replay import it; pure, no ROS. * `foxglove_json.convert(..., derive=None)` — a second, whole-stream hook beside the per-message `enrich`: `derive(records)` gets every kept record (topic, log_ns, obj) in log order and yields new messages (topic, t_ns, obj, schema_name | None). A derived message may name one of `WELL_KNOWN_SCHEMAS` (foxglove.CompressedImage today) instead of an inferred schema; an unknown name is refused. The report gains `derived`. This is what the arena wrapper's `--stimulus` mode needs (rebuilding the expected-display images and health topics from the browser stream), and it could not be expressed through `enrich`, which maps one recorded message to one output. * tests/test_pure.py: bias_health (6 checks) + derive (5 checks); 40/40. Not a release: the version stays 0.2.1 until the next package set (README "Releasing"). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
6 of 8 tasks
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.
Summary
Two additions to
rig_nodes, both needed by webDisplayTools PR #269 (the okey-cokey camera + G6 dashboard) now that it sits on top of the extraction (#274). No version bump: ships with the next package set (README "Releasing a package set"); #269 is marked as needing rig-nodes ≥ that release.rig_nodes/bias_health.py—CountRate(BIAS frame rate as the slope offrameCountover the last 2 s of status polls, restarting when the counter goes down) andbias_drops(the sum of the loss counters the Atlas10 build reports in get-status;Nonewhen it reports none). Moved verbatim from webDisplayToolsrig/nodes/bias_health.py; the record (rig-software-repos-and-runners.md §3.3) already lists it as a rig-nodes file. Consumers: the arena visualization node (/viz/bias/fps_from_count,/viz/bias/drops) and the dashboard replay.foxglove_json.convert(..., derive=None)— a whole-stream hook beside the per-messageenrich.derive(records)receives every kept record(topic, log_ns, obj)in log order and yields NEW messages(topic, t_ns, obj, schema_name | None); a derived message may name aWELL_KNOWN_SCHEMASentry (foxglove.CompressedImagetoday) instead of an inferred schema, an unknown name is refused, and the report gainsderived. The arena wrapper's--stimulusmode (expected-display images, arena health, camera frames rebuilt from the browser stream) needs this;enrichmaps one recorded message to one output and cannot emit topics that were never recorded.Tests
pixi run test-pure: 40/40 (bias_health 6 checks, derive 5 checks, on top of the 29).test_device_nodesis untouched by this change (no node code).Linear
LAB-303 (okey-cokey rig), LAB-338 (extraction follow-up).
🤖 Generated with Claude Code