WPILib Drive classes: Drivetrain types

The WPILib Drive classes contain separate classes for each type of drivetrain. There are currently three types of drivetrains supported by WPILib classes. This article describes the three types.

Differential Drive

These drive bases typically have two or more in-line traction or omni  wheels per side (e.g., 6WD or 8WD) and may also be known as  "skid-steer", "tank drive", or "West Coast Drive". The Kit of Parts  drivetrain is an example of a differential drive. These drivetrains are capable of driving forward/backward and can turn by driving the two sides in opposite directions causing the wheels to skid sideways. These drivetrains are not capable of sideways translational movement.

For information on using the DifferentialDrive class, see Driving a robot using Differential Drive.

Mecanum Drive

Mecanum drive is a method of driving using specially designed wheels that allow the robot to drive in any direction without changing the orientation of the robot. A robot with a conventional drivetrain (all wheels pointing in the same direction) must turn in the direction it needs to drive. A mecanum robot can move in any direction without first turning and is called a holonomic drive. The wheels (shown on this robot) have rollers that cause the forces from driving to be applied at a 45 degree angle rather than straight forward as in the case of a conventional drive.

When viewed from the top, the rollers on a mecanum drivetrain should form an 'X' pattern. This results in the force vectors (when driving the wheel forward) on the front two wheels pointing forward and inward and the rear two wheels pointing forward and outward. By spinning the wheels in different directions, various components of the force vectors cancel out, resulting in the desired robot movement. A quick chart of different movements has been provided below, drawing out the force vectors for each of these motions may help in understanding how these drivetrains work. By varying the speeds of the wheels in addition to the direction, movements can be combined resulting in translation in any direction and rotation, simultaneously.

For information on using the MecanumDrive class, see Driving a robot using Mecanum drive

Direction of Movement Front Left Front Right Rear Left Rear Right
Forward Forward
Reverse Reverse
Right Strafe Forward Reverse Reverse Forward
Left Strafe Reverse Forward Forward Reverse
Clockwise Turn Forward Reverse Forward Reverse
Counter-Clockwise Turn Reverse Forward Reverse Forward

Killough Drive

A Killough Drive (also known as a Kiwi Drive) is a holonomic drivetrain utilizing three omniwheels angled at 120 degrees from each other. Similar to the mecanum drive, wheels are run at different speeds in order to accomplish the desired overall motion. The control methods provided are the same as those for the Mecanum drive so for details on using the class, see the Javadoc/Doxygen and the Driving a robot using Mecanum drive article.