mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
[wpimath] Add DCMotor functions for Kraken X60 and Neo Vortex (#5759)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user