Commit Graph
157 Commits
Author SHA1 Message Date
apirroneandClaude Opus 5.5 fa16f967ed autod: the duck chases the laser and plays with the ball; a tag switches it on
The brain gains two states, both driven by robotd and wanted by the brain:

- Laser: tracking is on whenever the duck could chase (not tired, not
  napping, petted or playing ball). A followed dot interrupts any
  standing or walking state; the chase ends 2 s after the dot goes, and
  costs twice a walk's energy. Below 0.2 the laser goes off and the duck
  naps; it comes back above 0.45.
- BallPlay: picked from the standing pool when rested and off cooldown,
  less often the more bored of the ball. No ball in 20 s backs off 3 min,
  doubling per miss up to 30. A game ends on 3-8 kicks, 1-3 min shrunk by
  boredom, the ball lost for 15 s, or tiredness; then 4-8 min of rest.

While robotd drives either, autod sends a zero twist and a centred head,
which robotd reads as nobody asking. A game somebody else started is
stood aside for, and the brain's own is switched off when the pad takes
over.

The on/off switch moves into robotd (robot.autonomous, read back in
robot.mode and robot.state; part of v59), so the NFC autonomous_mode tag
can switch it — nfcd cannot write robotd.toml. [autonomous] enabled is
now only where each boot starts; robotctl autonomous on|off switches it
now. autod stands the robot up on the switch's rising edge, and once per
boot for the switch at boot. padd learns it from robot.mode. mapd starts
mapping the first time it sees the duck switched on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 17:27:01 +01:00
apirroneandClaude Opus 5.5 7bc9fb2e26 Merge autonomous-mode (autod) into autonomous-revive: the brain is API v59
The October brain, brought up to main. Beyond the conflicts:

- The pad's handoff (silent until touched, lets go after pad_idle_s) is
  now pad_map::engage, since main moved padd's mapping into pad-map. A pad
  nobody was touching going away no longer sits the robot down: the brain
  was driving, not the pad.
- autod walks at the pad's [pad_drive] full stick rather than the removed
  robotd_params::drive constants.
- [map]'s template values are commented out like [laser] and [soccer]:
  they never shipped live, so they do not belong in EVER_SHIPPED.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 17:01:35 +01:00
apirroneandClaude Opus 5.5 5076bb6542 Merge maploc-v2 (maploc, mapd) into autonomous-revive: map.* is API v58
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 16:52:01 +01:00
apirroneandClaude Opus 5.5 e01e0b07e2 soccer: stand still, head neutral, then kick
On the robot every autonomous kick started (`skill started
skill=kick_right`, five times) and none kicked: the head snapped to its
neutral pose and the legs barely moved — while LB/RB kicked fine.

The difference is where the kick starts from. By hand it starts from a
robot standing still and looking ahead, which is what the kick network
was trained from. Soccer started it the tick it lined up: mid-step from
the last correction, with the head pitched right down at the ball under
the beak — a state the network has not seen.

Now, lined up, the robot stands still with its head neutral for
`[soccer] ready_ms` (600 ms, `getting ready` in the readout), then
kicks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 16:20:31 +01:00
apirroneandClaude Opus 5.5 ddaf884ea1 soccer: kick through the gait's sway, and from a stall short of the spot
On the robot it walked to the ball and never kicked, while LB/RB did —
so the kick was never asked: the ball never sat in the kick spot
(±4 × ±2.5 cm) for settle_ms in one go.

Two ways that happens, both handled. The gait sways the trunk a
centimetre or two a step even standing, and every sway out of the spot
restarted the settle: now the spot is left only past twice the
tolerances. And the last centimetres ask for less speed than the gait
walks, so the robot stops just short: within twice the tolerances for
`[soccer] stall_ms` (1.5 s) it now kicks from there.

`robot.state`'s soccer block gains `spot_m`, the ball's offset from the
kick spot, shown by `robotctl soccer` — what to read when it stands at
the ball and does not kick.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 16:09:42 +01:00
apirroneandClaude Opus 5.5 f8a9e30ed3 soccer: face the ball before walking, and a kick is only a kick once it started
On the robot the approach curved — walking and turning at once — and
near the ball it stopped and looked back up without kicking.

