Add a thermal guard that slows the robot before the Pi throttles
hermes_thermal reads the CPU temperature and throttle flags, publishes /health/*, and at 72 / 77 / 82 C scales the camera, face and detector rates down through their live parameters, restoring them as it cools one level at a time with a margin and a dwell so it does not flap. The face and detector gained live parameter callbacks for this, the bridge's robot://status carries a health block (temperature, level, throttle flags now and since boot), and a bringup test asserts the guard's normal rates equal the real ones. Live testing on the robot (forcing 73 / 78 / 85 C and back) caught a bug the unit tests missed: one logging line whose severity changed between warn and info raised in rclpy and killed the guard on its first cooling step, and the respawn hid it. Fixed with separate call sites; the tick now survives any error; a full heat-then-cool test drives the real node, and a mutation check confirmed it fails on the original bug. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AFN8nRRCiDiMN7ChBpHJhs
This commit is contained in:
@@ -23,7 +23,8 @@ only speaks MCP.
|
||||
| Face on the display, always on at power-up, with a sleeping pose | Servos: `turn_head`, `head_position`, the pan/tilt URDF |
|
||||
| Camera, face detection, opt-in recognition of people you enrol | Speakers: playback, echo cancel, Hermes talking out loud |
|
||||
| Eyes follow faces; mouth draws your live voice | Fan (the Pi runs at about 62 °C open-air without one) |
|
||||
| MCP bridge: `hermes mcp test robot` passes, a real Hermes turn calls `look()` | USB-C splitter (the Pi is powered from your computer's port for now) |
|
||||
| MCP bridge: `hermes mcp test robot` passes, real Hermes turns call `look()` and `faces()` | USB-C splitter (the Pi is powered from your computer's port for now) |
|
||||
| Thermal guard: slows the camera, face and detector before the Pi throttles | |
|
||||
| USB network link, firewall, boots and works with Wi-Fi off | Printed enclosure (`enclosure/`) |
|
||||
|
||||
## How it fits together
|
||||
@@ -127,6 +128,11 @@ give MCP images to the main model: it saves the photo to its image cache and the
|
||||
| looking | squint, then a flash | `look()` |
|
||||
| speaking | mouth draws the outgoing audio | the speaker |
|
||||
|
||||
- **Heat:** `hermes_thermal` watches the CPU temperature and, at 72, 77 and 82 °C (the Pi starts
|
||||
throttling at about 80), scales the camera, face and detector rates down, then restores them as it cools
|
||||
(one step at a time, so it does not flap). The temperature and the Pi's throttle and under-voltage
|
||||
flags are in `robot://status` and on `/health/*`. To test it without heating the Pi, on the Pi:
|
||||
`ros2 param set /hermes_thermal fake_temp_c 85.0` (and `-1` to stop).
|
||||
- **Logs and control:** `journalctl -u robot -f` (the face logs every state change), `sudo systemctl
|
||||
restart robot`.
|
||||
- **Enrol yourself** so the eyes prefer you (numbers only are stored, never photos, in
|
||||
@@ -195,7 +201,7 @@ about 0.5 px is good. `sudo systemctl restart robot` to load it.
|
||||
|
||||
| Path | What |
|
||||
|---|---|
|
||||
| `ros/` | The ROS 2 workspace: `hermes_face`, `hermes_vision`, `hermes_audio`, `hermes_mcp`, `hermes_bringup`. |
|
||||
| `ros/` | The ROS 2 workspace: `hermes_face`, `hermes_vision`, `hermes_audio`, `hermes_mcp`, `hermes_thermal`, `hermes_bringup`. |
|
||||
| `pi/` | Everything installed on the Pi: `install.sh` and its parts, services, firewall, overlays. |
|
||||
| `host/` | Your computer's side: the USB link script, Hermes and PipeWire config, a platform check. |
|
||||
| `enclosure/` | OpenSCAD model, STLs and the print guide. Built from estimates: measure before printing. |
|
||||
|
||||
Reference in New Issue
Block a user