Skip to content

Latest commit

 

History

History
13 lines (11 loc) · 1.5 KB

KINEMATICS.md

File metadata and controls

13 lines (11 loc) · 1.5 KB

Kinematics

Kinematics is a way to convert a drivetrain agnostic velocity/rotation (ChassisSpeeds) to values meaningful for the actual drivetrain (WheelSpeeds). Similar to odometry, there are drivetrain specific classes for converting chassis speeds to wheel speeds. Here, we use Differential Drive Kinematics. Swerve Drive Kinematics and Mecanum Drive Kinematics are also available.

Summary of changes:

  1. ArcadeDrive.java
    1. Update command to use new arcadeDriveKinematics()
  2. Drivetrain.java
    1. Create a DifferentialDriveKinematics object that uses the robot's trackWidthMeters SysId constant
    2. Add a new private setDriveSpeed() helper function that accepts wheel speeds and implements combined feedforward and PID control.
    3. Implement a new arcadeDriveKinematics() that uses the new setDriveSpeed() helper function
    4. Implement a new setChassisSpeeds() function that converts from a universal ChassisSpeeds object to wheel speeds