DCMotor
- class wpimath.DCMotor(nominal_voltage: wpimath.units.volts, stall_torque: wpimath.units.newton_meters, stall_current: wpimath.units.amperes, free_current: wpimath.units.amperes, free_speed: wpimath.units.radians_per_second, num_motors: SupportsInt | SupportsIndex = 1)
Bases:
pybind11_objectHolds the constants for a DC motor.
Constructs a DC motor.
- Parameters:
nominal_voltage – Voltage at which the motor constants were measured.
stall_torque – Torque when stalled.
stall_current – Current draw when stalled.
free_current – Current draw under no load.
free_speed – Angular velocity under no load.
num_motors – Number of motors in a gearbox.
- WPIStruct = <capsule object "WPyStruct">
- static andymark9015(num_motors: SupportsInt | SupportsIndex = 1) wpimath._wpimath.DCMotor
Returns a gearbox of Andymark 9015 motors.
- static bag(num_motors: SupportsInt | SupportsIndex = 1) wpimath._wpimath.DCMotor
Returns a gearbox of Bag motor motors.
- static banebots_rs550(num_motors: SupportsInt | SupportsIndex = 1) wpimath._wpimath.DCMotor
Returns a gearbox of Banebots RS 550 motors.
- static banebots_rs775(num_motors: SupportsInt | SupportsIndex = 1) wpimath._wpimath.DCMotor
Returns a gearbox of Banebots RS 775 motors.
- static cim(num_motors: SupportsInt | SupportsIndex = 1) wpimath._wpimath.DCMotor
Returns a gearbox of CIM motors.
- current(*args, **kwargs)
Overloaded function.
current(self: wpimath._wpimath.DCMotor, velocity: wpimath.units.radians_per_second, input_voltage: wpimath.units.volts) -> wpimath.units.amperes
Returns current drawn by motor with given velocity and input voltage.
- Parameters:
velocity – The current angular velocity of the motor.
input_voltage – The voltage being applied to the motor.
current(self: wpimath._wpimath.DCMotor, torque: wpimath.units.newton_meters) -> wpimath.units.amperes
Returns current drawn by motor for a given torque.
- Parameters:
torque – The torque produced by the motor.
- static falcon500(num_motors: SupportsInt | SupportsIndex = 1) wpimath._wpimath.DCMotor
Returns a gearbox of Falcon 500 brushless motors.
- static falcon500_foc(num_motors: SupportsInt | SupportsIndex = 1) wpimath._wpimath.DCMotor
Return a gearbox of Falcon 500 motors with FOC (Field-Oriented Control) enabled.
- static kraken_x44(num_motors: SupportsInt | SupportsIndex = 1) wpimath._wpimath.DCMotor
Return a gearbox of Kraken X44 brushless motors.
- static kraken_x44_foc(num_motors: SupportsInt | SupportsIndex = 1) wpimath._wpimath.DCMotor
Return a gearbox of Kraken X44 brushless motors with FOC (Field-Oriented Control) enabled.
- static kraken_x60(num_motors: SupportsInt | SupportsIndex = 1) wpimath._wpimath.DCMotor
Return a gearbox of Kraken X60 brushless motors.
- static kraken_x60_foc(num_motors: SupportsInt | SupportsIndex = 1) wpimath._wpimath.DCMotor
Return a gearbox of Kraken X60 brushless motors with FOC (Field-Oriented Control) enabled.
- static mini_cim(num_motors: SupportsInt | SupportsIndex = 1) wpimath._wpimath.DCMotor
Returns a gearbox of MiniCIM motors.
- static minion(num_motors: SupportsInt | SupportsIndex = 1) wpimath._wpimath.DCMotor
Return a gearbox of Minion brushless motors.
- static neo(num_motors: SupportsInt | SupportsIndex = 1) wpimath._wpimath.DCMotor
Returns a gearbox of NEO brushless motors.
- static neo550(num_motors: SupportsInt | SupportsIndex = 1) wpimath._wpimath.DCMotor
Returns a gearbox of NEO 550 brushless motors.
- static neo_vortex(num_motors: SupportsInt | SupportsIndex = 1) wpimath._wpimath.DCMotor
Return a gearbox of Neo Vortex brushless motors.
- static romi_built_in(num_motors: SupportsInt | SupportsIndex = 1) wpimath._wpimath.DCMotor
Return a gearbox of Romi/TI_RSLK MAX motors.
- static rs775_125(num_motors: SupportsInt | SupportsIndex = 1) wpimath._wpimath.DCMotor
Returns a gearbox of Andymark RS 775-125 motors.
- torque(current: wpimath.units.amperes) wpimath.units.newton_meters
Returns torque produced by the motor with a given current.
- Parameters:
current – The current drawn by the motor.
- velocity(torque: wpimath.units.newton_meters, input_voltage: wpimath.units.volts) wpimath.units.radians_per_second
Returns the angular velocity produced by the motor at a given torque and input voltage.
- Parameters:
torque – The torque produced by the motor.
input_voltage – The input voltage provided to the motor.
- static vex775_pro(num_motors: SupportsInt | SupportsIndex = 1) wpimath._wpimath.DCMotor
Returns a gearbox of Vex 775 Pro motors.
- voltage(torque: wpimath.units.newton_meters, velocity: wpimath.units.radians_per_second) wpimath.units.volts
Returns the voltage provided to the motor for a given torque and angular velocity.
- Parameters:
torque – The torque produced by the motor.
velocity – The current angular velocity of the motor.
- with_reduction(gearbox_reduction: SupportsFloat | SupportsIndex) wpimath._wpimath.DCMotor
Returns a copy of this motor with the given gearbox reduction applied.
- Parameters:
gearbox_reduction – The gearbox reduction.