Class FlywheelSim

java.lang.Object
edu.wpi.first.wpilibj.simulation.LinearSystemSim<N1,N1,N1>
edu.wpi.first.wpilibj.simulation.FlywheelSim

public class FlywheelSim extends LinearSystemSim<N1,N1,N1>
Represents a simulated flywheel mechanism.
  • Constructor Details

  • Method Details

    • setAngularVelocity

      public void setAngularVelocity(double velocityRadPerSec)
      Sets the flywheel's angular velocity.
      Parameters:
      velocityRadPerSec - The new velocity in radians per second.
    • getGearing

      public double getGearing()
      Returns the gear ratio of the flywheel.
      Returns:
      the flywheel's gear ratio.
    • getJKgMetersSquared

      public double getJKgMetersSquared()
      Returns the moment of inertia in kilograms meters squared.
      Returns:
      The flywheel's moment of inertia.
    • getGearbox

      public DCMotor getGearbox()
      Returns the gearbox for the flywheel.
      Returns:
      The flywheel's gearbox.
    • getAngularVelocityRadPerSec

      public double getAngularVelocityRadPerSec()
      Returns the flywheel's velocity in Radians Per Second.
      Returns:
      The flywheel's velocity in Radians Per Second.
    • getAngularVelocityRPM

      public double getAngularVelocityRPM()
      Returns the flywheel's velocity in RPM.
      Returns:
      The flywheel's velocity in RPM.
    • getAngularVelocity

      Returns the flywheel's velocity.
      Returns:
      The flywheel's velocity
    • getAngularAccelerationRadPerSecSq

      Returns the flywheel's acceleration in Radians Per Second Squared.
      Returns:
      The flywheel's acceleration in Radians Per Second Squared.
    • getAngularAcceleration

      Returns the flywheel's acceleration.
      Returns:
      The flywheel's acceleration.
    • getTorqueNewtonMeters

      public double getTorqueNewtonMeters()
      Returns the flywheel's torque in Newton-Meters.
      Returns:
      The flywheel's torque in Newton-Meters.
    • getCurrentDrawAmps

      public double getCurrentDrawAmps()
      Returns the flywheel's current draw.
      Returns:
      The flywheel's current draw.
    • getInputVoltage

      public double getInputVoltage()
      Gets the input voltage for the flywheel.
      Returns:
      The flywheel's input voltage.
    • setInputVoltage

      public void setInputVoltage(double volts)
      Sets the input voltage for the flywheel.
      Parameters:
      volts - The input voltage.