Turn, then walk: the legs only walk once the ball is within
`[soccer] align_rad` of straight ahead (near the ball, the kicking
foot's line to it), and stop to turn again past twice that.

The kick: autonomous soccer used to forget the ball and look away the
moment it *asked* for a kick, whether or not the loop started one — and
a refused skill is logged at debug, so nothing said why. The loop now
reports each soccer kick's outcome back in the same tick: started, the
ball is forgotten for the cooldown with the head left on where it was;
refused, the ball stays tracked, the reason is logged at warn, and the
kick is asked again after another settle.

And within approach_m, where the ball is under the beak and out of the
picture, it is remembered for `close_memory_ms` (10 s) rather than
memory_ms, so lining up by odometry alone does not run out of time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 11:35:35 +01:00
apirroneandClaude Opus 5.5 13ebe9c5bb Soccer mode: kicks on the bumpers, and a robot that plays by itself
Two switches in robotd, set by `robot.soccer {active, autonomous}`:

- soccer mode: the pad's LB/RB run kick_left/kick_right whatever they
  are bound to, and D-pad down starts autonomous play instead of
  body + head;
- autonomous: the robot turns until it sees the purple ball, walks to
  it, steps sideways until the ball is in front of the foot on its
  side, kicks, and looks again. Any pad button takes it back to manual,
  and that press does nothing else. A pushed stick wins over it, as
  over the laser.

mediad finds the ball (`media.ball`, beside `media.laser`, sharing its
look loop): purple is the hue with both chromas above grey; passing
cells on a 4x4 grid are grouped into blobs, and a blob is the ball when
big enough, filled and round — a ball cut by the frame's edge keeps its
centre and radius from its uncut sides. Every look carries the most
purple colour seen, passed or not, for tuning. robotd projects the
centre onto the plane a radius above the floor with the laser's own
projection, now shared, and carries it by odometry through the last
steps where the ball is under the beak.

The pads learn soccer mode from `robot.mode`, which they already poll
each second — so an NFC tag switching it reaches the pad. Soccer and
laser tracking switch each other off. `[soccer]` holds the detector
thresholds, the kick spot and the gains, all live; `robotctl soccer
on|auto|off` switches it and is the tuning view; the web console draws
the ball.

API_VERSION 54: `robot.soccer`, `robot.mode`'s `soccer`,
`robot.state`'s `soccer` block, `media.ball` / `media.ballSeen`.

Colour thresholds are a first guess; to be tuned on camera images.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 13:25:32 +01:00
Pierre Rouanet 6bb6c67613 Merge pull request #556 from pollen-robotics/codex/secure-media-and-ble-defaults
Secure media and BLE access by default
2026-11-10 13:58:50 +01:00
apirroneandClaude Opus 5.5 d0bf4c94c4 robotd: the impact guard is off by default
On the stress test, cream-dvt-antoine broke about 6 times fewer gearboxes per km
than the stock robot with the guard on, but about half its falls were its own,
against 8-14 % on every other robot, on V3 and V4 alike. Until that is explained
bus.impact_guard ships off, so the code is merged and an update that sets it is all
a robot needs. Off is V4's switch at 0 and never-firing settings on V3; Current
Limit stays 1000 mA either way. Off is now every robot's normal state, so saying so
at start is info rather than a warning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 13:11:17 +01:00
apirrone adff6e238d Merge remote-tracking branch 'origin/main' into impact-guard-v3
# Conflicts:
#	duck-ipc-proto/src/lib.rs
2026-11-10 13:00:23 +01:00
apirrone ed7c147f3f Merge remote-tracking branch 'origin/main' into impact-guard-v3 2026-11-10 12:41:55 +01:00
Antoine Pirrone 7ad9c99245 Merge pull request #558 from pollen-robotics/laser-track
Laser tracking: follow a laser dot with the head and the legs
2026-11-10 05:55:44 +01:00
apirroneandClaude Opus 5.5 145e91b24b pad_drive: default vx_min is -0.3
Full stick back while walking now asks for 0.3 m/s instead of 0.4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 11:29:59 +01:00
apirrone 87f6d94672 Laser: search at 1 Hz by default
Measured on a face-board-v1, each look costs about the same — ~5 ms of
scan plus a 1.8 MB frame copy — so the search cost is the rate: 3 Hz was
3.4% of one core in mediad. 1 Hz is about a third of that, for up to a
second before a dot is first noticed; tracking still starts at
`track_hz` from that look.

The two staleness timeouts sized for 3 Hz — robotd's DOT_STALE and the
console's overlay timeout — go to 2.5 s, so one look a second (each of
which may wait half a second for its frame) is not read as a stall.

