9a97cf9022
IMU integration (WitMotion HWT905-RS232, doc/06-imu-integration-plan.md): - Phase 1: raw accel/gyro/angle observation, power-on-relative yaw offset - Phase 2: x,y odometry + wheel-vs-IMU omega residual, using a self-fused heading (wheel encoder omega + raw gyro_z average) instead of the IMU's own onboard fused yaw, which field logs showed disagreeing with its own raw gyro sign ~30% of the time during turns - Phase 3: straight-line heading-hold PI trim, active only when steering is centered and no lidar dodge is in progress, capped and field-tuned - Phase 4: whole-body slip detection (commanded vs IMU-measured omega ratio) that temporarily scales down v_x/omega, independent of the per-wheel current-based diagnostics - Phase 5a: k_skid/effective_w replaced with values fitted from real wheel-vs-IMU logs (0.406->0.51, 0.684->0.87) instead of the geometric formula, which field data showed under-driving every turn RC receiver: switched from ttyUSB* guessing to udev-stable device names (ttyMOTOR/ttyRC/ttyIMU), wired through run_4wd.sh and set_low_latency.sh. Motor driver: read motor/driver temperature registers (0x20A4/0x20B0) for proactive overheat visibility in the HUD/CSV. Control fixes: - Airborne-wheel zeroing no longer applies during spin turns, where reaction-torque-driven diagonal load transfer was misclassified as wheels leaving the ground and cutting spin torque in half - jerkLimitedStep's instant-acceleration path now only fires for same-direction speed increases; sign reversals (RC noise/deadzone jitter near a stop, or a genuine direction change) go through the jerk-limited path instead of snapping across zero Auto CSV logging (logs/, gitignored) extended with encoder ticks, IMU, odometry, heading-hold, slip, and temperature columns for field analysis. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>