Tank Drive
Learn how tank drive works and when to use it.
Tank drive is one of the simplest and most common drive systems in robotics. Each side of the robot is controlled independently, similar to how a tank steers.
Typically:
- The left joystick controls the left wheels.
- The right joystick controls the right wheels.
How It Works
Driving forward means both sides move forward.
Turning is accomplished by moving the two sides at different speeds.
For example:
| Left Stick | Right Stick | Robot Motion |
|---|---|---|
| Forward | Forward | Forward |
| Backward | Backward | Reverse |
| Forward | Backward | Rotate |
| Half | Full | Gentle turn |
Example
double leftPower = -gamepad1.left_stick_y;
double rightPower = -gamepad1.right_stick_y;
leftMotor.setPower(leftPower);
rightMotor.setPower(rightPower);Notice the negative sign. FTC gamepads report pushing the joystick forward as a negative value.
Advantages
- Very simple to implement
- Easy to understand
- Precise turning
- Great for differential-drive robots
Disadvantages
Tank drive only works for robots whose left and right sides can be controlled independently.
It is not suitable for mecanum or omniwheel drivetrains because those robots require additional calculations.
Next Steps
Continue to Arcade Drive for a more intuitive control scheme, or Mecanum Drive for omnidirectional drive.
Was this resource helpful?