Assisted-by: Claude:claude-opus-5-5
2026-11-09 17:17:07 +01:00
apirrone b6415e2f1c Laser tracking: follow a laser dot with the head and the legs
Ported from the prototype runtime, rebuilt for the daemon split.

mediad finds the dot (`media.laser`, a local subscription on media.sock):
it scans frames the tee already hands out, at the stream's own
auto-exposure, so the video is untouched. It looks at `search_hz` until
it sees a dot and `track_hz` while it does, and publishes a direction —
a ray in the upright camera frame, intrinsics and board mount undone —
plus the colour of the best candidate whether it passed or not.

robotd projects that ray onto the floor through head FK, the IMU and
odometry, points the head with the existing look_at IK and walks to the
spot. Each half is taken only while no client wants it: a pushed stick
always wins, and with no dot in sight the robot does what it was told.

`robotctl laser-track on|off` switches it, and its live view is the
tuning tool. `[laser]` in `robotctl configure` holds the thresholds,
rates and walking gains; every key applies live, `enabled` included.

API_VERSION 52: `robot.laserTrack`, `robot.state`'s `laser` block,
`media.laser` / `media.laserDot`.

Assisted-by: Claude:claude-opus-5-5
2026-11-09 15:50:09 +01:00
apirroneandClaude Opus 5.5 730710b99d Merge branch 'main' into impact-guard-v3
impact guard moves to API v52: main took v51 for pad pairing candidates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 10:29:16 +01:00
Thomas Wolf d27653315f Add opt-in authenticated local media gateway 2026-11-08 20:49:13 +01:00
Nicolas RabaultandClaude Opus 5.5 2ffb61d107 docs: V4 also runs new guard settings without a reboot
On the gear bench (V4, 2026-11-06), the servo powered up with K's settings in its
EEPROM, R's were written with torque off and no reboot followed, and the very
first R shot ran R: a 13 ms brake instead of 41, a 1.0 A hold instead of 0.22,
and the R taper. V3 already showed the same on lavandiere, so the reboot advice
goes for both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 17:21:48 +01:00
Nicolas RabaultandClaude Opus 5.5 d2146ef1ea robotd: V3 runs new guard settings without a reboot; V4 is unchecked
On lavandiere (V3, 2026-11-05) each robotd restart changed the hold current
or the taper, and the very next walk showed the new value: the held current
clamped at 800, then 500, then 650 mA, then ran free with the hold off, with
no motor reboot in between. The docs now say V3 needs no reboot, and keep
the reboot for V4, where no clean check has been made yet. Off on V4 still
leaves the settings to the switch, which needs no rewrite either way.

Also: 0 on V4's switch is the factory firmware's behaviour, and the doc of
impact_guard_settings_fill_their_registers is back on its own test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 17:19:54 +01:00
apirroneandClaude Opus 5.5 2e47de12fd robotd: V4's off is its switch alone, and guard settings wait for a reboot
bus.impact_guard = false still wrote the never-fire thresholds to V4's EEPROM. A
servo loads those settings only when it reboots, so OFF could be what it ran after
the guard was back on: the switch at 1, the config true, and nothing that fires.
Off now leaves V4's settings alone, so the toggle needs no reboot either way; V3,
which has no switch, keeps its never-fire settings.

