[wpimath] Add DCMotor functions for Kraken X60 and Neo Vortex (#5759)

This commit is contained in:
Jordan McMichael
2023-10-15 00:52:01 -04:00
committed by GitHub
parent fd427f6c82
commit 896772c750
2 changed files with 61 additions and 0 deletions

View File

@@ -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);
}
}