Commit Graph
1724 Commits
Author SHA1 Message Date
Antoine Pirrone 7fac0dff60 Merge pull request #603 from pollen-robotics/dynamic-pwm-limit
robotd: Goal PWM follows the battery so the motors see ~6 V
2026-11-16 18:16:01 +08:00
apirroneandClaude Opus 5.5 2b226332e6 robot.health carries the battery's Goal PWM; robotctl monitor shows it
HealthResult::goal_pwm (API_VERSION 62): the Goal PWM robotd last wrote
while bus.battery_voltage_based_pwm_limit is on, absent when off.
robotctl monitor shows it on the power row beside the battery, as
"pwm 81% (718)", and only when robotd sends it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 18:28:35 +09:00
apirroneandClaude Opus 5.5 e45f417d71 robotd: Goal PWM follows the battery so the motors see ~6 V
bus.battery_voltage_based_pwm_limit (off by default, a feature switch in
robotctl configure): every 10 s the loop writes Goal PWM = 885 * 6 V /
battery EMA to every servo — 73 % on a full 8.2 V pack, ~97 % at 6.2 V.
Goal PWM rather than PWM Limit, which only reaches Goal PWM at boot.
Safety restores it on the first apply after a servo reboot. Off writes
885 once at startup so a cap from an earlier run does not linger.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 17:35:05 +09:00
Antoine Pirrone 2d99c3aafe Merge pull request #602 from pollen-robotics/duckctl-scan-setup-code-qr
duckctl: setup-code add reads the label QR with the camera
2026-11-16 14:33:03 +08:00
apirroneandClaude Opus 5.5 b256b3355e duckctl: setup-code add asks scan or paste, and scans by default
No --scan flag: in a terminal, add asks whether to scan the label's QR with the
camera or paste the code, and Enter scans. A scan that cannot happen (no
camera, access refused, Esc) falls back to the paste prompt, and a code pasted
at the first question is taken as is. Piped, add reads stdin and asks nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 10:43:49 +09:00
apirroneandClaude Opus 5.5 13ea4b8f30 duckctl: --scan says why a setup-code QR does not read
A QR carrying md1: that does not parse — a key one character short, say — was
reported as "not a duck setup code", which sends the person looking for a
different QR. It now gives parse's reason (never the key).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 10:43:49 +09:00
apirroneandClaude Opus 5.5 06ba9bd3f9 duckctl: setup-code add --scan reads the label QR with the camera
Typing the 64-hex setup code by hand is the cumbersome part of setting up a
robot from a laptop. `--scan` (or an empty answer to `add`'s prompt) opens the
camera with nokhwa, previews it in the terminal in half blocks, and decodes
each frame with rqrr; the first QR that parses as a setup code is stored.

The Linux V4L2 bindings are generated by bindgen, so the manylinux build gets
clang-devel and kernel-headers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 10:43:49 +09:00
Antoine Pirrone 094d4bb4af Merge pull request #593 from pollen-robotics/release-0.21.1
Prepare release 0.21.1
daemon-v0.21.1
2026-11-13 18:41:15 +08:00
apirroneandClaude Opus 5.5 3198d2d195 Prepare release 0.21.1
Since 0.21.0: a 5 s hold of the face button opens ssh on wifi for 30
minutes, with a honk at 5 s; an NFC MIME text/plain record reads as
text; head_alpha back to 0.2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 18:31:41 +01:00
Antoine Pirrone 1e4d74d258 Merge pull request #591 from pollen-robotics/face-button-wifi-ssh
configd: hold the face button 5 s to open ssh on wifi for 30 minutes
2026-11-13 18:26:35 +08:00
apirrone 2c58b7123d configd: a 5 s hold, not a short press, opens wifi ssh, with a honk at 5 s
The honk (robot.sound alarm, best effort through robotd) comes at the
5 s mark while the button is still held: the cue to let go. A thread
per press times the hold; a release or a new press invalidates it.

Assisted-by: Claude:claude-opus-5-5
2026-11-13 16:58:54 +01:00
apirrone a59107a90d configd: a short press of the face button opens ssh on wifi for 30 minutes
The face button sits behind a hole that takes a pin: hands on the robot,
the line BLE crossed when system.openWifiSsh was withdrawn (v55).

- A press released within 3 s writes /run/microduck-ssh-wifi with a
  CLOCK_BOOTTIME deadline; the image's path unit opens ssh as before.
  A longer hold does nothing, leaving it to the factory reset.
- Every 10 s configd checks the deadline and closes: switch and drop-in
  removed, systemd reloaded, sshd.socket restarted. The deadline is in
  the file, so a configd restart still closes on time. Open sessions
  outlive it.
- An empty switch (sudo touch over USB) stays open until reboot.
- A reboot closes it whatever happened: everything is in /run.
- The network LED blinks blue while ssh is open on wifi.
- configd.service gets the one input device, read-only.

No wire change, so no API_VERSION bump.

Assisted-by: Claude:claude-opus-5-5
2026-11-13 16:41:09 +01:00
Coralie ac545c46b8 Merge pull request #590 from pollen-robotics/nfc-mime-text
nfc: a MIME text/plain record reads as text
2026-11-13 18:24:56 +08:00
apirroneandClaude Opus 5.5 4cede10a95 Head: head_alpha back to 0.2
0.1 came from a tuning session where robotd had not restarted, so the
value actually felt was still 0.2 — head_alpha is read at startup only.
On the robot, 0.1 makes the head too soft. max_speed stays at 10.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 17:36:35 +01:00
Pollen-CocoandClaude Opus 5.5 2fa3adeb12 nfc: a MIME text/plain record reads as text
Some phone apps write the pairing text as a MIME record (NFC Tools shows
"Media : text/plain") rather than an NFC Forum text record. nfcd skipped
it, so the tag quacked as read and then paired nothing. Its payload is
now the text, whatever the MIME type's case or parameters; any other
MIME type is still skipped. NTAG and Type 5 tags share the parser, so
both take it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 18:02:36 +08:00
Coralie d2d8eab1d9 Merge pull request #589 from pollen-robotics/release-0.21.0
Prepare release 0.21.0
daemon-v0.21.0
2026-11-13 15:27:14 +08:00
Pollen-CocoandClaude Opus 5.5 e3c9e23340 Prepare release 0.21.0
Since 0.20.1: NFC mode tags with soccer, the duck on its own (autod,
mapd) and laser tracking; writing and reading tags; stand-up retries;
pad head expo; the network LED; dimmer face LEDs; the join in flight in
net.status. API 55 -> 61.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 15:25:58 +08:00
Coralie d316cf3396 Merge pull request #588 from pollen-robotics/nfc-mode-tags
NFC mode tags: soccer, the duck on its own, laser tracking
2026-11-13 15:15:58 +08:00
Pollen-CocoandClaude Opus 5.5 3f1dc16b48 soccer: the two quacks of autonomous play ending differ
The single quack on starting is the bank's first chirp; the pair on
stopping is its first then its second, so the two are told apart and
never change. play_same takes which one, wrapping round a short bank.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 14:59:10 +08:00
apirrone cd050b58a3 Merge branch 'nfc-read' into nfc-mode-tags 2026-11-13 14:53:28 +01:00
apirroneandClaude Opus 5.5 843a2340d8 nfc: read a tag on request — robotctl nfc-read, duckctl nfc-read
`nfc.read` on nfcd's socket reads the next tag touched, or one already on
the reader, and answers with its UID and NDEF text/URI records. It waits,
quacks and keeps the tag from being acted on just as a write does, so a
pairing or mode tag can be checked without it pairing or switching. A tag
that moves mid-read is read again on the next poll until the wait runs out.

API_VERSION 61: a v60 nfcd answers nfc.read METHOD_NOT_FOUND, by name.
btd carries it; mediad does not. every_call() gains NfcWrite, which it was
missing, and NfcRead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
daemon-dev-nfc-read
2026-11-13 14:40:37 +01:00
Pollen-CocoandClaude Opus 5.5 186e368d93 soccer: always the same quack for autonomous play on and off
The bank picks a chirp at random; a cue someone learns to recognise has
to sound alike every time. Sound::play_same plays the tag's first wav
by name, and the soccer quacks use it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 14:44:11 +08:00
Pollen-CocoandClaude Opus 5.5 611c25483a soccer: a quack as the robot starts playing by itself, two as it stops
robotd says it on the switch's edge, so the pad's D-pad down, robotctl
soccer and autod's ball games all sound the same. The second quack of
the pair waits 350 ms: a sound cuts off the one before it, so two in
one tick would be heard as one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 14:27:19 +08:00
apirrone cf7bcfef97 Merge remote-tracking branch 'origin/nfcd-poll-less' into nfc-mode-tags daemon-dev-nfc-mode-tags-poll-less 2026-11-13 14:03:57 +01:00
apirrone b76a8a5b20 Merge remote-tracking branch 'origin/main' into nfc-mode-tags
# Conflicts:
#	pad-map/src/mapper.rs
2026-11-13 14:03:57 +01:00
Antoine Pirrone a5239df21f Merge pull request #587 from pollen-robotics/auto-retry-standup
robotd: retry a stand-up that stalls
2026-11-13 13:03:36 +08:00
apirroneandClaude Opus 5.5 837f1d6731 robotd: out of stand-up retries, park at home until stood on its feet
Instead of handing a stuck robot back to the policy after the last retry,
ramp it to the home pose and hold it there stiff with the policy off. Once
it has been upright and still for limp_fall_standup_resume_ms (1 s) —
somebody stood it on its feet and let go — the policy takes it back.
Start twice still ends the park.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 12:52:21 +01:00
apirroneandClaude Opus 5.5 ee4ccce812 robotd: retry a stand-up that stalls, as Start twice does by hand
From the back the policy sometimes gets half-way up and holds a pose it
never gets out of. Whenever the policy takes the robot, watch it: if it is
not up (inside limp_fall_tilt_z for limp_fall_arm_ms) within
limp_fall_standup_ms (3 s), pose it back to standing with the limp-fall
ramp and hand over again, up to limp_fall_standup_retries (3) times.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 12:47:25 +01:00
Antoine Pirrone 886b62dd79 Merge pull request #585 from pollen-robotics/pad-head-expo-speed
pad: expo curve and speed cap on the head sticks
2026-11-13 12:11:29 +08:00
apirroneandClaude Opus 5.5 85d34540ea pad-map: one D-pad table, and the head-glide test finds its arrow there
The test pressed D-pad down to mean plain driving; #584 put body + head
back on down, which keeps the head, so the glide no longer started from
the centre. The arrow-to-mode table is now a const the mapper and the
tests share, so a remap cannot break the test again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 12:03:50 +01:00
apirrone 1bfbc76166 Merge remote-tracking branch 'origin/main' into pad-head-expo-speed 2026-11-13 12:02:36 +01:00
apirroneandClaude Opus 5.5 ffe74d04e0 Head defaults tuned on the robot: max_speed 10, head_alpha 0.1
With the expo curve taking care of fine movements, a 10 rad/s cap keeps
big moves quick, and head_alpha 0.1 gives a softer finish.

head_alpha is robotd's, so the softer finish applies to every client
posing the head, and to the body pose, which shares it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 11:58:13 +01:00
apirroneandClaude Opus 5.5 5aedd7f79c pad: expo curve and speed cap on the head sticks
Head-mode sticks mapped linearly to the head target, smoothed only by
robotd's head_alpha EMA: hard to make fine movements, and a full snap
jumped then crawled in. Two pad-only settings in [pad_head]:

- expo (default 0.6): (1-e)x + e x^3, so the stick's centre is fine
  control and full deflection is unchanged.
- max_speed (default 3.0 rad/s, 0 = off): the stick-driven head target
  moves at most that fast, so a big move glides at a constant speed.

The IMU head is untouched. Both are live-reloaded like the rest of the
pad sections.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 11:34:39 +01:00
Antoine Pirrone 11cdfb4451 Merge pull request #586 from pollen-robotics/network-led-gamepad
Network LED: green on wifi, blue for a connected gamepad without wifi
2026-11-13 12:09:54 +08:00
apirroneandClaude Opus 5.5 df01ab69a3 Network LED: green on wifi, blue for a connected gamepad without wifi
The LED no longer says whether the relay is registered. Green is wifi
(blinking while joining); without wifi, blue is a bonded Bluetooth
gamepad connected; off with neither. Wifi wins when both hold.

Both facts are configd's own, so the indicator stops reading mediad's
/run/mediad/remote.json. architecture.md §3.2 updated to match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 11:57:56 +01:00
Pollen-CocoandClaude Opus 5.5 d097c91467 Merge main into nfc-mode-tags: face LEDs dimmed, D-pad remap reverted
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 11:39:14 +08:00
Coralie 86b222a598 Merge pull request #584 from pollen-robotics/revert-dpad-remap
Revert the D-pad remap (#583)
2026-11-13 11:38:05 +08:00
Pollen-CocoandClaude Opus 5.5 e49fb223ff Revert the D-pad remap (#583): back to left move, right head + move, down body + head
Reverts merge 69f828fa. Up was head mode before and after.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 11:28:51 +08:00
Pollen-CocoandClaude Opus 5.5 1006a0a31b Merge autonomous-revive into nfc-mode-tags: the autonomous_mode tag switches autod on
autonomous-revive brings autod, mapd and maploc, and robot.autonomous:
the switch robotd holds, which the autonomous_mode tag now sends after
laser and soccer off and the robot into walk. Every other mode tag
switches it off. The API is v60; soccer stays v58.

nfc-tags.md says what the tag does and that the pad takes over;
autonomous.md owns the rest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 11:18:00 +08:00
apirroneandClaude Opus 5.5 911c0933e7 Merge main into autonomous-revive: soccer, map and autonomy move to API v58-v60
main took v57 (a join's progress). Type 5 tag writing keeps refusing
MIFARE Classic; pad-map's cfg.skill keeps soccer's bumper kicks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
daemon-dev-autonomous-revive
2026-11-13 11:05:06 +01:00
apirroneandClaude Opus 5.5 ef3f2b1caa autonomy off costs nothing: autod and mapd idle, robotd ends the laser and ball
- autod, switched off, holds one connection and asks robot.mode once a
  second: no state stream, no ToF, no map. Switched on it opens a session
  (streams and a fresh brain) and closes it when switched off. The stand-up
  wait stops when the switch goes off, rather than running out its 20 s.
- mapd, unless [map] enabled, maps exactly while autonomy is on: off, it
  saves the map and its feeds hang up instead of mapping until a restart.
- robotd switches laser tracking and autonomous soccer off with the
  autonomy switch, so an autod that is down or restarting cannot leave
  them running. Soccer by hand is left alone.

Measured against robotd --fake: 0 CPU ticks for both while off, through
two on/off cycles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 11:01:20 +01:00
Coralie 69f828fa8e Merge pull request #583 from pollen-robotics/gamepad-dpad-remap
pad: D-pad left is head + move, right body + head, down move
2026-11-13 11:17:35 +08:00
Antoine Pirrone 5e55038f1e Merge pull request #581 from pollen-robotics/face-led-brightness
Dim the face indicator LEDs; leave the flashlight at full
2026-11-13 11:10:15 +08:00
apirroneandClaude Opus 5.5 b68b356688 Dim the face indicator LEDs; leave the flashlight at full
On face-board-v1's PWM drivers every LED lit at max_brightness (255),
which glares. Led now lights each one at a per-name level, capped at its
max_brightness: 5 for the camera LED, 15 for status, network and the
battery gauge, and the full max for the flashlight, which was already
tuned. The beta's on/off LEDs cap every level to 1, so nothing changes
there.

A blink now writes the level before starting the timer trigger, which
otherwise blinks at max_brightness when started from off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 09:59:55 +01:00
Pollen-CocoandClaude Opus 5.5 136c484d7f pad: D-pad left is head + move, right body + head, down move
Up stays head mode. The swap is in pad-map's one table, so padd and
netpadd, walk and roller, all follow; the configure labels, padd's
crate doc and the cheat sheet name the new arrows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 10:47:45 +08:00
Pollen-CocoandClaude Opus 5.5 2f814e6447 Merge main into nfc-mode-tags: Type 5 writes and the join's progress
main took API v57 for net.status's joining, so soccer moves to v58.
nfcd writes Type 5 tags now and still refuses a MIFARE Classic;
nfc-tags.md says so, and stays the one page for writing a tag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 10:45:50 +08:00
apirroneandClaude Opus 5.5 b40ebd9994 autod: keep the backward drift off the walls; a sit is a check, not lost
The walking policy drifts backwards when it turns in place, and nothing
sees behind. With the map's grid:
- a turn or a wander pivot with a wall within 45 cm behind and clear floor
  ahead creeps forward at the slowest walk instead of pivoting;
- no Stretch or Dance (body poses that lean) with a wall within 40 cm
  behind;
- backing up (odometry, < -4 cm/s smoothed) is logged with what was moving
  the robot, and with a wall within 35 cm behind the duck braces: the
  state ends (a ball game too), pose released, a step forward if clear.

mapd's `sat` and `bumped` are a nearby check, not lost: one survey, then
on with life, instead of 90 s surveying in place after every nap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 18:13:23 +01:00
apirrone 79ed15ec1e Merge branch 'autonomous-revive' into autonomous-map
# Conflicts:
#	autod/src/main.rs
daemon-dev-autonomous-map
2026-11-12 18:08:00 +01:00
apirroneandClaude Opus 5.5 63bdf3172a autod: see a get-up through — init pose and a second try, as the stress test does
After a fall robotd hands the robot to the standing policy to get up.
autod now watches that like robotctl stress (getup.rs, ported): still
down 5 s after the policy took over, the policy is cut for 2 s so the
robot settles into its init pose, then given back for a second try.
Down after that: torque off and the questioning quack.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 18:07:47 +01:00
apirroneandClaude Opus 5.5 187c9c4190 autod: see a get-up through — init pose and a second try, as the stress test does
After a fall robotd hands the robot to the standing policy to get up.
autod now watches that like robotctl stress (getup.rs, ported): still
down 5 s after the policy took over, the policy is cut for 2 s so the
robot settles into its init pose, then given back for a second try.
Down after that: torque off and the questioning quack.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 18:06:59 +01:00