Skip to content

ros2-poc viz: display rotation, deg/s rates, no dropped frames + clearer layouts - #258

Merged
mbreiser merged 2 commits into
claude/ecstatic-noether-art3qxfrom
claude/viz-dashboard-fixes
Oct 16, 2026
Merged

mbreiser merged 2 commits into
claude/ecstatic-noether-art3qxfrom
claude/viz-dashboard-fixes

Conversation

@mbreiser

@mbreiser mbreiser commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This fixes the problems found when PR #252's two Foxglove dashboards were checked on real
hardware runs from the ww18 Windows rig. It merges into PR #252's branch, not main.

The test data is on branch data/ros2-poc-ww18-2026-10-15. For each of five runs, each bag was
played back at 1× through viz_node, and the outputs were recorded and moved back onto the run's
own timeline. The data branch README explains how.

  • No more dropped frames. viz_node's /arena/frame subscription now uses RELIABLE_QOS
    (depth 200) like its other inputs. With depth 10 it dropped 15 of 9,969 frames (run 5.2), 17 of
    58,918 (10-min soak) and 8 of 12,226 (5c). Now it drops none.
  • The display's rotation, not just its index. New /viz/arena/display_deg (DisplayAngle)
    unwraps the bridge's wrapped index: the sum of index steps, each taken the short way round the
    modulus, × frame direction × degrees per frame. The modulus comes from --frames N, or is
    learned per epoch as the largest index + 1.
    • With the 20-frame grating used on ww18, azimuth_deg stayed inside one 36° period while the
      fly turned thousands of degrees.
    • Now display − turn − bias is constant to within ±0.9° (half a frame) for 98% of samples in
      every closed-loop epoch of runs 5.2, 5.7, the soak and 5c.
    • The 3D feature bar sits at wrap180(display_deg). That is unchanged for a pattern spanning the
      arena, and for a grating the bar now turns with the pattern.
  • Rates in one unit. New /viz/fictrac/fwd_dps and side_dps are the rates of FicTrac's
    integrated cols 20/21, in the °/s of speed_dps. They are computed per frame-counter step, so a
    dropped frame doesn't double them.
  • arena-fictrac.json:
    • The closed-loop plot shows fly turn vs display rotation.
    • The bias angle has its own plot.
    • Kinematics shows speed, forward and side in °/s.
    • The FicTrac indicator gets a short label and a panel title.
  • arena-bias.json:
    • The camera frame count and the displayed index are on separate plots.
    • The BIAS / Camera / Video indicators get short labels and are stacked full-width (the old labels were clipped).
    • The ROS log panels are titled live-only, because the bags don't record /rosout.
  • tests/test_viz_node.py (pixi run test-viz): 11 checks of the new math, with no ROS graph.
  • README: the Foxglove section is updated.

Testing

  • tests/test_viz_node.py: 11/11 pass.
  • Played five ww18 bags (runs 5.2, 5.7 crash, soak, 5c, B2) back at 1× through the new node:
    • /viz/arena/index has every frame in every run, with exact original times (|Δt| = 0) and 0 value mismatches.
    • display − turn − bias is constant to within ±0.9° (p1–p99) per closed-loop epoch.
  • tools/check_layouts.py (on the data branch) on both layouts × five runs: every data panel
    resolves with data on the four FicTrac runs. The empty ones are expected: last error (nothing
    failed), the ROS log (live only), and FicTrac panels on the camera-only B2 run.
  • Not run: tests/test_ros2_poc.py. It doesn't exercise viz_node, and on Windows this branch's
    pixi.toml still has the $PIXI_PROJECT_ROOT activation problem that PR LAB-303: ROS 2 bridge graph + MCAP record, ScanImage/BIAS connectors, Studio v0.97 (candidate 2026-10-20) #254 fixed.
  • Foxglove (web 3.4) on run 5.2, both layouts imported: the display rotation follows the fly's turn curve for curve; bias, kinematics (°/s), camera frames and index each read on their own axis; all panel titles show. A second commit (96b6dc5) stacks the arena-bias lights full-width and makes the BIAS light read online / offline, because "reachable" and the "Camera fps" title still clipped at a 1,316 px window.

Tier

None. This targets the spike branch claude/ecstatic-noether-art3qx (PR #252), not main.

Release notes

none (nothing ships from this PR)

🤖 Generated with Claude Code

…rer layouts

From checking both dashboards in Foxglove (web 3.4) on ww18 hardware runs replayed at 1x
through viz_node (data branch data/ros2-poc-ww18-2026-10-15):

- /arena/frame subscription: RELIABLE_QOS (depth 200) like the other inputs. With depth
  10 viz_node dropped 15 of 9,969 frames (step 5.2), 17 of 58,918 (soak), 8 of 12,226 (5c);
  now 9,969/9,969, 58,918/58,918 and 12,226/12,226.
- /viz/arena/display_deg (DisplayAngle): the display's unwrapped rotation from the wrapped
  index (sum of index steps taken the short way round the modulus x frame_dir x
  deg_per_frame). The modulus is --frames N, else learned per epoch (largest index + 1). A
  20-frame grating kept azimuth_deg inside one 36-degree period while the fly turned
  thousands of degrees; on the ww18 closed-loop runs display - turn - bias is now constant
  within +/-0.9 degrees (half a frame) in every epoch. The 3D feature bar sits at
  wrap180(display_deg): unchanged for a pattern spanning the arena, turning with a grating.
- /viz/fictrac/fwd_dps, side_dps: rates of FicTrac's integrated cols 20/21 in deg/s (per
  frame-counter step, so a dropped frame does not double them), the units of speed_dps.
- arena-fictrac: closed loop = fly turn vs display rotation; bias angle in its own plot;
  kinematics = speed / forward / side in deg/s; short indicator labels + panel titles.
- arena-bias: camera frame count and displayed index on separate plots; BIAS / Camera /
  Video indicators with short labels; ROS log panels titled live-only (bags do not record
  /rosout).
- tests/test_viz_node.py (pixi run test-viz): 11 checks of the math, no ROS graph.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mbreiser added a commit that referenced this pull request Oct 16, 2026
Replayed all five bags at 1x through PR #258's viz_node: display_deg, fwd_dps and side_dps
are new, and no frames are dropped (every frame's index + heading at its exact original
time). Layouts are PR #258's fixed arena-fictrac + arena-bias; PR #252's first versions
and their viz files stay in history at 659c234. README + tools updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ffline

In Foxglove (1316 px window) the BIAS light still clipped "reachable" and the gauge
title "Camera fps": the three lights now stack in a 60 % column beside the gauge, and
the BIAS light reads online / offline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mbreiser added a commit that referenced this pull request Oct 16, 2026
…ck of the fixed layouts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mbreiser
mbreiser marked this pull request as ready for review October 16, 2026 15:18
@mbreiser
mbreiser merged commit 0f180ea into claude/ecstatic-noether-art3qx Oct 16, 2026
4 checks passed
@mbreiser
mbreiser deleted the claude/viz-dashboard-fixes branch October 16, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant