Path Planning Feedforward and Completion Issues

Hi! I’m the software co-lead of my FRC team, and we’re currently optimizing our autonomous functionality to enable our differential drive robot to follow paths consistently and accurately. We’ve gotten down the basics, but we are having two major issues:

First, we’re using a RamseteCommand to follow a path generated via PathPlanner, and our robot attempts to follow it and does so accurately enough. However, the robot never reaches the path’s endpoint as it consistently stops moving a few feet before the trajectory’s desired endpoint. We think this is due to the RamseteCommand’s time-based nature, in which it controls robot velocity based on the SIMULATED time taken to complete the trajectory. We believe that the robot is moving slower than the RamseteCommand expects and the RamseteCommand is not accounting for that. Is there a way we can prevent this from happening and ensure that our robot reaches the desired end position?

Additionally, our robot only follows the path with any degree of accuracy after we remove feedforward calculations. We use feedforward gains generated by SysId, and applying them to motor output in the RamseteCommand causes the robot to miscalculate and jerk around wildly while traversing the trajectory. I believe that it is unlikely due to a problem with software or hardware as our code has worked in the past on different robots. May it be due to a SysId misconfiguration (kS, kV, and kA are 0.10013, 2.5964, and 0.28575 respectively)?

Check your units of measure scrupulously.

We’re using meters everywhere in SysId and our code. We have the “units per rotation” setting set to 0.1524pi (6 inch diameter wheels), we have the encoder CPR set to 2048 (Talon FXs), and we have the SimpleMotorFeedforward<units::meters> class. In addition, the kP value provided to us by SysId worked quite well without feedforward.

Do the kS, kV and kA values I mentioned earlier look about right for a 6-wheel, four Falcon 500 drivetrain with an 11.25 gear ratio (the drivetrain is pretty bare, it’s just electronics mounted on it so not very heavy)? I’m not very familiar with the factors that affect the feedforward gains, sorry.