Skip to content

Shutdown must not stand the robot back up, and quack opens the beak - #170

Open
sankalpsthakur wants to merge 1 commit into
pollen-robotics:mainfrom
sankalpsthakur:cursor/shutdown-sit-no-init-2926
Open

sankalpsthakur wants to merge 1 commit into
pollen-robotics:mainfrom
sankalpsthakur:cursor/shutdown-sit-no-init-2926

Conversation

@sankalpsthakur

@sankalpsthakur sankalpsthakur commented Aug 28, 2026

Copy link
Copy Markdown

Fixes #159 and #153.

Prevent a completed shutdown from re-enabling torque through the same tick's stale enable snapshot. Ignore robot.init while shutdown is in progress or power is off, skip enable-driven bring-up during that sequence and set Bringup::Limp on the no-sit power-off path.

robotctl quack now holds the beak open for 450 ms, including when audio playback fails. It preserves the blocking goodbye behavior and avoids taking over while ride, theremin or chorale owns the PCM. The mouth can move while sitting but torqued.

Motor-gain tuning is unchanged: policy.gain remains 200 with I/D at zero.

Also remove a duplicate #[cfg(test)] attribute that failed strict Clippy.

Test plan

  • cargo test -p robotd: 99 unit tests and 7 updater_gate tests passed, including shutdown/init and one-shot beak regressions.
  • RUSTFLAGS="-D warnings" cargo clippy -p robotd --all-targets
  • On a real duck: shutdown sits and stays down; init cannot stand it up before a new power-on.
  • On a torqued robot: robotctl quack opens the beak and plays the call.

The tested shutdown path has no policy and powers off immediately. The sit-with-policy path requires ONNX and remains unvalidated.

Codex assisted with this description.

A sit-then-power-off went limp with this tick's snapshot still showing
enabled, so the enable-driven bring-up ramped home immediately (pollen-robotics#159).
Ignore robot.init for the rest of that sequence, and go Limp on the
no-sit path too.

robotctl quack was voice-only; the pad already opens the mouth via the
triggers. Hold the beak open for a one-shot so you can tell which duck
answered (pollen-robotics#153).

Drop a duplicate #[cfg(test)] in chorale so clippy -D warnings passes.

Assisted-by: Cursor Grok 4.6
@sankalpsthakur
sankalpsthakur force-pushed the cursor/shutdown-sit-no-init-2926 branch from 8be1006 to b0b2877 Compare September 3, 2026 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] when shutting down, it sits down (normal) but then goes to init (the bug)

1 participant