Files
kyleandClaude Sonnet 5.5 ce7063f647 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
2026-10-05 01:56:16 -07:00

53 lines
2.0 KiB
YAML

# Parameters for the robot's nodes, keyed by node name. The MCP token and other secrets do not
# belong here: they stay in an env file readable only by the service user.
camera:
ros__parameters:
width: 1296 # the OV5647's full-field binned mode: whole field of view
height: 972
format: RGB888
FrameDurationLimits: [66666, 66666] # 15 fps: ~20% of a core, vs ~40% at 30; plenty for 4 Hz faces
jpeg_quality: 80
hermes_face:
ros__parameters:
rotation: 270 # mounted pose, microSD end up (the panel is portrait)
x_offset: 0
y_offset: 80 # the 240x240 glass sits 80 rows into the controller's RAM
fps: 30.0
phosphor: P7
style: phosphor
initial_state: sleeping # no agent connected until hermes_mcp's heartbeat says so
agent_timeout_s: 10.0
gaze_follow: true
audio_drive: true
hermes_face_detector:
ros__parameters:
rate_hz: 4.0
recognize: true # only recognises people enrolled with hermes_vision.people
publish_debug: false
hermes_audio_state:
ros__parameters:
rate_hz: 30.0
hermes_mcp:
ros__parameters:
bind: 10.55.0.2 # the USB link; the firewall accepts 8765 only from 10.55.0.1 on usb0
port: 8765
head: false # no servos fitted yet: turn_head and head_position stay unregistered
speakers: false # no speakers fitted yet: reported honestly in robot://status
connected_grace_s: 30.0 # an authenticated client heard within this long keeps the heartbeat going
look_timeout_s: 3.0
hermes_thermal:
ros__parameters:
# Sheds load before the Pi throttles (it starts at about 80 C). These "normal" rates MUST equal the
# ones above (camera 66666 us = 15 fps, face fps, detector rate_hz): a test checks it.
camera_fps: 15.0
face_fps: 30.0
detector_hz: 4.0
warm_c: 72.0
hot_c: 77.0
critical_c: 82.0