Class RotationalKinematics

java.lang.Object
com.flarerobotics.lib.control.RotationalKinematics

public class RotationalKinematics extends Object
Utility class for basic kinematics related to wheel rotations.
  • Method Summary

    Modifier and Type
    Method
    Description
    static edu.wpi.first.units.measure.Distance
    distanceTravelledByWheel(edu.wpi.first.units.measure.Distance diameter, double reduction, double revs)
    Returns the distance travelled by wheel, given the reduction and revolutions.
    static double
    motorRevsFromDistanceTravelledByWheel(edu.wpi.first.units.measure.Distance wheelDiameter, edu.wpi.first.units.measure.Distance travelled, double reduction)
    Returns the number of motor revolutions, given the reduction and distance travelled.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • distanceTravelledByWheel

      public static edu.wpi.first.units.measure.Distance distanceTravelledByWheel(edu.wpi.first.units.measure.Distance diameter, double reduction, double revs)
      Returns the distance travelled by wheel, given the reduction and revolutions.
      Parameters:
      diameter - The diameter of the wheel.
      reduction - The reduction from the motor to the wheel.
      revs - The number of motor revolutions made.
      Returns:
      The distance.
    • motorRevsFromDistanceTravelledByWheel

      public static double motorRevsFromDistanceTravelledByWheel(edu.wpi.first.units.measure.Distance wheelDiameter, edu.wpi.first.units.measure.Distance travelled, double reduction)
      Returns the number of motor revolutions, given the reduction and distance travelled.
      Parameters:
      wheelDiameter - The diameter of the wheel.
      travelled - The distance travelled.
      reduction - The reudction from the motor to the wheel.
      Returns:
      The motor revolutions.