FTC Moving 202008
From wikidb
Contents
Encoder Notes
Documentation and tutorials
- Lesson: Exercise: Using Encoders on PDX STEM
- [https://docs.revrobotics.com/docs/first-tech-challenge FIRST Tech Challenge - REV Documentation}
- Motor PIDF Tuning Guide
- Motor Encoder Guide
- Control Hub and Expansion Hub Firmware Update Guide
issues with pidf
Issue reported and solved
- [https://github.com/ftctechnh/ftc_app/issues/287 DC motor running too slow in RUN_USING_ENCODER run mode #287}
- Robot getting stuck with RUN_TO_POSITION
- DcMotor - Run to position not working
- Drive Straight
- Not going straight
- Straight line driving
- App Update 5.3-64b: PID vs PIDF
Firmware https://www.revrobotics.com/software/#exphubpreviousfirmware
api
PID
- isPIDMode
- https://stemrobotics.cs.pdx.edu/node/7268
- https://github.com/ftctechnh/ftc_app/wiki/Changing-PID-Coefficients Changing PID Coefficients]
- https://github.com/ftctechnh/ftc_app/wiki
pid api
PIDCoefficients DcMotorEx
Code snipets
DcMotorEx motorExLeft; motorExLeft = (DcMotorEx)hardwareMap.get(DcMotor.class, "left_drive”); PIDCoefficients pidOrig = motorExLeft.getPIDCoefficients(DcMotor.RunMode.RUN_USING_ENCODER); pidOrig. PIDCoefficients pidNew = new PIDCoefficients(NEW_P, NEW_I, NEW_D); motorExLeft.setPIDCoefficients(DcMotor.RunMode.RUN_USING_ENCODER, pidNew);
- getVelocity in ticks per second
- f is the tolerance