feat(jetson): camera health watchdog — 6 streams, WARNING/ERROR, v4l2 reset (issue #198) #199
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "sl-perception/issue-198-camera-health"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
_camera_state.py— pure-PythonCameraStatedataclass (no ROS2 imports):on_frame(),age_s,fps(window_s),status(),should_reset()+ 30s reset cooldowncamera_health_node.py— subscribes 6 image topics (D435icolor/depth+ 4× IMX219 CSIfront/right/rear/left); 1 Hz watchdog tick; WARNING log at >2 s silence; ERROR log +v4l2-ctl --stream-off/--stream-onreset at >10 s (CSI only — D435i is USB); publishes/saltybot/camera_healthJSONsetup.py—camera_health_monitorconsole_scripts entry pointJSON output shape
Test plan
pytest test/test_camera_health.py) — no ROS2 neededros2 run saltybot_bringup camera_health_monitor— node startsros2 topic echo /saltybot/camera_health— JSON at 1 Hznullv4l2 device (no reset attempted)🤖 Generated with Claude Code
Adds camera_health_node.py + _camera_state.py to saltybot_bringup: • _camera_state.py — pure-Python CameraState dataclass (no ROS2): on_frame(), age_s, fps(window_s), status(), should_reset() + mark_reset() with 30s cooldown • camera_health_node.py — subscribes 6 image topics (D435i color/depth + 4× IMX219 CSI front/right/rear/left); 1 Hz tick: WARNING at >2s silence, ERROR at >10s + v4l2 stream-off/on reset for CSI cams; publishes /saltybot/camera_health JSON with per-camera status, age_s, fps, total_frames • test/test_camera_health.py — 15 unit tests (15/15 pass, no ROS2 needed) • setup.py — adds camera_health_monitor console_scripts entry point Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>