diff --git a/CLAUDE.md b/CLAUDE.md index e390876..145ffaa 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,14 +1,19 @@ # SaltyLab Firmware — Agent Playbook ## Project -Self-balancing two-wheeled robot: STM32F722 flight controller, hoverboard hub motors, Jetson Nano for AI/SLAM. +Self-balancing two-wheeled robot: **two ESP32 boards** (BALANCE + IO), hoverboard hub motors, Jetson Orin for AI/SLAM. + +> ⚠️ **ARCHITECTURE CHANGE (2026-04-03):** Mamba F722S (STM32F722) and BlackPill are NO LONGER USED. +> Replaced by: **ESP32 BALANCE** (PID loop) + **ESP32 IO** (motors/sensors/comms). +> The `src/` and `include/` STM32 firmware is legacy/archived — do not extend it. +> New firmware goes in `esp32/` — pin assignments and framework details TBD pending max. ## Team | Agent | Role | Focus | |-------|------|-------| -| **sl-firmware** | Embedded Firmware Lead | STM32 HAL, USB CDC debugging, SPI/UART, PlatformIO, DFU bootloader | +| **sl-firmware** | Embedded Firmware Lead | ESP32 firmware, balance loop, I/O drivers, PlatformIO | | **sl-controls** | Control Systems Engineer | PID tuning, IMU sensor fusion, real-time control loops, safety systems | -| **sl-perception** | Perception / SLAM Engineer | Jetson Nano, RealSense D435i, RPLIDAR, ROS2, Nav2 | +| **sl-perception** | Perception / SLAM Engineer | Jetson Orin, RealSense D435i, RPLIDAR, ROS2, Nav2 | ## Status USB CDC TX bug resolved (PR #10 — DCache MPU non-cacheable region + IWDG ordering fix). diff --git a/TEAM.md b/TEAM.md index daafce0..2f59fcf 100644 --- a/TEAM.md +++ b/TEAM.md @@ -1,12 +1,15 @@ # SaltyLab — Ideal Team ## Project -Self-balancing two-wheeled robot using a drone flight controller (STM32F722), hoverboard hub motors, and eventually a Jetson Nano for AI/SLAM. +Self-balancing two-wheeled robot using **two ESP32 boards** (BALANCE + IO), hoverboard hub motors, Jetson Orin for AI/SLAM. + +> ⚠️ **ARCHITECTURE CHANGE (2026-04-03):** Mamba F722S (STM32F722) and BlackPill retired. +> Replaced by ESP32 BALANCE (PID loop) + ESP32 IO (motors/sensors/comms). ## Current Status -- **Hardware:** Assembled — FC, motors, ESC, IMU, battery, RC all on hand -- **Firmware:** Balance PID + hoverboard ESC protocol written, but blocked by USB CDC bug -- **Blocker:** USB CDC TX stops working when peripheral inits (SPI/UART/GPIO) are added alongside USB OTG FS — see `USB_CDC_BUG.md` +- **Hardware:** ESP32 BALANCE + ESP32 IO replacing STM32 FC — details from max incoming +- **Firmware:** ESP32 firmware TBD; legacy STM32 code in `src/` is archived +- **STM32 blocker (resolved/irrelevant):** USB CDC bug was STM32-specific — no longer applies --- diff --git a/docs/AGENTS.md b/docs/AGENTS.md index f3ac992..55b6fa0 100644 --- a/docs/AGENTS.md +++ b/docs/AGENTS.md @@ -2,19 +2,34 @@ You're working on **SaltyLab**, a self-balancing two-wheeled indoor robot. Read this entire file before touching anything. +## ⚠️ ARCHITECTURE CHANGE — 2026-04-03 + +**Mamba F722S (STM32F722) and BlackPill are NO LONGER USED.** + +New hardware: +- **ESP32 BALANCE** — PID balance loop (replaces FC) +- **ESP32 IO** — motors, sensors, comms + +The `src/` and `include/` STM32 HAL firmware is **legacy/archived**. Do not extend it. +All new firmware targets the ESP32 boards in `esp32/`. Pin assignments and framework TBD — await details from max. + ## Project Overview A hoverboard-based balancing robot with two compute layers: -1. **FC (Flight Controller)** — MAMBA F722S (STM32F722RET6 + MPU6000 IMU). Runs a lean C balance loop at up to 8kHz. Talks UART to the hoverboard ESC. This is the safety-critical layer. -2. **Jetson Nano** — AI brain. ROS2, SLAM, person tracking. Sends velocity commands to FC via UART. Not safety-critical — FC operates independently. +1. **ESP32 BALANCE** — PID balance loop. IMU + balance PID, safety-critical layer. +2. **ESP32 IO** — motors, sensors, comms layer. +3. **Jetson Orin** — AI brain. ROS2, SLAM, person tracking. Not safety-critical. ``` -Jetson (speed+steer via UART1) ←→ ELRS RC (UART3, kill switch) +Jetson (speed+steer) ←→ ELRS RC (kill switch) │ ▼ - MAMBA F722S (MPU6000 IMU, PID balance) + ESP32 BALANCE (IMU, PID balance loop) │ - ▼ UART2 + ▼ + ESP32 IO (motor drivers, sensors, comms) + │ + ▼ Hoverboard ESC (FOC) → 2× 8" hub motors ``` diff --git a/docs/SALTYLAB.md b/docs/SALTYLAB.md index 49bc664..d230870 100644 --- a/docs/SALTYLAB.md +++ b/docs/SALTYLAB.md @@ -2,6 +2,11 @@ Two-wheeled, self-balancing robot for indoor AI/SLAM experiments. +> ⚠️ **ARCHITECTURE CHANGE (2026-04-03):** Mamba F722S (STM32F722) and BlackPill are retired. +> New compute stack: **ESP32 BALANCE** (PID loop) + **ESP32 IO** (motors/sensors/comms). +> Sections below referencing the Drone FC / STM32F722 / GEPRC GEP-F7 are historical. +> Await updated spec from max before writing new firmware. + ## ⚠️ SAFETY — TOP PRIORITY **This robot can cause serious injury.** 8" hub motors with 36V power can crush toes, break fingers, and launch the frame if control is lost. Every design decision must prioritize safety. @@ -32,8 +37,10 @@ Two-wheeled, self-balancing robot for indoor AI/SLAM experiments. |------|--------| | 2x 8" pneumatic hub motors (36 PSI) | ✅ Have | | 1x hoverboard ESC (FOC firmware) | ✅ Have | -| 1x Drone FC (STM32F745 + MPU-6000) | ✅ Have — balance brain | -| 1x Jetson Nano + Noctua fan | ✅ Have | +| ~~1x Drone FC (STM32F745 + MPU-6000)~~ | ❌ RETIRED — replaced by ESP32 BALANCE | +| 1x ESP32 BALANCE (PID loop) | ⬜ TBD — spec from max | +| 1x ESP32 IO (motors/sensors/comms) | ⬜ TBD — spec from max | +| 1x Jetson Orin + Noctua fan | ✅ Have | | 1x RealSense D435i | ✅ Have | | 1x RPLIDAR A1M8 | ✅ Have | | 1x battery pack (36V) | ✅ Have |