diff --git a/wpimath/src/main/java/edu/wpi/first/math/system/plant/DCMotor.java b/wpimath/src/main/java/edu/wpi/first/math/system/plant/DCMotor.java index de8346d7dd..dead6162f8 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/system/plant/DCMotor.java +++ b/wpimath/src/main/java/edu/wpi/first/math/system/plant/DCMotor.java @@ -310,6 +310,42 @@ public class DCMotor implements ProtobufSerializable, StructSerializable { 12, 9.37, 483, 2, Units.rotationsPerMinuteToRadiansPerSecond(5800), numMotors); } + /** + * Return a gearbox of Kraken X44 brushless motors. + * + * @param numMotors Number of motors in the gearbox. + * @return a gearbox of Kraken X44 motors. + */ + public static DCMotor getKrakenX44(int numMotors) { + // From https://motors.ctr-electronics.com/dyno/dynometer-testing/ + return new DCMotor( + 12, 4.11, 279, 2, Units.rotationsPerMinuteToRadiansPerSecond(7758), numMotors); + } + + /** + * Return a gearbox of Kraken X44 brushless motors with FOC (Field-Oriented Control) enabled. + * + * @param numMotors Number of motors in the gearbox. + * @return A gearbox of Kraken X44 FOC enabled motors. + */ + public static DCMotor getKrakenX44Foc(int numMotors) { + // From https://motors.ctr-electronics.com/dyno/dynometer-testing/ + return new DCMotor( + 12, 5.01, 329, 2, Units.rotationsPerMinuteToRadiansPerSecond(7368), numMotors); + } + + /** + * Return a gearbox of Minion brushless motors. + * + * @param numMotors Number of motors in the gearbox. + * @return A gearbox of Minion motors. + */ + public static DCMotor getMinion(int numMotors) { + // From https://motors.ctr-electronics.com/dyno/dynometer-testing/ + return new DCMotor( + 12, 3.17, 211, 2, Units.rotationsPerMinuteToRadiansPerSecond(7704), numMotors); + } + /** * Return a gearbox of Neo Vortex brushless motors. * diff --git a/wpimath/src/main/native/include/frc/system/plant/DCMotor.h b/wpimath/src/main/native/include/frc/system/plant/DCMotor.h index 90dc8299ea..145cf02bfd 100644 --- a/wpimath/src/main/native/include/frc/system/plant/DCMotor.h +++ b/wpimath/src/main/native/include/frc/system/plant/DCMotor.h @@ -247,6 +247,31 @@ class WPILIB_DLLEXPORT DCMotor { return DCMotor(12_V, 9.37_Nm, 483_A, 2_A, 5800_rpm, numMotors); } + /** + * Return a gearbox of Kraken X44 brushless motors. + */ + static constexpr DCMotor KrakenX44(int numMotors = 1) { + // From https://motors.ctr-electronics.com/dyno/dynometer-testing/ + return DCMotor(12_V, 4.11_Nm, 279_A, 2_A, 7758_rpm, numMotors); + } + + /** + * Return a gearbox of Kraken X44 brushless motors with FOC (Field-Oriented + * Control) enabled. + */ + static constexpr DCMotor KrakenX44FOC(int numMotors = 1) { + // From https://motors.ctr-electronics.com/dyno/dynometer-testing/ + return DCMotor(12_V, 5.01_Nm, 329_A, 2_A, 7368_rpm, numMotors); + } + + /** + * Return a gearbox of Minion brushless motors. + */ + static constexpr DCMotor Minion(int numMotors = 1) { + // From https://motors.ctr-electronics.com/dyno/dynometer-testing/ + return DCMotor(12_V, 3.17_Nm, 211_A, 2_A, 7704_rpm, numMotors); + } + /** * Return a gearbox of Neo Vortex brushless motors. */