Team2337 / 2022-Presented-By-Noahs-Arcade

Other
1 stars 0 forks source link

Add chassis speeds API for reqeusting speed of drivetrain #111

Closed ZachOrr closed 2 years ago

ZachOrr commented 2 years ago

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.