# SaltyLab — Ideal Team

## Project
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:** 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

---

## Roles Needed

### 1. Embedded Firmware Engineer (Lead)
**Must-have:**
- Deep STM32 HAL experience (F7 series specifically)
- USB OTG FS / CDC ACM debugging (TxState, endpoint management, DMA conflicts)
- SPI + UART + USB coexistence on STM32
- PlatformIO or bare-metal STM32 toolchain
- DFU bootloader implementation

**Nice-to-have:**
- Betaflight/iNav/ArduPilot codebase familiarity
- PID control loop tuning for balance robots
- FOC motor control (hoverboard ESC protocol)

**Why:** The immediate blocker is a USB peripheral conflict. Need someone who's debugged STM32 USB issues before — this is not a software logic bug, it's a hardware peripheral interaction issue.

### 2. Control Systems / Robotics Engineer
**Must-have:**
- PID tuning for inverted pendulum / self-balancing systems
- Complementary filter / Kalman filter for IMU sensor fusion
- Real-time control loop design (1kHz+)
- Safety system design (tilt cutoff, watchdog, arming sequences)

**Nice-to-have:**
- Hoverboard hub motor experience
- ELRS/CRSF RC protocol
- ROS2 integration

**Why:** Once USB is fixed, the balance loop needs real-world tuning. PID gains, filter coefficients, motor response curves, safety margins — all need someone with hands-on balance bot experience.

### 3. Perception / SLAM Engineer (Phase 2)
**Must-have:**
- Jetson Nano / NVIDIA Jetson platform
- Intel RealSense D435i depth camera
- RPLIDAR integration
- SLAM (ORB-SLAM3, RTAB-Map, or similar)
- ROS2

**Nice-to-have:**
- Person tracking / following
- Obstacle avoidance
- Nav2 stack

**Why:** Phase 2 goal is autonomous navigation. Jetson Nano with RealSense + RPLIDAR for indoor mapping and person following.

---

## Hardware Reference
| Component | Details |
|-----------|---------|
| FC | MAMBA F722S (STM32F722RET6, MPU6000) |
| Motors | 2x 8" pneumatic hoverboard hub motors |
| ESC | Hoverboard ESC (EFeru FOC firmware) |
| Battery | 36V pack |
| RC | BetaFPV ELRS 2.4GHz TX + RX |
| AI Brain | Jetson Nano + Noctua fan |
| Depth | Intel RealSense D435i |
| LIDAR | RPLIDAR A1M8 |
| Spare IMUs | BNO055, MPU6050 |

## Repo
- Gitea: https://gitea.vayrette.com/seb/saltylab-firmware
- Design doc: `projects/saltybot/SALTYLAB.md`
- Bug doc: `USB_CDC_BUG.md`
