Can't get Ramsete command to work except with only feed-forward

I’ve been trying to tune our auto paths, and have used SysID to get the feed-forward and track width numbers for our robot. The robot drives relatively well using feed-forward alone, but of course, its a bit off. I have the ramsete controller disabled using the ‘setEnabled(false)’ method.
Using a ramsete controller with the default values (2.0, 0.7) just makes the robot go haywire, and just randomly spin, drive really quickly, etc. So does using the kP and kD values produced by SysID.

Here’s my auto trajectory and drive subsystem code: Ramsete Command trouble · GitHub

I suspect that this might have something to do with RamseteCommand inverting the right side on its own, and that conflicting with our motor inversion, and random other inversions, but I’ve tried like a million permutations, and I can’t get it to work.

The docs of RamseteController don’t seem to indicate it would invert any side on its own. You are passing the kP to the pid controller for both sides of the drivetrain, and presumably you’ve implemented the autoTankDriveVolts method proper for your chassis. As long as you are accounting for whether or not your gyro is CCW positive, I don’t see where else the inversion would happen.

I’m far from an expert on this trajectory stuff though.

1 Like

My info regarding the inversion came from this post here: Problems with WPI robot characterization - #12 by Oblarg

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