Changing the six settings stays a relax, a restart and a motor reboot: they rarely
change, so nothing reboots a servo for them, and the docs now say so. The switch
write is also no longer described as limp: a servo still stiff after a robotd
restart takes it too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 23:56:45 +01:00
apirroneandClaude Opus 5.5 5730853138 robotd: V4's guard switch follows bus.impact_guard
Every torque on wrote Impact Guard Enable (67) = 1 to V4 servos, so
bus.impact_guard = false never reached the switch: it only wrote thresholds that
never fire, with the guard's code path still on. Torque on now writes 0 for off and
1 otherwise, and writes it either way because a switch left on by an earlier run
survives a robotd restart.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 23:33:54 +01:00
Nicolas RabaultandClaude Opus 5.5 e2d3ecedfd robotd: V4 servos get the impact guard, switched on with every torque on
ROBOTIS's V4 (firmware_version 4) has V3's guard registers behind Impact Guard
Enable (67, RAM), which every power-up and firmware start turns off; off, the
six settings do nothing. The gear bench lost two teeth in about 17 shots to a
V4 servo left that way. The register check now writes the settings to V3 and V4
alike, and torque on writes 67 = 1 to each V4 servo first, while it is still
limp: a reboot, a latched error or a power cut all end limp, so that one write
covers them whether or not they clear the switch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 14:15:54 +01:00
apirroneandClaude Opus 5.5 d081d80053 Merge remote-tracking branch 'origin/main' into impact-guard-v3
Both sides took API_VERSION 50. main's is released in 0.18.6, so it keeps
v50 (the remote-session check) and the impact guard moves to v51.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 10:00:52 +01:00
Pierre Rouanet 6f28f95f16 Merge pull request #533 from pollen-robotics/board-face-board-v1
Add the face-board-v1 board
2026-11-06 07:55:16 +01:00
Pierre Rouanet f12becac5a Add the face-board-v1 board
The beta main board with the V1.0 face board (Awinic LED drivers in place of
the PCA9535 expander) was declared "beta", so robotctl showed the main board
it is built from rather than the board it is. It gets its own name,
face-board-v1, hw_rev 3, detected from pollen,microduck-face-board-v1.

Everything decided by the main board (body and head IMU, camera, ToF and NFC
on SPI, SoC serial) goes through Board::is_beta_main_board(), so the new
board behaves exactly like a beta. install.sh and provision-board.sh accept
the name.

Assisted-by: Claude:claude-opus-5-5
2026-11-05 11:38:32 +01:00
Nicolas RabaultandClaude Opus 5.5 adeb5bceb7 robotd: the impact guard defaults to setting R, what a microduck walks with
ROBOTIS's factory values tripped the brake on nearly every step and their hold
softened the stance leg, so the robot kept falling. R, found on lavandiere with
the walking ONNX: brake 20 ms on arrivals faster than 6 rad/s, no hold, and the
PWM limit falling to 40 % at 7 rad/s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 11:27:33 +01:00
Coralie c15c2377d8 Merge pull request #529 from pollen-robotics/roller-idle-and-accel
robotd: roller stays up when idle and through a reversal
2026-11-05 11:20:44 +01:00
Nicolas Rabault 2781079306 robotd: the impact guard's six settings are bus.impact_guard_* in robotd.toml
On wrote ROBOTIS's factory values and nothing else. On a walking robot the factory guard
fires at foot strikes on every joint and can leave a knee soft for tens of seconds, so a
test needs the settings between that and off: V Min, Brake Time, Deceleration, i Hold,
V Fast and PWM Fast, each a row in `robotctl configure`.

The defaults are the factory values, so a robot that sets none writes what it wrote
before, and off still writes settings that never fire. V Fast 0 (the firmware divides by
it) and PWM Fast outside 1-100 are refused. A start on anything but the factory values
names them in the journal, so a recording can be matched to the settings it ran on.

Assisted-by: Claude:claude-opus-5-5
2026-11-05 11:11:00 +01:00
Nicolas Rabault 17ae76bc29 robotd: bus.impact_guard switches V3 servos between the guard and the factory
On (the default), the startup register check asserts ROBOTIS's factory values for
the impact guard's two EEPROM blocks (40-43, 56-59) on every servo running its
firmware. Off writes a deceleration no impact reaches, a hold current the motor
never draws and PWM Fast at 100 %: the factory firmware with only Current Limit,
to compare the two on one robot. Same torque-on rule as Current Limit: a standing
robot gets the write at the next start.

