diff --git a/wpimath/src/main/java/edu/wpi/first/wpilibj/system/plant/DCMotor.java b/wpimath/src/main/java/edu/wpi/first/wpilibj/system/plant/DCMotor.java index 49680b355a..c4683a1c52 100644 --- a/wpimath/src/main/java/edu/wpi/first/wpilibj/system/plant/DCMotor.java +++ b/wpimath/src/main/java/edu/wpi/first/wpilibj/system/plant/DCMotor.java @@ -180,4 +180,15 @@ public class DCMotor { return new DCMotor( 12, 4.69, 257, 1.5, Units.rotationsPerMinuteToRadiansPerSecond(6380.0), numMotors); } + + /** + * Return a gearbox of Romi/TI_RSLK MAX motors. + * + * @param numMotors Number of motors in the gearbox. + */ + public static DCMotor getRomiBuiltIn(int numMotors) { + // From https://www.pololu.com/product/1520/specs + return new DCMotor( + 4.5, 0.1765, 1.25, 0.13, Units.rotationsPerMinuteToRadiansPerSecond(150.0), 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 24266430a9..efb7174bb5 100644 --- a/wpimath/src/main/native/include/frc/system/plant/DCMotor.h +++ b/wpimath/src/main/native/include/frc/system/plant/DCMotor.h @@ -149,6 +149,14 @@ class DCMotor { static constexpr DCMotor Falcon500(int numMotors = 1) { return DCMotor(12_V, 4.69_Nm, 257_A, 1.5_A, 6380_rpm, numMotors); } + + /** + * Return a gearbox of Romi/TI_RSLK MAX motors. + */ + static constexpr DCMotor RomiBuiltIn(int numMotors = 1) { + // 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); + } }; } // namespace frc