Class FlywheelIOSim

java.lang.Object
com.marslib.mechanisms.FlywheelIOSim
All Implemented Interfaces:
FlywheelIO

public class FlywheelIOSim extends Object implements FlywheelIO
Simulation implementation of the FlywheelIO interface. Uses WPILib's FlywheelSim to model 1D rotational dynamics and integrates with the centralized MARSPhysicsWorld electrical model for realistic battery sag accurately mapped to current draw.
  • Constructor Details

    • FlywheelIOSim

      public FlywheelIOSim(edu.wpi.first.math.system.plant.DCMotor gearbox, double gearing, double momentOfInertiaKgMetersSquared)
      Constructs a physical simulation instance for a 1D flywheel mechanism.
      Parameters:
      gearbox - The WPILib DCMotor model representing the physical motor (e.g. Kraken X60).
      gearing - The total gear reduction from motor to flywheel.
      momentOfInertiaKgMetersSquared - The moment of inertia of the rotating flywheel in kg*m^2.
  • Method Details