RobotDriveBase
- class wpilib.RobotDriveBase
Bases:
MotorSafetyCommon base class for drive platforms.
MotorSafety is enabled by default.
- class MotorType(value: SupportsInt | SupportsIndex)
Bases:
pybind11_objectThe location of a motor on the robot for the purpose of driving.
Members:
FRONT_LEFT : Front-left motor.
FRONT_RIGHT : Front-right motor.
REAR_LEFT : Rear-left motor.
REAR_RIGHT : Rear-right motor.
LEFT : Left motor.
RIGHT : Right motor.
BACK : Back motor.
- BACK = <MotorType.REAR_LEFT: 2>
- FRONT_LEFT = <MotorType.FRONT_LEFT: 0>
- FRONT_RIGHT = <MotorType.FRONT_RIGHT: 1>
- LEFT = <MotorType.FRONT_LEFT: 0>
- REAR_LEFT = <MotorType.REAR_LEFT: 2>
- REAR_RIGHT = <MotorType.REAR_RIGHT: 3>
- RIGHT = <MotorType.FRONT_RIGHT: 1>
- RobotDriveBase.MotorType.name -> str
- property value
- feedWatchdog() None
Feed the motor safety object. Resets the timer that will stop the motors if it completes.
@see MotorSafetyHelper::Feed()
- getDescription() str
- setDeadband(deadband: SupportsFloat | SupportsIndex) None
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(maxOutput: SupportsFloat | SupportsIndex) None
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() None