Skip to content

dotbot/calibration: take corner captures from the robot's button only - #338

Open
geonnave wants to merge 5 commits into
DotBots:mainfrom
geonnave:lh2-no-capture
Open

geonnave wants to merge 5 commits into
DotBots:mainfrom
geonnave:lh2-no-capture

Conversation

@geonnave

@geonnave geonnave commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Based on main.

Corner calibration had two ways to take a point: the robot's button, with the calibrate app running, or Enter at the host, which asked a robot sitting in the bootloader's READY mode for raw LH2 captures through --device. The button path is the one in use: it needs no address, works on any robot in view, and the calibrate app averages its own reads. The READY-mode capture is being removed from the swarmit bootloader and net core (DotBots/swarmit#177), so the host side goes with it. Corner captures now come from the robot's button only, in the CLI, the REST API and the console. The simulator's robot presses its own button for each point, so simulated sessions still run end to end.

Breaking changes.

  • CLI: dotbot swarm calibrate-lh2 collect loses --device, --reads, --timeout and --retries. Enter no longer captures.
  • REST: POST /controller/calibration/session/capture is removed.
  • Console: the Capture button and the capturer pick are gone from the calibration step, and so is the Reads per point setting with its read bars.
  • REST: a session start request that carries reads is refused with 422, naming reads as removed, since the calibrate app sets its own.

Release order. This host no longer imports swarmit's capture names, so it runs with swarmit before and after #177; install it first, or with #177's host release. An older PyDotBot with the new swarmit fails only on collect --device.

+ - Files
#331 and the PRs under it +1912 -234 56 merge separately; drops out when they land
Python source +132 -438 9
Console source +17 -176 10
Tests (Python and console) +226 -574 28

Validation.

  • Python tests touching calibration, lh2, server and controller: 639 passed, 1 failed (test_controller::test_controller_dotbot_simulator, a known environment failure on this machine, the same one reported on dotbot/cli: add calibrate-lh2 show --next-round #331).
  • Console: vitest 824 passed, tsc clean.
  • Not run on the bench: no corner calibration has been collected with this branch yet. The button path it keeps is the one used on the bench throughout the multi-station work.

Left for the docs sweep before merge: doc/cli/swarm.md and doc/guides/lh2-calibration.md still describe --device and Enter captures.

Update. A start request still carrying reads is now refused (422) instead of ignored. Full Python suite: 1775 passed, 2 failed (the known environment failures test_camera_service::test_a_registration_without_controls_warns_about_nothing and test_controller::test_controller_dotbot_simulator).

@codecov

codecov Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 88.56%. Comparing base (7a76840) to head (130b88e).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
dotbot/console-web/src/useCalibration.ts 50.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##             main     #338    +/-   ##
========================================
  Coverage   88.56%   88.56%            
========================================
  Files         230      230            
  Lines       37623    37213   -410     
  Branches     2367     2348    -19     
========================================
- Hits        33319    32956   -363     
+ Misses       4300     4253    -47     
  Partials        4        4            
Flag Coverage Δ
console 82.35% <90.90%> (+0.16%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
dotbot/cli/swarm_lh2.py 83.07% <ø> (-0.18%) ⬇️
dotbot/console-web/src/App.tsx 87.93% <ø> (+0.21%) ⬆️
dotbot/console-web/src/MapView.tsx 97.68% <100.00%> (+0.13%) ⬆️
dotbot/console-web/src/RightPane.tsx 97.29% <ø> (-0.02%) ⬇️
dotbot/console-web/src/SetupCard.tsx 97.05% <100.00%> (-0.26%) ⬇️
dotbot/console-web/src/StepCard.tsx 83.67% <100.00%> (+12.17%) ⬆️
dotbot/console-web/src/api.ts 40.65% <100.00%> (-2.10%) ⬇️
dotbot/console-web/src/calibration.ts 100.00% <ø> (ø)
dotbot/console-web/src/calibrationSetup.ts 100.00% <ø> (ø)
dotbot/console-web/src/types.ts 100.00% <ø> (ø)
... and 7 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@geonnave
geonnave force-pushed the lh2-no-capture branch 6 times, most recently from 25f4599 to d7e5396 Compare October 16, 2026 14:08
Breaking: removes collect --device, --reads, --timeout and --retries,
and POST /controller/calibration/session/capture. The bootloader's
READY-mode capture they triggered is gone from swarmit, which drops
request_lh2_capture and LH2_CALIB_TAG, so the two land together. On the
simulator the simulated robot now presses its button at each point.

AI-assisted: Claude Opus 5.5
Breaking: the calibration session, its preview and its start request no
longer carry `reads`, and a point's per-station reads no longer carry a
`target`. The calibrate app decides how many reads a press holds.

AI-assisted: Claude Opus 5.5

This branch has not been deployed

No deployments
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