Assisted-by: Claude:claude-opus-5-5
2026-11-05 11:11:00 +01:00
drenayazandClaude Opus 5.5 352220b7d9 robotd: the roller ramps forward/back instead of flipping
Going from full forward to full back threw the roller over. The only smoothing
was `[control] cmd_alpha`, an EMA whose rate is proportional to the jump: 1.1 m/s
reversed in about a quarter second. Lowering cmd_alpha to 0.05 kept it up but
made it hard to steer, since that slows every axis.

`[policy] accel_vx`, `accel_vy`, `accel_vyaw` cap how fast the smoothed twist
may change, after the EMA, so a small stick move is the EMA it was and only a
large jump becomes a ramp. Unset resolves per mode: no limit on any axis
walking (bit-for-bit the EMA, tested), and on the roller 1.0 m/s² on vx with
strafe and yaw left free. 0 is no limit; negative or non-finite is refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 12:47:44 +01:00
drenayazandClaude Opus 5.5 daf2a9533e robotd: the roller does not look around when idle
The idle look-around moves the head *command*, and the head command is an
observation input (obs 51..55), not a target added on top. roller.onnx was not
trained with one moving and folds under it: on the robot, the roller collapsed
about three seconds after the stick was let go — the 2 s delay plus the fade-in.
With [idle] enabled = false it stood indefinitely.

`idle.enabled` is now a tri-state like `audio.pet_detect`: unset resolves per
mode, on walking and off on the roller; an explicit value wins in either mode.
The loop asks every tick, against the current mode, so `robot.setMode` takes
it along. Walking is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 12:41:18 +01:00
Pierre Rouanet b64def7b73 updaterd: automatic rollback is off unless asked for
`[update_gate] auto_rollback` in robotd.toml, default false, a row in
`robotctl configure`. It gates every path that reverts without being
asked:

- the health gate after `update apply`, `select` and `rollback`;
- the boot counter on a trial that never confirmed;
- `robot-boot-check` handing over to `robot-rescue`.

Off, the gate still runs and decides. A release that fails stays live,
reported `Stuck` with `robotctl update rollback <component>` in the
reason; the trial is cleared, and the journal entry is aborted rather
than rolled back, so `known_bad` does not blacklist it. The boot check
names the failed units and the manual `robot-rescue --reboot`, and exits
2. `--dry-run` is unchanged, since the OS slot gate reads it.

Releases now reach robots as tested Yocto images, and a separate daemon
update is the dev-board case, where an unasked revert replacing the
code under whoever holds the robot does more damage than it prevents.
A soft deprecation: the code stays, tested, one setting away.

`updaterd` reads the key from `robotd_config` (new, defaults to
/etc/robot/robotd.toml), both layers, at the moment of deciding, like
`allow_community` and the board. Test fixtures turn it on where they
test what a revert does.

Assisted-by: Claude:claude-opus-5-5
2026-11-04 12:38:25 +01:00
apirroneandClaude Opus 5.5 db7f0311bf robotctl configure --allow-dev-daemon: a dev board in one command
Making a board take branch builds meant copying team.dev.pub into
/etc/robot/trusted_keys under exactly the right name, sed-ing
allow_dev_keys in updater.toml, and restarting updaterd. On the Yocto
image both live in /etc, which an A/B OS update replaces, so the board
quietly stopped being a dev board at the next OS update.

updaterd now carries the dev public key built in (always dev-only), and
dev keys count when `allow-dev-builds` exists in its state_dir, under
/var/lib/robot, which survives OS updates. `sudo robotctl configure
--allow-dev-daemon on|off` writes or removes it and restarts updaterd.
allow_dev_keys = true in updater.toml still works, so provisioned boards
are unchanged; the shipped config keeps it false and nothing ships the
marker.

