Repository navigation
dotbot/calibration: push and bake stations by mask, each with its rectangle - #324
Merged
Merged
Conversation
This was referenced Oct 2, 2026
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #324 +/- ##
==========================================
+ Coverage 88.41% 88.43% +0.01%
==========================================
Files 230 230
Lines 36942 37022 +80
Branches 2323 2323
==========================================
+ Hits 32662 32739 +77
- Misses 4276 4279 +3
Partials 4 4
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
geonnave
force-pushed
the
lh2-multi-mask
branch
2 times, most recently
from
October 4, 2026 02:23
f501452 to
c1006ed
Compare
geonnave
force-pushed
the
lh2-multi-mask
branch
from
October 14, 2026 18:22
c1006ed to
1f8d518
Compare
geonnave
force-pushed
the
lh2-multi-mask
branch
from
October 15, 2026 11:26
1f8d518 to
e163dd0
Compare
geonnave
force-pushed
the
lh2-multi-mask
branch
from
October 16, 2026 12:43
e163dd0 to
8d54655
Compare
…tangle Breaking, cross-repo: the messages and the config page (magic SWRP, 872 bytes) only match a swarmit bootloader and net core that store stations by mask, and swarmit's Python must accept mask messages before it relays them. Robots below device info 4 are refused with a reflash. AI-assisted: Claude Opus 5.5
…y-run AI-assisted: Claude Opus 5.5
AI-assisted: Claude Opus 5.5
…s of their own AI-assisted: Claude Opus 5.5
Breaking wire change, landing with DotBot-libs' 16-bit calibrated field: every advertisement field after the mask moves by one byte and the vendored dotbot_control.wasm is rebuilt at ABI 3 from that change. With the one-byte mask, a calibration naming station 8 or above read every sandbox robot as missing it and resent homographies on each advert. AI-assisted: Claude Opus 5.5
geonnave
force-pushed
the
lh2-multi-mask
branch
from
October 16, 2026 12:59
8d54655 to
44e0d17
Compare
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.
Based on
main(#323 merged): this PR is its five commits.Robots stop needing their LH2 stations numbered 0 to N-1. A calibration of the stations on channels 3 and 9 (indices 2 and 8) is pushed and baked as itself instead of being refused with "stations must be numbered from zero without gaps".
u32station mask at 0 (0x0104 for stations 2 and 8),u32station index at 4, the float32 matrix at 8, that station's own rectangle at 44, then site name and the first 8 bytes of the calibration id, which the net core uses as the session key so two solves never mix.pushable_stations()accepts any indices 0 to 15.swarmit_config_t: magic SWRP (0x57535250), the mask at 12, sixteen matrices by slot at 16, sixteen rectangles by slot at 592, site name at 848, id at 864; 872 bytes. Slots outside the mask stay erased.calibratedfield is read as auint16(drv/lh2_geometry: per-sweep floor lines, fused in the pose estimator DotBot-libs#42 widens it in the firmware), so stations 8 to 15 show there. With one byte, a calibration naming station 8 or above made the controller read every sandbox robot, which advertises "not applicable", as missing that station and resend homographies on each of its advertisements. The not-applicable value is now0xFFFF; the simulator writes two bytes, and the vendoreddotbot/sim/dotbot_control.wasmis rebuilt at ABI 3 (43-byte advertisements) from DotBot-libs#42's branch commit. It must be rebuilt from controller: add support for DotBot autonomous control using LH2 waypoints #42's merge commit once that lands.push --dry-runprints each message and its station, mask and rectangle without opening a swarm connection.Flash together, in this order. (1) Install this host and the matching swarmit host (DotBots/swarmit#175: its Python relays and validates mask messages and parses device info 4). (2) Cable-flash the swarmit bootloader and net core built for the station mask on every robot, ideally with the calibration baked in, since the new page magic leaves a robot uncalibrated until it holds a new page. Build both images from DotBots/swarmit#173, which carries the SWRP config page layout and magic (872-byte page) and the dotbot-libs bump to DotBots/DotBot-libs#42. DotBots/swarmit#175 is host-only, so a net core built from it alone still has the old SWRO page and rejects the page this host bakes, leaving the robot on the default network id with no calibration. (3) Only then push over the air, and only to robots on the new swarmit. An old net core would read mask 0x0003 as a count of 3, never see index 2 and never commit. (4) In the same visit, reflash every robot app (sandbox apps over the air, from DotBots/DotBot-firmware#435): until then this host misreads that robot's advertisements, whose fields after the now two-byte mask sit one byte off.
Validation. Host only. The 0xA3 payload of stations 2 and 8 is checked byte for byte against a hand-built buffer laid out from the field table above; a two-station synthetic calibration on channels 3 and 9 goes solve, file, two payloads with mask 0x0104, baked page, and every slot decodes back (stations in slots 2 and 8, the other fourteen erased). The shared wire fixture, pinned identically in both repos, is now stations 2 and 8 with different rectangles, so a packer that keyed messages by position or wrote the union into every message would fail it; the two packers also agree byte for byte on real files.
push --dry-runrun for real on a channels 3 and 9 file. Full suite: 1744 passed; consolenpm test818 passed,npm run buildandnpm run lintclean;pre-commitclean. The controller tests now load the wire fixture's stations 2 and 8 unchanged: a robot holding stations 14 and 15 is warned about, and a robot advertising not-applicable gets no homographies; both fail with the one-byte field.dotbot/calibration/lighthouse2.pydotbot/cli/swarm_lh2.pydotbot/firmware/flash.pydotbot/tests/lh2_wire_fixture.pydotbot/tests/test_calibration_lighthouse2.pydotbot/tests/test_calibration_multi_station.pydotbot/tests/test_calibration_push.pydotbot/tests/test_device.pydotbot/calibration/push.py,dotbot/calibration/simulated.py,dotbot/console-web/dev/fake_swarmit_server.py,dotbot/console-web/src/fleetViews.test.tsx,dotbot/console-web/src/localization.test.ts,dotbot/console-web/src/localization.ts,dotbot/console-web/src/pushTarget.test.tsx,dotbot/console-web/src/types.ts,dotbot/dotbot_simulator.py,dotbot/models.py,dotbot/protocol.py,dotbot/sim/core.py,dotbot/sim/dotbot_control.json,dotbot/tests/test_calibration_session.py,dotbot/tests/test_calibration_spin.py,dotbot/tests/test_controller.py,dotbot/tests/test_dotbot_simulator.py,dotbot/tests/test_protocol.py,dotbot/tests/test_sim_core.pydotbot/sim/dotbot_control.wasm(43,583 bytes, was 41,053)