Common base class for drive platforms.
More...
#include <frc/drive/RobotDriveBase.h>
|
static void | Desaturate (std::span< double > wheelSpeeds) |
| Renormalize all wheel speeds if the magnitude of any wheel is greater than 1.0. More...
|
|
Common base class for drive platforms.
MotorSafety is enabled by default.
◆ MotorType
The location of a motor on the robot for the purpose of driving.
Enumerator |
---|
kFrontLeft | Front-left motor.
|
kFrontRight | Front-right motor.
|
kRearLeft | Rear-left motor.
|
kRearRight | Rear-right motor.
|
kLeft | Left motor.
|
kRight | Right motor.
|
kBack | Back motor.
|
◆ RobotDriveBase() [1/2]
frc::RobotDriveBase::RobotDriveBase |
( |
| ) |
|
◆ ~RobotDriveBase()
frc::RobotDriveBase::~RobotDriveBase |
( |
| ) |
|
|
overridedefault |
◆ RobotDriveBase() [2/2]
◆ Desaturate()
static void frc::RobotDriveBase::Desaturate |
( |
std::span< double > |
wheelSpeeds | ) |
|
|
staticprotected |
Renormalize all wheel speeds if the magnitude of any wheel is greater than 1.0.
◆ FeedWatchdog()
void frc::RobotDriveBase::FeedWatchdog |
( |
| ) |
|
Feed the motor safety object.
Resets the timer that will stop the motors if it completes.
- See also
- MotorSafetyHelper::Feed()
◆ GetDescription()
std::string frc::RobotDriveBase::GetDescription |
( |
| ) |
const |
|
overridepure virtual |
◆ operator=()
◆ SetDeadband()
void frc::RobotDriveBase::SetDeadband |
( |
double |
deadband | ) |
|
Sets the deadband applied to the drive inputs (e.g., joystick values).
The default value is 0.02. Inputs smaller than the deadband are set to 0.0 while inputs larger than the deadband are scaled from 0.0 to 1.0. See frc::ApplyDeadband().
- Parameters
-
deadband | The deadband to set. |
◆ SetMaxOutput()
void frc::RobotDriveBase::SetMaxOutput |
( |
double |
maxOutput | ) |
|
Configure the scaling factor for using RobotDrive with motor controllers in a mode other than PercentVbus or to limit the maximum output.
- Parameters
-
maxOutput | Multiplied with the output percentage computed by the drive functions. |
◆ StopMotor()
void frc::RobotDriveBase::StopMotor |
( |
| ) |
|
|
overridepure virtual |
◆ kDefaultDeadband
constexpr double frc::RobotDriveBase::kDefaultDeadband = 0.02 |
|
staticconstexprprotected |
◆ kDefaultMaxOutput
constexpr double frc::RobotDriveBase::kDefaultMaxOutput = 1.0 |
|
staticconstexprprotected |
◆ m_deadband
◆ m_maxOutput
The documentation for this class was generated from the following file: