apps-sandbox/dotbot: replace the old app with dotbot-next - #429
Merged
Merged
Conversation
This was referenced Sep 24, 2026
Merged
geonnave
marked this pull request as ready for review
September 25, 2026 08:23
Breaking change: dotbot-sandbox-<board>.bin is now the app built on the wheel speed loop, the pose estimator and onboard waypoint steering. The PD heading loop on drv/control_loop no longer runs in the sandbox, so the pure-pursuit define goes with it. AI-assisted: Claude Opus 5.5
AI-assisted: Claude Opus 5.5
AI-assisted: Claude Opus 5.5
AI-assisted: Claude Opus 5.5
AI-assisted: Claude Opus 5.5
…tall AI-assisted: Claude Opus 5.5
AI-assisted: Claude Opus 5.5
AI-assisted: Claude Opus 5.5
AI-assisted: Claude Opus 5.5
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.
#428 has merged (as have #427, #426 and #425), and so has DotBots/DotBot-libs#36, at c1ff6ca. This PR is next. This branch carries #427's and #428's commits as they were before their last rebase, so until it is rebased onto
mainthis diff also shows their changes, and the PR conflicts withmainon thedotbot-libsline. It is rebased ontomainnext, itsdotbot-libspointers are remapped from #36's pre-rebase commits to the rebased ones (b6027b3 to c11eb27, ddb10f2 to 13e6643, 6859478 to 58a3f05), since #36 was itself rebased before merging, and it gets a finaldotbot-libsbump to #36's merge commit c1ff6ca. Until then the submodule points at b6027b3, #36's old tip, which retiresdrv/move. The host-side wording follows in DotBots/PyDotBot#303.This is the cut-over: the rebuilt app replaces the old sandbox DotBot app, and the old one is deleted, so the sandbox has one DotBot app rather than two.
Why now
The new app was built layer by layer (wheel speed loop, pose estimator, steering, waypoint batches) in #425 to #428, and the decision to replace the old app was conditional on it beating the old one on the floor. Head to head on a 400 mm straight, E21A running the old
dotbotapp and 2426 runningdotbot-next, parallel lanes:The new app wins on reliability, miss and path error; the old one is faster on a straight when it works. That is a shortened version of the planned check (one trajectory, 3 to 6 runs per arm rather than 16 per start pose), and the maintainer accepted it as enough.
What changes
apps-sandbox/dotbotis now the rebuilt app, moved fromapps-sandbox/dotbot-nextwith two lines changed (its doxygen group and one comment); the old app'smain.c(365 lines, the PD heading loop ondrv/control_loop) is deleted. Git shows this as a rewrite ofapps-sandbox/dotbot/main.crather than a rename, because the path already existed. The SES projectdotbot-nextis gone anddotbotbuilds the new code, sodotbot-sandbox-<board>.binis the new app, which is what PyDotBot'sdotbot swarm flash rc-caralready resolves to. Breaking for anyone who relied on the old app's behaviour: waypoints are axle positions, the advertisement carries the waypoint report, and the heading is the-1000sentinel until the robot has moved.DOTBOT_CONTROL_LOOP_USE_PURE_PURSUITis dropped from the threesandbox-*.emProjectsolutions: no sandbox app linksdrv/control_loopany more.apps-sandbox/moveis ported from the blockingdrv/moveonto the non-blocking odometric goal of drv/move: retire it for an odometric goal on the wheel speed loop DotBot-libs#36: a 200 mm square on the wheel speed loop from a 10 ms tick, then blinking, with the keep-alive from the same tick. Speeds are now mm/s (150 straight, 100 per wheel turning) instead of a duty of 60. Ticks the main loop missed are stepped as one step over the elapsed time, as inapps-sandbox/dotbot, rather than replayed one tick at a time on counts that all landed in the first, and a stalled wheel ends the square: otherwise the other wheel kept driving and the robot pivoted around the stuck one untilswarm stop.AGENTS.mdnow says which app runs which loop.What still depends on what
apps/dotbotstays, on the old loop. It is the documented single-robot path without SwarmIT (PyDotBot's "drive a single DotBot" guide flashesdotbot-dotbot-v3.hexwith a cabled gateway), it is theARTIFACT_PROJECTSofdotbot-v1/v2/v3and ships in every release, and it keeps its own LH2 decoding and the 500 mm fix-to-fix outlier gate. With it,drv/control_loopstays in DotBot-libs, which PyDotBot's simulator also builds.drv/wheel_control,drv/pose_estimator,drv/steering), but the app's I/O is SwarmIT's: the fix and its sequence fromswarmit_localization_get_fix(), the keep-alive that runs the solve, commands fromswarmit_ipc_isr(), the advertisement through the net core and its pacing fromswarmit_get_min_tx_interval_us(). A bare build needs those four behind a small platform layer with a second backend: the app-side LH2 decode with homographies pushed over the radio,db_radiofor commands and adverts, a fix sequence of its own, and a fixed advert period. That is a contained change but not a mechanical one, and it needs its own floor test on a cabled robot, so it is left for a follow-up rather than done half-way.dotbot-v1(nRF52833, due for deprecation around November 2026) would be dropped from that app rather than ported.apps-sandbox/dotbot-simplestays: a minimal remote-control demo (motors and LED, no position, no control loop) and a HIL check target.Validation
style,doc, readthedocs).apps-sandbox/), 0 warnings, 0 errors.make check-formatclean.dotbot-sandbox-dotbot-v3.bin(plain build, no bench telemetry), in the top strip of the dev corner: flash131/131 ok,swarm infoshows the image asdotbot-sandbox-dotbot-v3.bin. A single waypoint 190 mm away from a standing start with no heading: ARRIVED in 2.5 s, reported axle 10.0 mm from the target at a 10 mm threshold. A 3-point path: the index advanced 0, 1, 2 and it ARRIVED in 4.7 s, reported axle 11.4 mm off. A stop sent mid-batch: ABORTED with reason STOP within 0.5 s. Thenswarm stop(Bootloader) andswarm start(Running, report back to NONE). Battery was at 1.3 V throughout. Misses here are the robot's own advertised axle estimate, not LH2 truth.apps-sandbox/movebuilds but was not driven on the floor.Merge chain
Merged on 2026-09-25: DotBots/DotBot-libs#32, DotBots/PyDotBot#298, #425, DotBots/DotBot-libs#33, #426, DotBots/DotBot-libs#34, #427, DotBots/DotBot-libs#35, #428, DotBots/PyDotBot#301 and DotBots/PyDotBot#302, which completed the waypoint batches, then DotBots/DotBot-libs#36, the first PR of the cut-over (merge commit c1ff6ca). What remains, one PR at a time, in this order: this PR (after a rebase onto
mainand its finaldotbot-libsbump), DotBots/PyDotBot#303. Next to merge overall: this PR. Next after this one: DotBots/PyDotBot#303. Each firmware PR gets a finaldotbot-libs: bump to ... merge on maincommit, moving its submodule to its libs PR's merge commit on DotBot-libsmain, before it merges, as #425 to #428 did. The next firmware PR then conflicts on that submodule line, so it is rebased ontomainwhen its turn comes.Against
mainthe changes of #427 and #428 are not a row of their own: they editapps-sandbox/dotbot-next, which this PR moves toapps-sandbox/dotbot, so they show inside the newapps-sandbox/dotbot/main.cand drop out of this diff once this branch is rebased ontomain. GitHub shows +1287 -1242 today, against an older merge base; the table is this branch againstmainas it is now, which is what the diff becomes after the rebase.apps-sandbox/dotbotandapps-sandbox/dotbot-nextdotbot-nextas onmaindeleted (1226 lines), the new app in its placeapps-sandbox/moveAGENTS.mdapps-sandbox/applications.emProject, threesandbox-*.emProject,dotbot-libsmain