I’m dealing with a problem with my robot where it does a wheelie when stopping with chassis controller factory. When it’s in the air it turns a bit. Is there any way to slow/change the way it stops. Could a gyro be a solution?
Here is my code to create the factory:
const auto WHEEL_DIAMETER = 4_in;
const auto CHASSIS_WIDTH = 12.05_in;
You have a few options. You could either try to change the center of mass on your robot so it isn’t so far forward. You also could try to do motion profiling, use this tutorial. Or you could use your own PID, assuming you are currently using the integrated motor PID. I wouldn’t try and use a gyro to correct for something that shouldn’t happen to begin with because it can just introduce more place for error.
You should look into using the okapi ChassisControllerPID instead of what you are using, which is ChassisControllerIntegrated. It acts the exact same way except you can tune it. To switch, look at the docs, you just need to edit your factory a bit.