dotbot swarm: add over-the-air LH2 calibration (collect/push)#271
Merged
Conversation
AI-assisted: Claude Opus 4.8
AI-assisted: Claude Opus 4.8
AI-assisted: Claude Opus 4.8
Contributor
Author
|
Tested on hardware - it works!! Merge after #270. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #271 +/- ##
===========================================
- Coverage 83.74% 83.35% -0.40%
===========================================
Files 116 118 +2
Lines 10793 10963 +170
Branches 570 570
===========================================
+ Hits 9039 9138 +99
- Misses 1751 1822 +71
Partials 3 3
🚀 New features to boost your workflow:
|
2 tasks
The OTA capture transport (request_lh2_capture / send_lh2_calibration) lands in swarmit 0.8.0rc3; rc2 lacks those symbols, so it is the true floor for `dotbot swarm lh2-calibration`. AI-assisted: Claude Opus 4.8
The module uses `from __future__ import annotations`, so the "CaptureSession" string annotation is unnecessary; pyupgrade rewrites it to a bare name. Unblocks the check env. AI-assisted: Claude Opus 4.8
Contributor
Author
|
Validated on hardware end to end, all works. |
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
dotbot swarm lh2-calibration collectto calibrate a single DotBot over the air (no serial cable): walks the four arena corners, triggers a raw-count capture per corner via swarmit, solves the homography, and saves the calibration under~/.dotbot/.dotbot swarm lh2-calibration push <path>to send a saved calibration to the bot over the air. Thin forward to swarmit'scalibrate-lh2, which picks the payload format (legacy.outorcalibration-*.toml) by extension.collecttakes an optional--tag <label>(e.g.office-2x2m): a filename-safe slug of it is added to the saved filename and recorded under[metadata], so calibrations stay self-describing per arena.applyexport stay underdotbot run lh2-calibration.The homography solve lives here (
dotbot.calibration); the transport lives in swarmit. Socollectruns natively andpushreuses swarmit's command. Transport selection (running server vs in-process controller) is swarmit's auto-detection, so there is no flag to choose it.Dependency
Runtime needs the swarmit
ota-lh2-capturebranch, which addsrequest_lh2_capture, theLH2_CALIB_TAGlog payload, and the bootloader / net-core capture trigger. Merge swarmit first. The unit tests here drive a fake client, so this PR's CI is green without it.Docs
Intentionally not in this PR yet. The CLI-reference / guide / README sweep lands after review, before merge.
Test plan
dotbot swarm lh2-calibration collect --device <addr> -d <mm>against a bot in READY: all four corners capture, a TOML is saved.--tag office-2x2mappears in the filename and in[metadata].tag.dotbot swarm lh2-calibration push <toml>sends, and the bot reports a position indotbot swarm status.--pushone-shot path oncollectsends without a separatepush.dotbot run lh2-calibrationstill offers serialcollect+apply(nocollect-ota).