Shutdown must not stand the robot back up, and quack opens the beak - #170
Open
sankalpsthakur wants to merge 1 commit into
Open
Shutdown must not stand the robot back up, and quack opens the beak#170sankalpsthakur wants to merge 1 commit into
sankalpsthakur wants to merge 1 commit into
Conversation
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
apirrone
self-requested a review
August 29, 2026 08:17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #159 and #153.
Shutdown sit, then init (#159)
robot.shutdownsits, then the same tick used to stand the robot back up.The snapshot is taken at the top of the tick. Sit completion goes limp (
Bringup::Limp, torque off,enabledcleared) and callspoweroff(). The enable-driven bring-up still saw that tick's stalesnapshot.enabled == truewith a loaded controller, so it wrote torque on and ramped home — the thing that looks like "goes to init".request_relaxalready documents this class of bug. Shutdown missed the same-tick stale snapshot, androbot.initwas unguarded once the sequence had gone limp.This:
robot.initwhilepowered_offor a shutdown sit is in flightBringup::Limpon the no-sit power-off path too (the sit-complete path already did)The sit-with-policy path needs ONNX, so CI cannot run it. The sibling path is tested: no policy → immediate power-off (no sit), then
robot.initmust not re-enable torque.robotctl quackopens the beak (#153)The pad already opens the mouth via the analog triggers. CLI quack only sent
RobotSound(Chirp), and mouth writes were gated ondriving, so the visible half of "which duck is this" was missing — the same class of bug the theremin already had.A one-shot now holds the beak fully open for 450 ms (the wav is ~200 ms; the servo is slower). That hold is set even if
aplayfails, skipped on the blocking goodbye peck, and never taken while a ride/theremin/chorale owns the PCM.On a sitting-but-torqued robot (
enabled+Ready), the mouth is written without requiringdriving, same gate as the theremin.Clippy
Dropped a duplicate
#[cfg(test)]on the chorale test module soRUSTFLAGS="-D warnings" cargo clippy -p robotd --all-targetspasses.What this is not
Default
policy.gainstays 200, I/D pinned at 0 — that matches the RL prototype. This does not retune Dynamixel P-gain.Test plan
cargo test -p robotd(99 unit tests + 7 updater_gate; includesshutdown_then_init_must_not_stand_the_robot_back_up,a_one_shot_opens_the_beak,a_ride_does_not_open_the_beak_for_a_skipped_one_shot)RUSTFLAGS="-D warnings" cargo clippy -p robotd --all-targetsrobot shutdownsits and stays down (does not ramp home); laterrobot initdoes not stand it up until a new power-onrobotctl quackon a torqued robot opens the beak as well as calling