Needs an updaterd from a release that carries this: an older one
ignores the marker.

Docs: updater-design.md §5.4 owns the mechanism; install-dev,
cheatsheet-dev, dev-push, architecture, deploy READMEs, config comments,
--ref help text, xtask keygen and the dev.yml note point at the command.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 14:50:22 +01:00
Pierre Rouanet 0357f5976e robot-boot-check: decide once the daemons settle, not 180 s in
The boot check slept until 180 s after boot and looked once. On a Yocto
board every member is up by 16 s, so a healthy boot waited nearly three
minutes for a verdict nothing needed it to wait for — and the OS's own
gate, which copies the deadline, held the OS update page on "rebooting"
for as long.

The timer now starts the script a second in, and it looks every 2 s
until the first of: a member that did not come up (hand over at once;
the predicate is unchanged), every member `active` for 10 s straight
(the release came up — about 25 s in on a Yocto board), or the deadline.

The deadline is `[update_gate] boot_deadline_s` in robotd.toml, 60 s by
default. It is when a boot that never settles is judged, by restart
count, and updaterd's 10 s RestartSec needs about 45 s to show a crash
loop. The script clamps it to 20-300 rather than robotd-params refusing
it, since every daemon reading the file exits on a refused value.
`robotctl configure` says it applies at the next boot.

`--dry-run` now exits 3 where it would have handed over, so
microduck-slot-health can ask the same question instead of copying it.

Assisted-by: Claude:claude-opus-5-5
2026-10-29 17:28:01 +01:00
Pierre Rouanet 251359a12e Merge pull request #483 from pollen-robotics/config-survives-os-update
Keep the owner's config and sign-in across OS updates
2026-10-29 11:56:14 +01:00
Pierre Rouanet a9788fd11b Keep the owner's config and sign-in across OS updates
On a robot whose OS updates by A/B slots (microduck_yocto), /etc is the
image's and every OS update replaces it. robotd.toml and hf-token both
lived there, so each OS update reset every setting changed with
robotctl configure / policy / pad or from the phone, and signed the
robot out of its Hugging Face account.

robotd.toml is now two layers. /etc/robot/robotd.toml is the base, what
the image or installer wrote; /var/lib/robot/robotd.toml holds only the
keys changed on this robot and wins key by key (tables merge, lists
replace whole). Params::load merges them for every reader at the
default path; a file named with --params/--config is still read alone.
Every writer goes through robotd_params::edit, which now writes the user
layer only, treats the base's value as the default a key reverts to,
and validates a staged user layer against its base before renaming it
in. padd and netpadd poll both layers' mtimes.

A user layer that does not parse or validate is set aside instead of
stopping robotd: the robot runs on the base, and health reports
degraded naming the file. Unhealthy would roll back every release over a
file no release can fix. A broken base is still fatal.

The HF credential moves to /var/lib/robot/hf-token. updaterd moves a
token left at /etc/robot/hf-token at startup, keeping its group and
mode, and removes the old copy.

updater.toml is unchanged and still single-layered; architecture.md
records the two per-robot keys in it as open.

Assisted-by: Claude:claude-opus-5-5
2026-10-28 15:44:02 +01:00
Pierre Rouanet 83d8d4b2ab policy: fetch community policies only when allowed
A robot now only fetches policies from pollen-robotics on the Hub.
`[policy] allow_community` in robotd.toml, false by default, lets
`policy.fetch` download from any other org. Refused, it answers
PERMISSION_DENIED naming the key, before any request is made.

The gate is in updaterd's fetch, the one place every transport and
client reaches. updaterd reads the key before each fetch, as it does
the board, so `robotctl configure` applies it live with no restart.

It gates the download only. A slot already pointing at a community
policy keeps running, so turning the key off never changes what a
robot runs at its next start. policy-channel-design.md section 9.2.

Assisted-by: Claude:claude-opus-5-5
2026-10-28 15:39:30 +01:00
apirroneandClaude Opus 5.5 024e125101 limp-fall: arm the fall predictor only from standing
A robot that has not stood since its last fall cannot fall. The predictor
now arms once gravity z has been inside limp_fall_tilt_z for
limp_fall_arm_ms (200 ms) and disarms when it fires or is reset.

