Okapi Chassis Controller PID

If I wanted to include the PID gains in my chassis controller builder, do I just add .withGains along with the PID gains in the builder to access the PID functionality?

std::shared_ptr<ChassisController> drive =
ChassisControllerBuilder()
    .withMotors({1, 2,}, {3, 4})
    .withDimensions(AbstractMotor::gearset::green, {{4_in, 11.5_in}, imev5GreenTPR})
    .withGains(
      {0.001, 0, 0.0001}, 
      {0.001, 0, 0.0001},  
      {0.001, 0, 0.0001})  

    .build();

Yes (20 characters…)

1 Like