Joystick Deadzones
D R I F T
Introduction
Sometimes, controller joysticks may have a slight non-zero reading when in a neutral position. This may cause robot motors to drift during operator control when motors are directly controlled by the joysticks.
To mitigate this effect, some teams implement a filter where if a joystick's value is low, the joystick's value will be set to zero. This effectively creates a "deadzone" near the center position of the joystick where any small joystick inputs will not be read.
Example Code
Below is example code for joystick deadzones applied to a tank drive.
Summary
Joystick dead zones while removing some degree of controllability, are sometimes necessary to prevent motor drift with a defective controller. Most of the time, this occurs with older controllers with worn-down joysticks.
Contributing Teams to this Article:
BLRS (Purdue SIGBots)
Last updated