My students are working on implementing Trapezoid Profiles for a smoother acceleration in their drive-distance auto commands, but we’re seeing some really random results. We ran the FRC-Characterization toolsuite for the drivetrain (with all units consistent and set to inches), getting values of kS = 0.333, kV = 6.18, and kA = 0.885. Our drivetrain is tank-drive, with two NEO motors per side.
We’re using the TrapezoidProfileCommand, following the example given in https://github.com/wpilibsuite/allwpilib/tree/master/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/drivedistanceoffboard, but the distances traveled make no sense. We’re pulling them from Shuffleboard, and I can confirm that we’re definitely passing in the correct values. When we enter a setpoint of 1 (of what I assumed were inches), the bot actually travels about 14-16 inches, and when we enter a setpoint of 2, it’s closer to 30 inches. At 3, the distance is about 50-ish. So points for consistency?
A question: I see a lot of the motion profiling examples based on meters. Is that a hard requirement here? I don’t see any indication in the libraries that units matter, as long as they’re consistent. Are we missing something?