RobotDriveBase

class wpilib.drive.RobotDriveBase

Bases: wpilib.MotorSafety

Common base class for drive platforms.

class MotorType(value: int)

Bases: pybind11_builtins.pybind11_object

The location of a motor on the robot for the purpose of driving.

Members:

kFrontLeft

kFrontRight

kRearLeft

kRearRight

kLeft

kRight

kBack

kBack = <MotorType.kRearLeft: 2>
kFrontLeft = <MotorType.kFrontLeft: 0>
kFrontRight = <MotorType.kFrontRight: 1>
kLeft = <MotorType.kFrontLeft: 0>
kRearLeft = <MotorType.kRearLeft: 2>
kRearRight = <MotorType.kRearRight: 3>
kRight = <MotorType.kFrontRight: 1>
property name
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: float)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 ApplyDeadband().

Parameters

deadband – The deadband to set.

setMaxOutput(maxOutput: float)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