Odometry not working as intended

Hello,

Our team is having some problems with setting up odometry with internal encoders. When I call a “movedistance” function it just turns and doesn’t move at all. Here is our code for the chassiscontrollerbuilder:

  chassis = okapi::ChassisControllerBuilder()
.withMotors(leftMotors, rightMotors) // left motor is 1, 7, 9 (reversed), right motor is 11/18 (reversed) and 19
// .withGains(
//     {0.001, 0, 0.0001}, // Distance controller gains
//     {0.001, 0, 0.0001}, // Turn controller gains
//     {0.001, 0, 0.0001}  // Angle controller gains (helps drive straight)
// )
// green gearset, 4 inch wheel diameter, 15 inch wheel track
// .withDimensions(okapi::AbstractMotor::gearset::blue, {{3.25_in, 13.50_in}, okapi::imev5BlueTPR})
.withDimensions({okapi::AbstractMotor::gearset::blue, 6.0/10.0}, {{3.25_in, 13.50_in}, okapi::imev5BlueTPR})
.withOdometry() // use the same scales as the chassis (above)
.buildOdometry(); // build an odometry chassis

Then here is the testing auton we did for movement:

 void testing() {
 chassis->moveDistance({1_in});

}

Is there something I did wrong? Also, I’m sorry if I formatted this wrong or something, this is my first post.

change moving 1 inch to moving 1 feet, or increase kP

1 Like

I’m currently not with the robot, but we have tried that before. It just turns even more. Thanks for the quick reply.