|
|
9b460e34db
|
feat: Orin UART/USB serial interface for ESP32 Balance (bd-wim1)
New package saltybot_esp32_serial replaces saltybot_can_bridge
(CANable2/python-can) with direct USB-CDC serial to ESP32-S3 BALANCE
(CH343 chip, 1a86:55d3, /dev/esp32-balance @ 460800 baud).
Framing: [0xAA][LEN][TYPE][PAYLOAD][CRC8-SMBUS] matching bd-66hx spec.
esp32_balance_protocol.py — codec + streaming FrameParser (state-machine)
- Commands: HEARTBEAT(0x01), DRIVE(0x02), ESTOP(0x03), ARM(0x04), PID(0x05)
- Telemetry: STATUS(0x80), VESC_LEFT(0x81), VESC_RIGHT(0x82), ACK/NACK
esp32_balance_node.py — ROS2 node
- Subs: /cmd_vel, /estop, /saltybot/arm, /saltybot/pid_update
- Pubs: /saltybot/attitude, /saltybot/balance_state, /can/battery,
/can/vesc/{left,right}/state, /can/connection_status
- 500ms /cmd_vel watchdog → CMD_DRIVE(0,0)
- 200ms CMD_HEARTBEAT keepalive timer
- Auto-reconnect on serial disconnect
Proxied VESC telemetry: erpm, voltage, current, temp for IDs 56(L)/68(R).
Frees CANable2 for bd-p47c (Here4 GPS).
33 unit tests — all pass.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-04-17 19:38:38 -04:00 |
|