Common base class for drive platforms.
More...
#include <wpi/drive/RobotDriveBase.hpp>
|
| static void | Desaturate (std::span< double > wheelVelocities) |
| | Renormalize all wheel velocities if the magnitude of any wheel is greater than 1.0.
|
|
| static void | CheckMotors () |
| | Check the motors to see if any have timed out.
|
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]
| wpi::RobotDriveBase::RobotDriveBase |
( |
| ) |
|
◆ ~RobotDriveBase()
| wpi::RobotDriveBase::~RobotDriveBase |
( |
| ) |
|
|
overridedefault |
◆ RobotDriveBase() [2/2]
| wpi::RobotDriveBase::RobotDriveBase |
( |
RobotDriveBase && | | ) |
|
|
default |
◆ Desaturate()
| void wpi::RobotDriveBase::Desaturate |
( |
std::span< double > | wheelVelocities | ) |
|
|
staticprotected |
Renormalize all wheel velocities if the magnitude of any wheel is greater than 1.0.
◆ FeedWatchdog()
| void wpi::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 wpi::RobotDriveBase::GetDescription |
( |
| ) |
const |
|
overridepure virtual |
◆ operator=()
◆ SetDeadband()
| void wpi::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 wpi::math::ApplyDeadband().
- Parameters
-
| deadband | The deadband to set. |
◆ SetMaxOutput()
| void wpi::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 wpi::RobotDriveBase::StopMotor |
( |
| ) |
|
|
overridepure virtual |
◆ kDefaultDeadband
| double wpi::RobotDriveBase::kDefaultDeadband = 0.02 |
|
staticconstexprprotected |
◆ kDefaultMaxOutput
| double wpi::RobotDriveBase::kDefaultMaxOutput = 1.0 |
|
staticconstexprprotected |
◆ m_deadband
◆ m_maxOutput
The documentation for this class was generated from the following file: