feat: VESC CAN health monitor (Issue #651) #666
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "sl-jetson/issue-651-vesc-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
recovery_fsm.py— pure state machine (no ROS2/CAN deps; unit-tested in isolation)HEALTHY → DEGRADED(>500 ms)→ ESTOP(>2 s unresponsive) /BUS_OFFSEND_ALIVE(GET_VALUES) frames at 200 ms intervals in DEGRADED; escalates toTRIGGER_ESTOPat 2 son_frame()resets any fault state back to HEALTHY;on_bus_off/okhandles CAN bus-offHealthFsmwrapper manages both VESCs togetherhealth_monitor_node.py— ROS2 node/vesc/left/state+/vesc/right/state(JSON fromvesc_telemetry)/vesc/health(JSON, 10 Hz): state, elapsed_s, bus_off, estop_active, recent faults/diagnostics(DiagnosticArray OK/WARN/ERROR per VESC)/estop(JSON event) + zero/cmd_velon e-stop trigger and clearip linkfor bus-off (1 Hz)test/test_vesc_health.py— 39 unit tests, all passing, no hardware neededTest plan
python3 -m pytest jetson/ros2_ws/src/saltybot_vesc_health/test/— 39 passedros2 topic echo /vesc/health— state=healthy/cmd_velhealthy,/estopeventestop_clearedros2 topic echo /diagnostics— OK/WARN/ERROR levels match VESC statesjournalctl -f— fault events logged correctlyCloses #651
🤖 Generated with Claude Code
eab26c35c5tod57c0bd51d