Wheels and Drivetrains
Compare tank, mecanum and omni drivetrains, understand how mecanum wheels can move sideways, and write a basic mecanum drive OpMode.
In this lesson you will
- List what a good FTC drivetrain needs to do.
- Compare tank, mecanum and omni drivetrains and their trade-offs.
- Explain how angled rollers let a mecanum drivetrain strafe.
- Write and test a basic mecanum drive OpMode.
Lesson
The drivetrain is the part of the robot that moves it around the field. Every match depends on it: in Autonomous it must drive accurately, and in Driver-Controlled (TeleOp) it must be fast, easy to control and tough enough to survive pushing from other robots. Choosing a drivetrain is one of the first big decisions your team makes. It affects the size of the frame, where the other subsystems can be mounted, how many motor ports are left for mechanisms and how your drivers will practise, so it is worth taking the time to understand the options before you start cutting metal.
What a drivetrain needs to do
- Move quickly between areas of the field.
- Turn and stop accurately so drivers and Autonomous code can line up with targets.
- Push or resist being pushed when robots meet.
- Stay reliable for many matches without loosening or breaking.
- On many robots, move sideways (strafe) without turning first.
Three common drivetrains
| Drivetrain | Wheels | Can strafe? | Strengths | Weaknesses |
|---|---|---|---|---|
| Tank | Traction wheels on fixed left and right sides | No | Simple, strong pushing, easy to build | Must turn to change direction, turning scrubs the wheels |
| Mecanum | Four mecanum wheels with 45-degree rollers | Yes | Moves in any direction, very popular in FTC | Less pushing power and grip, needs careful assembly |
| Omni (X-drive) | Four omni wheels mounted at 45 degrees on the corners | Yes | Fast and smooth in all directions | Easily pushed, more complex frame |
A tank drivetrain works like a tank or a wheelchair: the left wheels and right wheels are driven separately. Both sides forward drives straight, and one side forward with the other backward spins the robot on the spot. Tank drives use rubber traction wheels, so they grip the tiles well and are hard to push. Their downside is that the robot must turn before it can move in a new direction.
Omni wheels have small rollers around the edge, at 90 degrees to the wheel. The wheel drives normally in one direction but slides freely sideways. Placed at 45 degrees on each corner of the robot, four omni wheels make an X-drive that can move in any direction. The free-sliding rollers also make the robot easy to push.
How mecanum wheels work
A mecanum wheel has rollers mounted at 45 degrees. When the wheel spins, the angled roller touching the ground pushes the robot diagonally, not straight. The four wheels are arranged so these diagonal pushes combine. If all four spin forward, the sideways parts cancel and the robot drives forward. If the wheels spin in a specific pattern, the forward parts cancel and the robot slides sideways. Mix the patterns and the robot can drive, strafe and turn at the same time. Because each wheel needs its own power, a mecanum drivetrain almost always uses four motors, one per wheel, and all four wheels must touch the floor evenly. If the frame is bent or one wheel lifts off the tiles, the forces no longer balance and the robot drifts when it strafes.
| Motion | Front left | Front right | Back left | Back right |
|---|---|---|---|---|
| Drive forward | Forward | Forward | Forward | Forward |
| Strafe right | Forward | Backward | Backward | Forward |
| Turn right (clockwise) | Forward | Backward | Forward | Backward |
1package org.firstinspires.ftc.teamcode;
2
3import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
4import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
5import com.qualcomm.robotcore.hardware.DcMotor;
6import com.qualcomm.robotcore.hardware.DcMotorSimple;
7
8@TeleOp(name = "Mecanum Drive")
9public class MecanumDrive extends LinearOpMode {
10 @Override
11 public void runOpMode() {
12 DcMotor fl = hardwareMap.get(DcMotor.class, "front_left");
13 DcMotor fr = hardwareMap.get(DcMotor.class, "front_right");
14 DcMotor bl = hardwareMap.get(DcMotor.class, "back_left");
15 DcMotor br = hardwareMap.get(DcMotor.class, "back_right");
16 // Left motors face the opposite way, so reverse them
17 fl.setDirection(DcMotorSimple.Direction.REVERSE);
18 bl.setDirection(DcMotorSimple.Direction.REVERSE);
19
20 waitForStart();
21 while (opModeIsActive()) {
22 double y = -gamepad1.left_stick_y; // forward and back
23 double x = gamepad1.left_stick_x; // strafe
24 double rx = gamepad1.right_stick_x; // turn
25 // Keep every power between -1 and 1
26 double d = Math.max(Math.abs(y) + Math.abs(x) + Math.abs(rx), 1);
27 fl.setPower((y + x + rx) / d);
28 bl.setPower((y - x + rx) / d);
29 fr.setPower((y - x - rx) / d);
30 br.setPower((y + x - rx) / d);
31 }
32 }
33}
Key terms
- Drivetrain
- The motors, wheels and transmission parts that move the robot around the field.
- Tank drive
- A drivetrain where the left and right sides are driven separately and the robot turns by running them at different speeds.
- Mecanum wheel
- A wheel with rollers at 45 degrees that pushes diagonally, allowing a robot with four of them to move in any direction.
- Omni wheel
- A wheel with rollers at 90 degrees that drives in one direction and slides freely sideways.
- Strafe
- To move sideways without turning the robot.
Practical exercise
Mecanum Direction Check
- 1Look at your drivetrain (or a photo of a kit mecanum drivetrain) from above and sketch the direction of the top rollers on each wheel. Confirm they form an X.
- 2Configure four drive motors named
front_left,front_right,back_leftandback_right, then load the Mecanum Drive OpMode. - 3With the robot on a stand so the wheels are off the ground, push the left stick forward and check that all four wheels spin forward. Fix motor directions if not.
- 4Test strafe right and turn right, and compare each wheel's direction with the table in this lesson.
- 5If you do not have a mecanum robot yet, complete the wheel-direction table on paper for drive backward, strafe left and turn left instead.
Knowledge check
Answer every question, then check your answers.