Holds the constants for a DC motor.
More...
#include <frc/system/plant/DCMotor.h>
|
constexpr | DCMotor (units::volt_t nominalVoltage, units::newton_meter_t stallTorque, units::ampere_t stallCurrent, units::ampere_t freeCurrent, units::radians_per_second_t freeSpeed, int numMotors=1) |
| Constructs a DC motor. More...
|
|
constexpr units::ampere_t | Current (units::radians_per_second_t speed, units::volt_t inputVoltage) const |
| Returns current drawn by motor with given speed and input voltage. More...
|
|
constexpr units::newton_meter_t | Torque (units::ampere_t current) const |
| Returns torque produced by the motor with a given current. More...
|
|
constexpr units::volt_t | Voltage (units::newton_meter_t torque, units::radians_per_second_t speed) const |
| Returns the voltage provided to the motor for a given torque and angular velocity. More...
|
|
constexpr units::radians_per_second_t | Speed (units::newton_meter_t torque, units::volt_t inputVoltage) const |
| Returns the angular speed produced by the motor at a given torque and input voltage. More...
|
|
constexpr DCMotor | WithReduction (double gearboxReduction) |
| Returns a copy of this motor with the given gearbox reduction applied. More...
|
|
Holds the constants for a DC motor.
◆ newton_meters_per_ampere_t
◆ radians_per_second_per_volt_t
◆ DCMotor()
constexpr frc::DCMotor::DCMotor |
( |
units::volt_t |
nominalVoltage, |
|
|
units::newton_meter_t |
stallTorque, |
|
|
units::ampere_t |
stallCurrent, |
|
|
units::ampere_t |
freeCurrent, |
|
|
units::radians_per_second_t |
freeSpeed, |
|
|
int |
numMotors = 1 |
|
) |
| |
|
inlineconstexpr |
Constructs a DC motor.
- Parameters
-
nominalVoltage | Voltage at which the motor constants were measured. |
stallTorque | Torque when stalled. |
stallCurrent | Current draw when stalled. |
freeCurrent | Current draw under no load. |
freeSpeed | Angular velocity under no load. |
numMotors | Number of motors in a gearbox. |
◆ Andymark9015()
static constexpr DCMotor frc::DCMotor::Andymark9015 |
( |
int |
numMotors = 1 | ) |
|
|
inlinestaticconstexpr |
Returns a gearbox of Andymark 9015 motors.
◆ Bag()
static constexpr DCMotor frc::DCMotor::Bag |
( |
int |
numMotors = 1 | ) |
|
|
inlinestaticconstexpr |
Returns a gearbox of Bag motor motors.
◆ BanebotsRS550()
static constexpr DCMotor frc::DCMotor::BanebotsRS550 |
( |
int |
numMotors = 1 | ) |
|
|
inlinestaticconstexpr |
Returns a gearbox of Banebots RS 550 motors.
◆ BanebotsRS775()
static constexpr DCMotor frc::DCMotor::BanebotsRS775 |
( |
int |
numMotors = 1 | ) |
|
|
inlinestaticconstexpr |
Returns a gearbox of Banebots RS 775 motors.
◆ CIM()
static constexpr DCMotor frc::DCMotor::CIM |
( |
int |
numMotors = 1 | ) |
|
|
inlinestaticconstexpr |
Returns a gearbox of CIM motors.
◆ Current()
constexpr units::ampere_t frc::DCMotor::Current |
( |
units::radians_per_second_t |
speed, |
|
|
units::volt_t |
inputVoltage |
|
) |
| const |
|
inlineconstexpr |
Returns current drawn by motor with given speed and input voltage.
- Parameters
-
speed | The current angular velocity of the motor. |
inputVoltage | The voltage being applied to the motor. |
◆ Falcon500()
static constexpr DCMotor frc::DCMotor::Falcon500 |
( |
int |
numMotors = 1 | ) |
|
|
inlinestaticconstexpr |
Returns a gearbox of Falcon 500 brushless motors.
◆ Falcon500FOC()
static constexpr DCMotor frc::DCMotor::Falcon500FOC |
( |
int |
numMotors = 1 | ) |
|
|
inlinestaticconstexpr |
Return a gearbox of Falcon 500 motors with FOC (Field-Oriented Control) enabled.
◆ KrakenX60()
static constexpr DCMotor frc::DCMotor::KrakenX60 |
( |
int |
numMotors = 1 | ) |
|
|
inlinestaticconstexpr |
Return a gearbox of Kraken X60 brushless motors.
◆ KrakenX60FOC()
static constexpr DCMotor frc::DCMotor::KrakenX60FOC |
( |
int |
numMotors = 1 | ) |
|
|
inlinestaticconstexpr |
Return a gearbox of Kraken X60 brushless motors with FOC (Field-Oriented Control) enabled.
◆ MiniCIM()
static constexpr DCMotor frc::DCMotor::MiniCIM |
( |
int |
numMotors = 1 | ) |
|
|
inlinestaticconstexpr |
Returns a gearbox of MiniCIM motors.
◆ NEO()
static constexpr DCMotor frc::DCMotor::NEO |
( |
int |
numMotors = 1 | ) |
|
|
inlinestaticconstexpr |
Returns a gearbox of NEO brushless motors.
◆ NEO550()
static constexpr DCMotor frc::DCMotor::NEO550 |
( |
int |
numMotors = 1 | ) |
|
|
inlinestaticconstexpr |
Returns a gearbox of NEO 550 brushless motors.
◆ NeoVortex()
static constexpr DCMotor frc::DCMotor::NeoVortex |
( |
int |
numMotors = 1 | ) |
|
|
inlinestaticconstexpr |
Return a gearbox of Neo Vortex brushless motors.
◆ RomiBuiltIn()
static constexpr DCMotor frc::DCMotor::RomiBuiltIn |
( |
int |
numMotors = 1 | ) |
|
|
inlinestaticconstexpr |
Return a gearbox of Romi/TI_RSLK MAX motors.
◆ RS775_125()
static constexpr DCMotor frc::DCMotor::RS775_125 |
( |
int |
numMotors = 1 | ) |
|
|
inlinestaticconstexpr |
Returns a gearbox of Andymark RS 775-125 motors.
◆ Speed()
constexpr units::radians_per_second_t frc::DCMotor::Speed |
( |
units::newton_meter_t |
torque, |
|
|
units::volt_t |
inputVoltage |
|
) |
| const |
|
inlineconstexpr |
Returns the angular speed produced by the motor at a given torque and input voltage.
- Parameters
-
torque | The torque produced by the motor. |
inputVoltage | The input voltage provided to the motor. |
◆ Torque()
constexpr units::newton_meter_t frc::DCMotor::Torque |
( |
units::ampere_t |
current | ) |
const |
|
inlineconstexpr |
Returns torque produced by the motor with a given current.
- Parameters
-
current | The current drawn by the motor. |
◆ Vex775Pro()
static constexpr DCMotor frc::DCMotor::Vex775Pro |
( |
int |
numMotors = 1 | ) |
|
|
inlinestaticconstexpr |
Returns a gearbox of Vex 775 Pro motors.
◆ Voltage()
constexpr units::volt_t frc::DCMotor::Voltage |
( |
units::newton_meter_t |
torque, |
|
|
units::radians_per_second_t |
speed |
|
) |
| const |
|
inlineconstexpr |
Returns the voltage provided to the motor for a given torque and angular velocity.
- Parameters
-
torque | The torque produced by the motor. |
speed | The current angular velocity of the motor. |
◆ WithReduction()
constexpr DCMotor frc::DCMotor::WithReduction |
( |
double |
gearboxReduction | ) |
|
|
inlineconstexpr |
Returns a copy of this motor with the given gearbox reduction applied.
- Parameters
-
gearboxReduction | The gearbox reduction. |
◆ freeCurrent
units::ampere_t frc::DCMotor::freeCurrent |
Current draw under no load.
◆ freeSpeed
units::radians_per_second_t frc::DCMotor::freeSpeed |
Angular velocity under no load.
◆ Kt
◆ Kv
◆ nominalVoltage
units::volt_t frc::DCMotor::nominalVoltage |
Voltage at which the motor constants were measured.
units::ohm_t frc::DCMotor::R |
Motor internal resistance.
◆ stallCurrent
units::ampere_t frc::DCMotor::stallCurrent |
Current draw when stalled.
◆ stallTorque
units::newton_meter_t frc::DCMotor::stallTorque |
The documentation for this class was generated from the following file: