I am using the okapilib OdomChassisController for auton, however the PID is not accurate enough, especially on turns, which I believe is to do with false positives with settling. I tried to edit the settledUtil parameters, however the robot does not seem to respond to these changes at all. The following code uses ridiculous values and still has no effect on the PID controller! I am using driveToPoint.
#include "main.h"
#include "okapi/api.hpp"
using namespace okapi;
std::shared_ptr<OdomChassisController> chassis = ChassisControllerBuilder()
.withMotors({1, -2}, {-4, 3})
.withDimensions(AbstractMotor::gearset::green, {{3.25_in, 393_mm}, 540})
.withSensors
(
ADIEncoder{'A', 'B'},
ADIEncoder{'E', 'F', true},
ADIEncoder{'C', 'D', true}
)
.withClosedLoopControllerTimeUtil(10, 1, 5000_ms)
.withOdometry({{2.75_in, 212_mm, 120_mm, 2.75_in}, quadEncoderTPR})
.buildOdometry();