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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconstrainOutputVoltage
(Angle encoderAngle, AngularVelocity encoderVelocity, Voltage requestedVoltage) (Utility Function) Constrains the Output Voltage of a Motor.void
requestVoltage
(Voltage voltage) updateControlSignal
(Angle mechanismAngle, AngularVelocity mechanismVelocity, Angle encoderAngle, AngularVelocity encoderVelocity) withCurrentLimit
(Current currentLimit) withSoftwareLimits
(Angle forwardSoftwareLimit, Angle reverseSoftwareLimit)
-
Constructor Details
-
GenericMotorController
-
-
Method Details
-
withCurrentLimit
-
withSoftwareLimits
public SimulatedMotorController.GenericMotorController withSoftwareLimits(Angle forwardSoftwareLimit, Angle reverseSoftwareLimit) -
requestVoltage
-
constrainOutputVoltage
public Voltage constrainOutputVoltage(Angle encoderAngle, AngularVelocity encoderVelocity, 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 Voltage updateControlSignal(Angle mechanismAngle, AngularVelocity mechanismVelocity, Angle encoderAngle, AngularVelocity encoderVelocity) - Specified by:
updateControlSignal
in interfaceSimulatedMotorController
-