Class SimulatedMotor
- java.lang.Object
-
- frc.robot.util.hyperdrive.simulator.SimulatedMotor
-
public class SimulatedMotor extends java.lang.Object
Represents a simulated motor
-
-
Field Summary
Fields Modifier and Type Field Description static SimulatedMotor
FALCON500
static SimulatedMotor
NEO
-
Constructor Summary
Constructors Constructor Description SimulatedMotor(double torqueCurveSlope, double initialSlope)
Creates a new SimulatedMotor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getInitialTorque()
Returns the y-intercept of the torque vs.double
getTorqueCurveSlope()
Returns the slope of the empirical torque vs.
-
-
-
Field Detail
-
NEO
public static final SimulatedMotor NEO
-
FALCON500
public static final SimulatedMotor FALCON500
-
-
Constructor Detail
-
SimulatedMotor
public SimulatedMotor(double torqueCurveSlope, double initialSlope)
Creates a new SimulatedMotor.- Parameters:
torqueCurveSlope
- The slope of the empirical torque vs. RPM line. Should be in Nm / RPM. See motor datasheets.initialSlope
- The y-intercept of the empirical torque vs. RPM line. Should be in Nm. See motor datasheets.
-
-
Method Detail
-
getTorqueCurveSlope
public double getTorqueCurveSlope()
Returns the slope of the empirical torque vs. RPM line.- Returns:
- Torque-per-RPM value in Nm/RPM.
-
getInitialTorque
public double getInitialTorque()
Returns the y-intercept of the torque vs. RPM line.- Returns:
- Initial torque value in Nm.
-
-