# Next Session: Finish Battery Calibration (3 remaining steps)

## Context
Session 100 completed battery recalibration (12→4 cells). 10 commits, 46 tests green, deployed. 5/8 calibration steps pass. 3 remain — all need charged batteries.

## What's Done
- **Speed baseline**: DEFAULT_TURN_SPEED=35, PI_DRIVE_SPEED=35, auto-bump to 40 for >90° turns
- **Pre-brake 0.95**: reduces coast overshoot from +12° to +2-4°
- **Heading-settle 0.5s**: eliminates momentum compounding between turns
- **Open-loop DPS=70**: 86.8° on 90° target (3.6% under, acceptable)
- **Motor trim 1.00**: correct for 4 batteries (1.20 locks 3/4 motors)
- **Lateral speed=20 trap fixed**: was causing homing stall at 0.85m
- **_align_180 wired**: ARRIVED→ALIGNING→IDLE, verified 177.6° on 180° target
- **Homing E2E**: 3 runs — 2 PASS (177.6° align, 1.37→0.52m approach), 1 FAIL (fixed)

## Remaining Steps

### Step 3.5 — Odometry Calibration
```bash
ssh pi
python3 ~/workplace/her/her-os/scripts/calibrate_odometry.py --host 192.168.68.61
```
Apply output `DUTY_TO_MPS` and `DUTY_TO_RPS` to turbopi-server.service. Then `sudo systemctl daemon-reload && sudo systemctl restart turbopi-server`.

### Step 3.7 — Escape Sequence
Place obstacle close to front (~15cm). Trigger via panda-nav or direct:
```bash
PI_TOKEN="8cX80yIBws1PfBjFuvPz0k9egPSZD0LvS02oUD6ijfg"
# The escape triggers automatically when panda-nav detects stuck/obstacle
# Or test forward into obstacle and watch sonar safety + escape behavior
curl -s -X POST http://192.168.68.61:8080/drive \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $PI_TOKEN" \
  -d '{"action":"forward","duration":5.0,"speed":35}'
```
Verify: robot should stop on sonar, then backup 2s + right turn 90° (all at speed 35 now, not stalling).

### Step 3.8 — Nav E2E
Ask Annie to navigate to a target (via Telegram or direct API). Verify:
- Turns are precise (±5° for ≤90°, ±12° for >90°)
- Forward motion covers reasonable distance
- Stuck/escape detection works
- VLM decisions are sensible

## Before Starting
1. **Charge batteries** — 4x 18650 on SupTronics X-UPS1
2. **Reboot Pico** if IMU unhealthy:
   ```bash
   ssh pi "sudo systemctl stop turbopi-server && stty -F /dev/ttyACM0 115200 raw -echo && printf '\x04' > /dev/ttyACM0 && sleep 2 && sudo systemctl start turbopi-server"
   ```
3. Verify health: `curl http://192.168.68.61:8080/health` — imu=True, sonar=True

## After Calibration Complete
1. Update 9-cell VLM→command grid with final tuned values
2. Add duty clamping to `_drive_sync` (trim≥1.20 locks 3/4 motors, no clamping exists today)
3. Consider battery voltage sensing hardware (INA219 on battery rail) for voltage-aware speed selection
