feat(social): USB camera hot-plug monitor (Issue #320) #328
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "sl-jetson/issue-320-camera-hotplug"
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
Closes #320
New ROS2 node
camera_hotplug_nodethat monitors/dev/video*for USB camera connect/disconnect events and publishes status to/saltybot/camera_status./dev/video*at 2 Hz (configurable viapoll_rate)std_msgs/String:"connected"— one or more devices present, stable"disconnected"— no devices found"restarting"— device set changed (hot-swap/reconnect); downstream capture pipelines should restartrestart_grace_s(5 s) of being lost →"restarting"held forrestart_hold_s(2 s), then resolves to"connected"or"disconnected"publish_alwaysparam to emit on every tick rather than only on change_scan_fnattribute — allows full offline unit testing without touching filesystemcompute_transition()function contains all state-machine logic for isolated testingTest plan
test_camera_hotplug.py)scan_video_devices: returns frozenset, handles nonexistent globcompute_transition— all DISCONNECTED/CONNECTED/RESTARTING transitions, grace window (inclusive), hold expiry, partial device loss, disconnect_time recording_scan_cb: connected/disconnected/restarting transitions,publish_always, logging_publish: all three statuses, message count🤖 Generated with Claude Code