|
Re: Drivetrain PID tuning
Quote:
Originally Posted by Jared Russell
Do you mean angular displacement? (Gyros measure angular rate, which then must be integrated to obtain angular displacement). With commonly available FRC gyros based on an Invensense MPU-9250 (NavX, CTRE Pigeon) or Analog Devices ADXRS-450/451 (FIRST Choice gyro, WCP Spartan board) you can measure angular displacement *very* accurately...you will only drift a handful of degrees over an entire match under most conditions (e.g. level field). You can generate a turn-in-place motion profile just as you would using encoders.
A gyro can't help you measure translational motion, of course. If you use a multi-DOF IMU with gyros AND accelerometers, you can measure linear acceleration...but trying to obtain precise translational displacement from these is not going to work well (maybe this is what you were referring to). But you can combine a gyro with encoders to give you the "best of both worlds" and follow a profiled path while correcting for yaw errors. As long as the profile contains yaw information, you can use a PID controller (often a P controller is enough) to add a bit of velocity to one side and subtract it from the other to keep you on track.
For more details, see: https://github.com/Team254/FRC-2016-...rive.java#L385 (our "drive straight" mode engaged by the driver by holding down a button)
and:
https://github.com/Team254/FRC-2016-...rive.java#L396 (our path following mode used for autonomous mode)
|
No, I mean linear displacement, which you would need for motion profiling with a gyro, no?
|