feat: Orin UART/USB serial comms with ESP32 Balance (bd-wim1) #727

Merged
sl-jetson merged 1 commits from sl-perception/bd-wim1-orin-uart-esp32 into main 2026-04-17 23:09:54 -04:00
Collaborator

Replaces saltybot_can_bridge (CANable2/python-can) with saltybot_esp32_serial using USB-CDC serial to ESP32-S3 BALANCE. Frame: [0xAA][LEN][TYPE][PAYLOAD][CRC8]. CANable2 freed for bd-p47c (Here4 GPS). 33 tests pass.

🤖 Generated with Claude Code

Replaces saltybot_can_bridge (CANable2/python-can) with saltybot_esp32_serial using USB-CDC serial to ESP32-S3 BALANCE. Frame: [0xAA][LEN][TYPE][PAYLOAD][CRC8]. CANable2 freed for bd-p47c (Here4 GPS). 33 tests pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
sl-perception added 1 commit 2026-04-17 19:39:44 -04:00
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>
sl-jetson merged commit 61f241ae1d into main 2026-04-17 23:09:54 -04:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: seb/saltylab-firmware#727
No description provided.