Autonomous Rover — Terrain Mode
Robot consistently favors the right side on loose surfaces.
Robotics / ESP32 / PID ControlThe question
Corridor performance is solved. Can the same controller hold a heading on a surface where the wheels slip independently?
Where it stands
Heading estimate is clean — the IMU does not care what the floor is made of. The veer is per-wheel slip, which the current controller has no way to observe because it has no wheel encoders. The right wheel loses traction first on loose gravel, and the PID corrects for a rotation that is real, just not commanded.
Gravel runs logged. Veer is 12–19 cm over 20 m, direction always right.
Confirmed heading estimate stays within ±2° on gravel — the estimate is not the fault.
Added a fixed slip offset to the left channel. Helps on gravel, hurts on tile.
Fit wheel encoders so slip becomes observable instead of guessed. A fixed offset cannot work across surfaces.