Pulling this out of the Heading tuning code - this PR introduces an API on the drivetrain to figure out if the drivetrain is moving. There are several levers to use here from least sophisticated to most - isMoving for a boolean if the chassis is moving or not, velocity for getting the combined velocity vector of vx + vy, and getChassisSpeeds to get the vx, vy, and rotation of the chassis.
These levers should allow us to more easily write PID code around if the drivetrain is moving vs if the drivetrain is stationary.
Pulling this out of the Heading tuning code - this PR introduces an API on the drivetrain to figure out if the drivetrain is moving. There are several levers to use here from least sophisticated to most -
isMoving
for a boolean if the chassis is moving or not,velocity
for getting the combined velocity vector of vx + vy, andgetChassisSpeeds
to get the vx, vy, and rotation of the chassis.These levers should allow us to more easily write PID code around if the drivetrain is moving vs if the drivetrain is stationary.