Architecture Overview
Stretch 4 robot platform — NUC to firmware communication stack. Click any block to expand details.
Architecture Risks & Critical Issues
1 CRITICAL3 HIGHI2C Bus Contention — Pimu
All four I2C devices share a single Wire library bus on SAMD21. The BNO085 interrupt handler performs blocking reads inside ISR context — adding more devices without refactoring will cause bus corruption or deadlocks.
Lead Integration (You)
System integration, EMC compliance, and cross-team coordination
Mechanical
Physical structure, cable routing, enclosures, and thermal management
Communication Architecture
Full data path: User scripts → ZMQ → Robot Server → USB CDC (2 Mbaud, COBS + CRC-16) → SAMD21 boards. Pimu generates sync pulses (GPIO) to coordinate all stepper motion.
| Parameter | Value |
|---|---|
| Baud rate | 2,000,000 (2 Mbaud) |
| Physical layer | USB CDC ACM (native USB on SAMD21) |
| Framing | COBS with 0x00 packet marker |
| Integrity | CRC-16 Modbus (2 bytes) |
| Max frame | 63 bytes (V1) / 64 bytes (V0) |
| Max RPC payload | 1024 bytes + 1 byte RPC ID |
| Frame timeout | 100 ms |
Hardware Block Diagram
Click any block to expand details. ISR timing, I2C devices, and control loop rates included.
Communication Protocols
| From | To | Interface | Protocol |
|---|---|---|---|
| nuc | server | In-process | Python |
| server | pimu | USB CDC | COBS-framed RPC |
| server | stepper | USB CDC | COBS-framed RPC |
| server | wacc | USB CDC | COBS-framed RPC |
| server | eoa | USB TTL | Feetech SM Protocol |
Transport Layer Detail
Hello Serial Transport: COBS (Consistent Overhead Byte Stuffing) framing over USB CDC serial. V1 protocol: push/pull model with single-frame fast path (PUSH_FRAME_FIRST_ONLY). Supports sync and async RPC via TransportPySerial or TransportCSerial (C extension, non-blocking).
Feetech SM Protocol: Half-duplex TTL serial bus. Uses SCS/STS packet protocol with GroupSyncRead and GroupSyncWrite for efficient multi-servo communication. Daisy-chain topology.