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 215f7d0d20..0c6e3346b2 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 @@ -250,4 +250,40 @@ public class DCMotor { return new DCMotor( 4.5, 0.1765, 1.25, 0.13, Units.rotationsPerMinuteToRadiansPerSecond(150.0), numMotors); } + + /** + * Return a gearbox of Kraken X60 brushless motors. + * + * @param numMotors Number of motors in the gearbox. + * @return a gearbox of Kraken X60 motors. + */ + public static DCMotor getKrakenX60(int numMotors) { + // From https://store.ctr-electronics.com/announcing-kraken-x60/ + return new DCMotor( + 12, 7.09, 366, 2, Units.rotationsPerMinuteToRadiansPerSecond(6000), numMotors); + } + + /** + * Return a gearbox of Kraken X60 brushless motors with FOC (Field-Oriented Control) enabled. + * + * @param numMotors Number of motors in the gearbox. + * @return A gearbox of Kraken X60 FOC enabled motors. + */ + public static DCMotor getKrakenX60Foc(int numMotors) { + // From https://store.ctr-electronics.com/announcing-kraken-x60/ + return new DCMotor( + 12, 9.37, 483, 2, Units.rotationsPerMinuteToRadiansPerSecond(5800), numMotors); + } + + /** + * Return a gearbox of Neo Vortex brushless motors. + * + * @param numMotors Number of motors in the gearbox. + * @return a gearbox of Neo Vortex motors. + */ + public static DCMotor getNeoVortex(int numMotors) { + // From https://www.revrobotics.com/next-generation-spark-neo/ + return new DCMotor( + 12, 3.60, 211, 3.6, Units.rotationsPerMinuteToRadiansPerSecond(6784), numMotors); + } } 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 19fe15134e..ad711ee3cf 100644 --- a/wpimath/src/main/native/include/frc/system/plant/DCMotor.h +++ b/wpimath/src/main/native/include/frc/system/plant/DCMotor.h @@ -211,6 +211,31 @@ class WPILIB_DLLEXPORT DCMotor { // From https://www.pololu.com/product/1520/specs return DCMotor(4.5_V, 0.1765_Nm, 1.25_A, 0.13_A, 150_rpm, numMotors); } + + /** + * Return a gearbox of Kraken X60 brushless motors. + */ + static constexpr DCMotor KrakenX60(int numMotors = 1) { + // From https://store.ctr-electronics.com/announcing-kraken-x60/ + return DCMotor(12_V, 7.09_Nm, 366_A, 2_A, 6000_rpm, numMotors); + } + + /** + * Return a gearbox of Kraken X60 brushless motors with FOC (Field-Oriented + * Control) enabled. + */ + static constexpr DCMotor KrakenX60FOC(int numMotors = 1) { + // From https://store.ctr-electronics.com/announcing-kraken-x60/ + return DCMotor(12_V, 9.37_Nm, 483_A, 2_A, 5800_rpm, numMotors); + } + + /** + * Return a gearbox of Neo Vortex brushless motors. + */ + static constexpr DCMotor NeoVortex(int numMotors = 1) { + // From https://www.revrobotics.com/next-generation-spark-neo/ + return DCMotor(12_V, 3.60_Nm, 211_A, 3.615_A, 6784_rpm, numMotors); + } }; } // namespace frc