@@ -42,7 +42,7 @@ talk to it, and it drives the swarm through a gateway.
4242See the whole thing run with nothing but Python:
4343
4444``` bash
45- pip install --pre pydotbot
45+ pip install --pre pydotbot # using 'pre' while we are at release candidate
4646dotbot run simulator -w # opens the web UI at http://localhost:8000/PyDotBot/, driving a simulated swarm
4747```
4848
@@ -61,11 +61,13 @@ import requests, time
6161BASE = " http://localhost:8000"
6262bot = requests.get(f " { BASE } /controller/dotbots " ).json()[0 ][" address" ]
6363
64- # roll forward for ~1 s - the motors stop after 200 ms, so keep sending
65- for _ in range (10 ):
64+ # roll in a circle for ~5 s - left_y and right_y are the two wheel speeds
65+ for _ in range (50 ):
6666 requests.put(f " { BASE } /controller/dotbots/ { bot} /0/move_raw " ,
67- json = {" left_x" : 0 , " left_y" : 60 , " right_x" : 0 , " right_y" : 60 })
67+ json = {" left_x" : 0 , " left_y" : 60 , " right_x" : 0 , " right_y" : 30 })
6868 time.sleep(0.1 )
69+ requests.put(f " { BASE } /controller/dotbots/ { bot} /0/move_raw " ,
70+ json = {" left_x" : 0 , " left_y" : 0 , " right_x" : 0 , " right_y" : 0 })
6971```
7072
7173The full surface - every endpoint, the live WebSocket stream, and CSV data
@@ -92,7 +94,7 @@ Minimal hardware setup:
9294## Install
9395
9496``` bash
95- pip install --pre ' pydotbot[swarm] ' # --pre while 0.29 is in pre-release
97+ pip install --pre pydotbot # --pre while 0.29 is in pre-release
9698git clone --recurse-submodules --branch develop https://github.com/DotBots/DotBot-firmware.git
9799```
98100
@@ -120,10 +122,13 @@ Every command and flag is documented in the [CLI reference][cli-doc].
120122Build and flash firmware for a single dotbot:
121123
122124``` bash
123- # build the bare dotbot app into ./artifacts/ (needs SEGGER Embedded Studio)
125+ # build the bare dotbot apps into ./artifacts/ (needs SEGGER Embedded Studio)
126+ # two steps because the DotBot has two cores
124127dotbot fw artifacts --app dotbot
128+ dotbot fw artifacts --app nrf5340_net --target nrf5340dk-net
125129# cable-flash it to the bot whose J-Link serial starts with 77
126- dotbot device flash dotbot -s 77
130+ dotbot device flash dotbot -s 77 # app core
131+ dotbot device flash nrf5340_net -b nrf5340dk-net -s 77 # network core
127132```
128133
129134Now, build and flash the gateway to connect to a robot.
@@ -132,7 +137,7 @@ computer; it bridges the robot's radio to USB serial.
132137
133138``` bash
134139# build the gateway firmware for your DK board into ./artifacts/ (needs SEGGER Embedded Studio)
135- dotbot fw artifacts --app dotbot_gateway -t nrf52840dk
140+ dotbot fw artifacts --app dotbot_gateway --target nrf52840dk
136141# cable-flash it to the DK whose J-Link serial starts with 10
137142dotbot device flash dotbot_gateway -b nrf52840dk -s 10
138143```
@@ -151,60 +156,58 @@ and driving it from the web UI ([controller guide][controller-doc]).
151156
152157### setup the swarm
153158
154- To operate as a swarm, we need to fetch some firmware, and setup a configuration file :
159+ To operate as a swarm, set your swarm connection config :
155160
156161``` bash
157- # pull the pre-compiled firmwares from a release
158- dotbot fw fetch -f 0.8.0rc1 # or build yourself with: dotbot fw artifacts --sandbox
159- # configure where to connect and which swarm
160- cat > swarm-config.toml << 'EOF '
161- conn = "mqtts://argus.paris.inria.fr:8883"
162- swarm_id = "1234"
163- EOF
162+ dotbot config init --conn mqtts://argus.paris.inria.fr:8883 --swarm-id 1234
164163```
165164
166- > ` argus.paris.inria.fr ` is our Inria Paris broker and ` 1234 ` our swarm - replace
167- > ` conn ` and ` swarm_id ` with your own broker and swarm id (your testbed admin
168- > provides these).
165+ > ` argus.paris.inria.fr ` is our Inria Paris broker and ` 1234 ` our swarm - pass
166+ > your own ` --conn ` and ` --swarm-id ` (your testbed admin provides these). This
167+ > writes ` ./dotbot.toml ` ; commands run from this directory pick it up, so you
168+ > don't repeat the flags. Full schema: the [ configuration reference] [ config-doc ] .
169169
170170The swarm mode also requires a special "sandbox" firmware in each dotbot.
171- We also need a more powerful gateway firmware.
172- Let's flash both :
171+ We also need a more powerful gateway firmware. Let's flash both - the network
172+ id comes from your config :
173173
174174``` bash
175- dotbot device flash-mari-gateway -n 1234 -s 10 -f 0.8.0rc1 # flash the gateway, setting its swarm id to 0x1234
176- dotbot device flash-swarmit-sandbox -n 1234 -s 77 -f 0.8.0rc1 # flash the sandbox firmware - do this on each dotbot
175+ dotbot fw fetch -f 0.8.0rc1 # pull the pre-compiled firmwares from a release
176+ dotbot device flash-mari-gateway -s 10 -f 0.8.0rc1 # flash the gateway
177+ dotbot device flash-swarmit-sandbox -s 77 -f 0.8.0rc1 # the sandbox firmware - do this on each dotbot
177178```
178179
179180(` device flash-mari-gateway ` / ` flash-swarmit-sandbox ` auto-fetch
180181the release into ` ./artifacts/ ` if it isn't already there.)
181182
182- Now, run the gateway:
183+ Now, run the gateway (the broker comes from your config) :
183184
184185``` bash
185- dotbot run gateway -m mqtts://argus.paris.inria.fr:8883 - p /dev/cu.usbmodem0010500324491
186+ dotbot run gateway -p /dev/cu.usbmodem0010500324491
186187```
187188
188189### use the swarm
189190
190-
191191You can flash as many dotbots as you want, all at once! First, how about making them spinnnn 🔄 🔄
192192
193193``` bash
194- dotbot swarm -c swarm-config.toml flash ./artifacts/spin-sandbox-dotbot-v3.bin -ys # flash the whole fleet with a simple spinning app
194+ dotbot swarm flash ./artifacts/spin-sandbox-dotbot-v3.bin -ys # flash the whole fleet with a simple spinning app
195195```
196196
197+ (` dotbot swarm ` reads the same ` dotbot.toml ` as the rest - pass ` --conn ` /
198+ ` --swarm-id ` to override it for one run.)
199+
197200Then, flash another experiment:
198201
199202``` bash
200- dotbot swarm -c swarm-config.toml stop # ensure all robots are in bootloader
201- dotbot swarm -c swarm-config.toml flash ./artifacts/dotbot-sandbox-dotbot-v3.bin -ys # this firmware allows bots to be remote-controlled
203+ dotbot swarm stop # ensure all robots are in bootloader
204+ dotbot swarm flash ./artifacts/dotbot-sandbox-dotbot-v3.bin -ys # this firmware allows bots to be remote-controlled
202205```
203206
204207Observe and control your swarm from a web interface:
205208
206209``` bash
207- dotbot run controller --conn mqtts://argus.paris.inria.fr:8883 --swarm-id 1234 - w # will open a webpage at http://localhost:8000/PyDotBot/
210+ dotbot run controller -w # will open a webpage at http://localhost:8000/PyDotBot/
208211```
209212
210213Full walkthrough of fleet operations - status, OTA flash, start/stop, monitor -
@@ -222,8 +225,8 @@ dotbot device flash lh2_calibration -s 77
222225dotbot run lh2-calibration collect -p /dev/tty.usbmodem0007745943981 -d 200 # square of side 20 cm
223226
224227# 2. push the resulting calibration to the fleet over the air
225- dotbot swarm -c swarm-config.toml stop # ensure all robots are in bootloader
226- dotbot swarm -c swarm-config.toml calibrate-lh2 ~ /.dotbot/calibration-2026-05-26T14-00-36Z.toml
228+ dotbot swarm stop # ensure all robots are in bootloader
229+ dotbot swarm calibrate-lh2 ~ /.dotbot/calibration-2026-05-26T14-00-36Z.toml
227230```
228231
229232Your bots now report their ` (x, y) ` location. The full setup - arena sizing,
@@ -236,12 +239,10 @@ Full command reference and guides - running the controller + web UI, the four
236239CLI namespaces (` fw ` / ` device ` / ` swarm ` / ` run ` ), hardware, and LH2
237240calibration - are in the [ documentation] [ doc-link ] .
238241
239- Some commands need optional runtime deps :
242+ Swarm orchestration is in the base install. Only LH2 calibration needs an extra :
240243
241244``` bash
242- pip install --pre ' pydotbot[swarm]' # swarmit (fleet orchestration)
243245pip install --pre ' pydotbot[calibrate]' # opencv-python + textual (LH2 calibration)
244- pip install --pre ' pydotbot[all]' # everything
245246```
246247
247248Hitting a snag (e.g. the web UI not loading in Firefox)? See
@@ -274,6 +275,7 @@ See `LICENSE` in each component repository.
274275[ fw-doc ] : https://pydotbot.readthedocs.io/en/latest/cli/fw.html
275276[ device-doc ] : https://pydotbot.readthedocs.io/en/latest/cli/device.html
276277[ swarm-doc ] : https://pydotbot.readthedocs.io/en/latest/cli/swarm.html
278+ [ config-doc ] : https://pydotbot.readthedocs.io/en/latest/reference/configuration.html
277279[ controller-doc ] : https://pydotbot.readthedocs.io/en/latest/guides/controller.html
278280[ lh2-doc ] : https://pydotbot.readthedocs.io/en/latest/guides/lh2-calibration.html
279281[ troubleshooting-doc ] : https://pydotbot.readthedocs.io/en/latest/reference/troubleshooting.html
0 commit comments