Package frc.robot.devices.motor
Class AbstractVelocitySimMotor<TConfig extends MotorConfig>
java.lang.Object
frc.robot.devices.motor.AbstractMotor
frc.robot.devices.motor.AbstractSimMotor
frc.robot.devices.motor.AbstractVelocitySimMotor<TConfig>
- Type Parameters:
TConfig- concrete motor config type
- Direct Known Subclasses:
FeederSimMotor,IndexerSimMotor,IntakeSimMotor,ShooterSimMotor
public abstract class AbstractVelocitySimMotor<TConfig extends MotorConfig>
extends AbstractSimMotor
Simulation-only motor wrapper for velocity-controlled mechanisms.
Concrete subclasses supply their specific motor config and friendly name so the simulation motor matches the gearing and limits of the real device.
-
Nested Class Summary
Nested classes/interfaces inherited from interface frc.robot.devices.motor.MotorIO
MotorIO.MotorIOInputs -
Field Summary
Fields inherited from class frc.robot.devices.motor.AbstractMotor
log, motor, name, NOMINAL_VOLTAGE -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class frc.robot.devices.motor.AbstractSimMotor
configureMotor, setEncoderPosition, updateInputsMethods inherited from class frc.robot.devices.motor.AbstractMotor
computeMechanismRadiansPerMotorRotation, getPositionRadians, getVelocityRadiansPerSecond, getVoltage, init, isInitialized, setVoltage, stop
-
Constructor Details
-
AbstractVelocitySimMotor
protected AbstractVelocitySimMotor(String name, TConfig motorConfig, Supplier<Double> maximumVelocitySupplier, Supplier<Double> maximumAccelerationSupplier) Creates a simulated velocity motor using the supplied configuration values.- Parameters:
name- friendly name used for loggingmotorConfig- motor configuration bundle loaded from JSONmaximumVelocitySupplier- supplier yielding the maximum mechanism velocity in degrees per secondmaximumAccelerationSupplier- supplier yielding the maximum mechanism acceleration in degrees per second squared
-