Team841 / FRC23

FRC 2023 Robot: Bia
https://www.team841.org/
Other
1 stars 0 forks source link

Drivetrain trapezoidal profile #11

Open samneff72 opened 1 year ago

samneff72 commented 1 year ago

Due to Sparkmax/NEO on drive, we need to implement this via WPI classes or SparkMax classes instead of leveraging what we're learning on the Falcon embedded controls in the superstructure.

From a first pass, Sam recommends we use Rev SmartMotion here, I think we'll get much better results running SmartMotion at 1khz than a WPI 20ms loop (aka 50hz, almost two orders of magnitude slower)

samneff72 commented 1 year ago

Root closed loop control diagram https://docs.revrobotics.com/sparkmax/operating-modes/closed-loop-control

Here's the Rev smart motion example https://github.com/REVrobotics/SPARK-MAX-Examples/blob/master/Java/Smart%20Motion%20Example/src/main/java/frc/robot/Robot.java