Seen on a robot: the limp pose after a fall forwards leaves it on its front
at gravity z -0.52, a hair short of fall_gravity_z, so not `fallen`. Handed
back, it sags at +0.3/s: tilted, tipping and predicted past -0.5, so it
limped, posed and limped again until the fall verdict happened to latch.
The same edge fires mid get-up from the back: `fallen` clears on one sample
at -0.5 and the first wobble limps the robot. Replayed on the recordings
from the current study, the old logic reproduces all five limps the robots
did; the new one keeps the one real fall (from walking) and drops the four
mid get-up ones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 10:17:34 +01:00
apirroneandClaude Opus 5.5 e3687a1675 provisioning: a re-run reports its own result, not the last attempt's log
A re-run of provision-board.sh on a board whose phase 2 had failed showed
that old failure as its result. The state file outlives a failed phase 2,
so provision.sh skips phase 1 and the reboot and does phase 2 inline, in
the ssh session. The launcher could not tell: it ignores ssh's status
(a phase 1 drops the connection), waited for a reboot that never came,
then streamed /var/lib/robot/provision.log from byte 0 — which only phase 1
empties, so it was the previous attempt's, with its old timestamps. On
2026-10-17 that replayed a fixed 'response too large' from the day before
across a day of re-runs, while the runs themselves resolved 0.17.6.

provision.sh now records how a launched run ended in
/var/lib/robot/provision.outcome, keyed by a run id the launcher passes:
'rebooting' just before the reboot, 'done' in finish, and 'ended <status>'
from an EXIT trap for anything else (signals become exits so dash runs it).
The launcher reads it right after ssh returns: done reports health and
stops, ended dies pointing at the session output, and only a reboot or no
answer goes on to wait and stream. An inline phase 2 also empties the log
first, with a line saying where its output went, so anyone reading it by
hand — or through an older launcher — no longer sees the stale attempt.

The board always fetches provision.sh from the ref, so any board left in
this state is covered by the next run. shellcheck clean; the outcome
recording and the launcher's dispatch were exercised in dash, not yet on
a board.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 13:07:50 +02:00
apirrone 33b952ed35 Merge remote-tracking branch 'origin/main' into maploc-v2 2026-10-14 17:46:22 +02:00
apirroneandClaude Opus 5.5 f7e2f10949 Merge origin/main into maploc-v2
main took API v42–v44 for the vet book, so map.* moves to v45. netpadd
joins mapd in the release units, the restart order and configd's MANAGED
list (now ten); the Call variant count is 77 with both sides' routes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 10:10:35 +02:00
Pierre Rouanet 3a293d438d robotd: the idle beak opening is big enough to see
The mouth's 0..1 runs from -5 degrees, held past shut, to +30. At
glance_mouth 0.15, scaled by reach and a uniform draw, a look opened
it to about -3 degrees on average: still shut, seen on the robot.
Now 0.4 by default, each look opening it between half and all of
that, not shrunk by dozing.

Assisted-by: Claude:claude-opus-5-5
2026-10-13 17:08:48 +02:00
Pierre Rouanet 97a3b9bf2f robotd: idle leans the neck and opens the beak a touch with each look
Each new look draws a neck lean of up to glance_neck forward or back
and a beak opening of up to glance_mouth, eased with the glance and
held through the look's nudges. The yawn adds on top of the beak.

Assisted-by: Claude:claude-opus-5-5
2026-10-13 16:58:12 +02:00
Pierre Rouanet 5dc7339294 robotd: idle yawns now and then, and a new look always goes somewhere
After yawn_after_s idle it yawns about every yawn_every_s: the beak
opens to yawn_open and the head tips by yawn_pitch, silently. The
mouth takes the wider of the yawn and what a client asked. A new
glance lands at least glance_min from the last look.

