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>
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>
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>
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>
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>
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>
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
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
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>
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>
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>
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>
`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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>