Two questions about characterization tool. We have run out of ideas to fix it

I have two questions regarding the Characterization tool.

First, when using the characterization tool to analyze data, I am unsure whether to use the Talon Pre-2020 Gain Settings or the WPILib 2020- Gain Settings. Our drivetrain consists of 4 Talon FX’s, but in the Ramsete Controller (where the kP value is used), we use PID Controllers which, if I understand correctly, has a max value of 12, leading me to believe we should be using the WPILib setting.

Second, for the post-encoder gearing and encoder EPR. It is my understanding that the edges per revolution on the TalonFX’s is the same as the counts per revolution, 2048, however I am unsure I am interpreting that correctly. For the gearing, I assume it is revolutions of the encoder per revolution of the wheels, which is 12.92 in our case, but I am not sure if that is backwards or not.

Finally, both of these issues only affect the kP value (at least for our setup). I have calculated and tried as many possible values as I could, with regard to the settings above, but when running a simple zigzag trajectory, our robot seemed to spin and drive randomly. I am still unsure if this is because of bad initial values, or if the code is flawed somewhere.

Here is a the current code on the robot: https://github.com/RedshiftRobotics3676/2020-FRC-Main

Thank you in advance for any help.

Use the pre-2020 gain settings. The 2020- setting is invalid. The Talon PID values are 0-1023 (see here for reference).

That’s correct, 2048 EPR.

I suggest you take a look at this thread and go through the troubleshooting steps. Make sure your odometry is working first. For example, I think you need to negate your encoder heading.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.