Assisted-by: Claude:claude-opus-5-5
2026-10-13 16:56:14 +02:00
Pierre Rouanet 5b578be522 robotd: idle look-around keeps moving during a look, and is tunable
A held look read as frozen: the only motion was a ~2° drift at under
0.1 Hz. The gaze now shifts a few degrees around the look every
0.4–1.2 s, the way eyes re-fixate, and looks are shorter (1–3 s rather
than 1.5–4.5 s), moves a little quicker, the drift faster and dozing
shallower — so it moves more often.

Every number is now `[idle]` in robotd.toml, editable from
`robotctl configure`, with an `enabled` switch. Read once at startup;
values it would divide by or ranges put backwards are refused by name.

Assisted-by: Claude:claude-opus-5-5
2026-10-13 11:50:12 +02:00
Pierre Rouanet edb6379f1c netpadd: stale_ms defaults to 300
200 stopped the robot on every Wi-Fi spike past it, and dropped those
datagrams as late. 300 rides out more jitter for about 10 cm of blind
walking at full speed, and stays clear of the 500 ms deadman.

Assisted-by: Claude:claude-opus-5-5
2026-10-13 11:28:36 +02:00
Pierre Rouanet dec74db3b6 netpadd: a stalled client stops the robot and keeps its session
A silence now has two stages. Past `[netpad] stale_ms` (200 ms) the walking
stops at once and the mapping stops running; the head and body pose stay
where they are. The client keeps the lock, its holds and its buttons, so a
press in its next datagram fires. Past `timeout_ms`, now 1000 ms by default,
it is gone as before.

Before, the 100 ms fallback tick kept re-sending the last stick until the
timeout, so robotd's deadman only started counting once netpadd went quiet:
about 750 ms walking blind on a dead link. And any gap over 250 ms, routine
on Wi-Fi, was a full reconnection that swallowed presses and reset holds.

The deadman check moves from `timeout_ms` to `stale_ms`, which is also now
the lateness limit for delivered datagrams. Stalls are counted in the 10 s
`link:` line.

Assisted-by: Claude:claude-opus-5-5
2026-10-13 11:26:19 +02:00
Pierre Rouanet b1df8ffbb7 pad-map: configurable stick axes, for padd and netpadd alike
The evaluator this PR added to padd now lives where the mapping does since
main extracted it: pad-map's Mapper builds the stick frame from [pad_axes],
[pad_head], [pad_body] and [pad_roller], so the pad over UDP honours the same
bindings as the Bluetooth one. The BODY_MAX_* and ROLLER_* constants and
DriveLimits are gone; the defaults reproduce them, now with the v8 drive
limits.

Config::reload is the one reader for both daemons: a bad live edit keeps the
mapping in use, the startup read falls back to the built-in one, and the
loaded values are logged as read_bindings did. --deadzone and --max-head are
optional overrides on both daemons. The IMU head is clamped per joint by
[pad_head].

robotd-params: one macro generates each mode's struct, defaults, partial
deserialiser and key list in place of four copies; the sign provenance the
mapping carried moves onto those defaults. PadRollerParams joins the other
limits in pad_axes.rs. Registry descriptions name the mode and the unit.
Two doc comments the PR displaced are back on their items.

Assisted-by: Claude:claude-opus-5-5
2026-10-12 15:20:46 +02:00
Pierre Rouanet e7b9233c6d Merge main into configurable-pad-axes
main moved the stick mapping out of padd into pad-map, shared with netpadd,
and set the v8 pad defaults. Conflicts resolved mechanically: padd/src/main.rs
is main's (the mapping is ported into pad-map in the next commit), and the
params, registry, editor and shipped toml keep both [netpad] and the new
controller sections.

Assisted-by: Claude:claude-opus-5-5
2026-10-12 15:20:13 +02:00
Pierre Rouanet ad7453d368 Merge main into udp-pad
padd's mapping lives in pad-map on this branch, so main's v8 pad defaults
(vx ±0.4, vyaw ±1.0, bumpers unbound) reach padd through robotd-params and
pad-map's tests now expect them. padd's moved tests are dropped from the
conflict; deploy/robotd.toml takes main's [pad_drive] and keeps [netpad].

Assisted-by: Claude:claude-opus-5-5
2026-10-12 14:52:42 +02:00