Skip to content

fix(body): "servos off" cuts the PWM signal — they really go limp - #79

Merged
rockywuest merged 2 commits into
mainfrom
fix/servos-really-off
Oct 26, 2026
Merged

rockywuest merged 2 commits into
mainfrom
fix/servos-really-off

Conversation

@rockywuest

Copy link
Copy Markdown
Owner

Field report: the servos hummed and pushed against Rocky's hand, even with nox-body, nox-bridge and nox-voice all stopped. The dog also got warm.

Cause: The robot HAT's MCU keeps sending the last PWM pulse after the SDK stops writing angles. The daemon's "deep sleep (servos off)" only set a flag, so every joint stayed under load.

Fix: New _release_servos(). It waits for queued frames (for example the lie) and then writes pulse_width(0) to every servo in legs, head and tail. It is called in four places:

  • deep sleep (idle watchdog)
  • sleep
  • emergency_stop
  • service shutdown

The dog always lies down first. The next angle the SDK writes re-engages the servos automatically.

Verified on the dog: started the daemon, sent sleep, got servos_released: 12. The servos went silent, the legs could be moved by hand, and no humming came back after 30 s.

3 source-level tests (the daemon needs the SDK); 720 tests pass.

🤖 Generated with Claude Code

rockywuest and others added 2 commits October 26, 2026 22:14
The robot HAT's MCU keeps sending the last pulse after the SDK stops writing
angles, so deep sleep was a flag only: a sleeping dog held every joint under
load, ran warm, and hummed against the hand holding it even with all Nox
services stopped. Deep sleep, the sleep command, the emergency stop and the
service shutdown now lie down and then write pulse width 0 on every servo;
the next angle engages them again. Verified on the dog: 12 released, servos
silent, legs move freely.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d servos sleep again

- An emergency stop sent by the behavior engine (internal) set the sleeping
  flag that only external activity clears; its head moves were refused.
  It stays "resting" now and the watchdog sleeps it.
- A move after release engages servos again: back to "resting", so the
  watchdog releases them once more.
- Settle 0.3 s after the queue drains before releasing.
- tests/conftest.py: quiet hours off in tests — engine tests failed at night.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rockywuest
rockywuest merged commit 3539213 into main Oct 26, 2026
4 checks passed
@rockywuest
rockywuest deleted the fix/servos-really-off branch October 26, 2026 21:19
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.

1 participant