BotsBurgh / BOTSBURGH-FTC-2024-25

Code for our FTC 2024-25 season robot
https://botsburgh.github.io/BOTSBURGH-FTC-2024-25/
GNU General Public License v2.0
3 stars 0 forks source link

Tune feedforward coefficients of static, velocity, and acceleration #73

Open BD103 opened 6 hours ago

BD103 commented 6 hours ago

https://github.com/BotsBurgh/BOTSBURGH-FTC-2024-25/blob/3c25d0431afbbda730f909c94777b5301569c5f6/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/RobotConfig.kt#L68-L75

These coefficients are used to tune the MotorFeedforward class, which controls the power given to a motor for a specified velocity and acceleration. As compared to feedback, which reacts to change, motor feedforward is a physics equation that represents a motor's theoretical behavior.

These coefficients need to be tuned to the wheels and surface for the robot. Please see Feedforward Tuning for more information, and specifically check out the Feedforward Tuning Simulator. (That information is for pre-1.0 Road Runner, so it may be outdated.)

To tune these values, look at ManualFeedforwardTuner in the official documentation. You will have to port the opmode source to work with the Kiwi drive, though.

BD103 commented 6 hours ago

See #72 for prior art.