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 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 instance of Andymark 9015.
◆ Bag()
static constexpr DCMotor frc::DCMotor::Bag |
( |
int |
numMotors = 1 | ) |
|
|
inlinestaticconstexpr |
Returns instance of Bag motor.
◆ BanebotsRS550()
static constexpr DCMotor frc::DCMotor::BanebotsRS550 |
( |
int |
numMotors = 1 | ) |
|
|
inlinestaticconstexpr |
Returns instance of Banebots RS 550.
◆ BanebotsRS775()
static constexpr DCMotor frc::DCMotor::BanebotsRS775 |
( |
int |
numMotors = 1 | ) |
|
|
inlinestaticconstexpr |
Returns instance of Banebots RS 775.
◆ CIM()
static constexpr DCMotor frc::DCMotor::CIM |
( |
int |
numMotors = 1 | ) |
|
|
inlinestaticconstexpr |
◆ 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 instance of Falcon 500 brushless motor.
◆ MiniCIM()
static constexpr DCMotor frc::DCMotor::MiniCIM |
( |
int |
numMotors = 1 | ) |
|
|
inlinestaticconstexpr |
Returns instance of MiniCIM.
◆ NEO()
static constexpr DCMotor frc::DCMotor::NEO |
( |
int |
numMotors = 1 | ) |
|
|
inlinestaticconstexpr |
Returns instance of NEO brushless motor.
◆ NEO550()
static constexpr DCMotor frc::DCMotor::NEO550 |
( |
int |
numMotors = 1 | ) |
|
|
inlinestaticconstexpr |
Returns instance of NEO 550 brushless motor.
◆ 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 instance of Andymark RS 775-125.
◆ Speed()
constexpr units::radians_per_second_t frc::DCMotor::Speed |
( |
units::newton_meter_t |
torque, |
|
|
units::volt_t |
inputVoltage |
|
) |
| const |
|
inlineconstexpr |
Returns the 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 instance of Vex 775 Pro.
◆ 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 |
◆ freeSpeed
units::radians_per_second_t frc::DCMotor::freeSpeed |
◆ Kt
◆ Kv
◆ nominalVoltage
units::volt_t frc::DCMotor::nominalVoltage |
units::ohm_t frc::DCMotor::R |
◆ stallCurrent
units::ampere_t frc::DCMotor::stallCurrent |
◆ stallTorque
units::newton_meter_t frc::DCMotor::stallTorque |
The documentation for this class was generated from the following file: