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