Class SimulatedMotorController.GenericMotorController
java.lang.Object
org.ironmaple.simulation.motorsims.SimulatedMotorController.GenericMotorController
- All Implemented Interfaces:
SimulatedMotorController
- Enclosing interface:
- SimulatedMotorController
public static final class SimulatedMotorController.GenericMotorController
extends Object
implements SimulatedMotorController
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ironmaple.simulation.motorsims.SimulatedMotorController
SimulatedMotorController.GenericMotorController
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionedu.wpi.first.units.measure.Voltage
constrainOutputVoltage
(edu.wpi.first.units.measure.Angle encoderAngle, edu.wpi.first.units.measure.AngularVelocity encoderVelocity, edu.wpi.first.units.measure.Voltage requestedVoltage) (Utility Function) Constrains the Output Voltage of a Motor.void
requestVoltage
(edu.wpi.first.units.measure.Voltage voltage) edu.wpi.first.units.measure.Voltage
updateControlSignal
(edu.wpi.first.units.measure.Angle mechanismAngle, edu.wpi.first.units.measure.AngularVelocity mechanismVelocity, edu.wpi.first.units.measure.Angle encoderAngle, edu.wpi.first.units.measure.AngularVelocity encoderVelocity) withCurrentLimit
(edu.wpi.first.units.measure.Current currentLimit) withSoftwareLimits
(edu.wpi.first.units.measure.Angle forwardSoftwareLimit, edu.wpi.first.units.measure.Angle reverseSoftwareLimit)
-
Constructor Details
-
GenericMotorController
-
-
Method Details
-
withCurrentLimit
public SimulatedMotorController.GenericMotorController withCurrentLimit(edu.wpi.first.units.measure.Current currentLimit) -
withSoftwareLimits
public SimulatedMotorController.GenericMotorController withSoftwareLimits(edu.wpi.first.units.measure.Angle forwardSoftwareLimit, edu.wpi.first.units.measure.Angle reverseSoftwareLimit) -
requestVoltage
public void requestVoltage(edu.wpi.first.units.measure.Voltage voltage) -
constrainOutputVoltage
public edu.wpi.first.units.measure.Voltage constrainOutputVoltage(edu.wpi.first.units.measure.Angle encoderAngle, edu.wpi.first.units.measure.AngularVelocity encoderVelocity, edu.wpi.first.units.measure.Voltage requestedVoltage) (Utility Function) Constrains the Output Voltage of a Motor.
Constrains the output voltage of a motor such that the stator current does not exceed the current limit
Prevents motor from exceeding software limits
- Parameters:
encoderAngle
- the angle of the encoderencoderVelocity
- the velocity of the encoderrequestedVoltage
- the requested voltage- Returns:
- the constrained voltage that satisfied the limits
-
updateControlSignal
public edu.wpi.first.units.measure.Voltage updateControlSignal(edu.wpi.first.units.measure.Angle mechanismAngle, edu.wpi.first.units.measure.AngularVelocity mechanismVelocity, edu.wpi.first.units.measure.Angle encoderAngle, edu.wpi.first.units.measure.AngularVelocity encoderVelocity) - Specified by:
updateControlSignal
in interfaceSimulatedMotorController
-