feat(bridge): binary STM32 command protocol (Issue #119) #128
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "sl-jetson/issue-119-cmd-protocol"
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
stm32_protocol.py— pure-Python binary frame codec (no ROS2 deps, fully unit-testable)STX(0x02) + TYPE + LEN + PAYLOAD + CRC16-CCITT(BE) + ETX(0x03)ImuFrame,BatteryFrame,MotorRpmFrame,ArmStateFrame,ErrorFrameFrameParser: streaming byte-by-byte state machine, resync after corrupt datastm32_cmd_node.py— full-featured ROS2 bridge node/cmd_vel→ SPEED_STEER at up to 50 Hz with Twist scaling/cmd_velfor 500ms → send SPEED_STEER(0,0)/saltybot/armservice (SetBool) +/saltybot/pid_updatetopic/saltybot/imu,/saltybot/telemetry/battery,/saltybot/telemetry/motor_rpm,/saltybot/arm_state,/saltybot/error/diagnosticswith serial health, frame/error countstest_stm32_protocol.pyandtest_stm32_cmd_node.pyMockSerialfor byte-level TX/RX without hardwareTest plan
pytest test/test_stm32_protocol.py -v— all 60+ tests passpytest test/test_stm32_cmd_node.py -v— all 30+ tests passstm32_cmd_nodelaunches and opens/dev/ttyACM0on hardware/cmd_velis published/cmd_velCloses #119