WestlakeLEARN
FTC / Java

First Tech Challenge

FTC / Java

01 · Java for FTC
  • OpMode Anatomy and Hello Robot
  • Variables, Math, and Decisions
  • Methods, Classes, and Robot Helpers
02 · FTC Hardware Essentials
  • Hardware Map and RobotHardware
  • Motors, Servos, and Sensors
  • IMU, Encoders, and Bulk Caching
03 · TeleOp and Mecanum
  • Robot-Centric Mecanum Drive
  • Field-Centric Driving
  • Driver Ergonomics and Safe TeleOp
04 · Subsystems and Commands
  • Subsystem Lifecycle
  • Enums and Finite State Machines
  • Command-Based OpModes
05 · From Timed Steps to Actions
  • Timed and Encoder Autonomous
  • Autonomous State Machines
  • Actions and Sequencing
06 · PID and Feedforward
  • PID Basics
  • Feedforward and PIDF
  • Dashboard Tuning Workflow
07 · Motion Profiling
  • Motion Profile Concepts
  • Implementing a Profiled Mechanism
  • Testing Profiles and Failure Modes
08 · OpenCV and AprilTags
  • VisionPortal Camera Setup
  • OpenCV Color and Region Processors
  • AprilTags and Field Pose
09 · Setup and Tuning
  • Road Runner 1.0 Install and Drive Class
  • Feedforward Tuning
  • Localization and Validation
10 · Trajectories, Actions, and MeepMeep
  • Action Builder and Trajectories
  • MeepMeep Preview
  • Full Road Runner Autonomous
11 · Git, Debugging, and Competition Readiness
  • Git Workflow for FTC Teams
  • Telemetry-First Debugging
  • Competition Readiness Checklist
12 · Driver Control1/1
  • Driver Control
13 · Autonomous Build
  • Simple Autonomous
14 · Debugging
  • Debugging with Telemetry

12 / Driver Control

Driver Control

Turn gamepad input into predictable mecanum movement.

60 minCoreDriver Control

You will

  1. 01Read joystick axes correctly.
  2. 02Combine drive, strafe, and turn values.
  3. 03Normalize motor powers before writing to hardware.

Why Driver Control matters

This lesson is about the interface between drivers and robot behavior. Good TeleOp code is not just mathematically correct; it is predictable under pressure, easy to recover, and readable enough that the drive team can describe what the robot is supposed to do.

Starting point

Driver code should feel boring

A driver should not need to understand your math during a match. Good TeleOp code makes common movement predictable and keeps surprises out of competition.

Normalize before sending power

Mecanum formulas can produce values above 1.0. Normalizing keeps the ratio between wheels while staying inside the legal motor power range.

Build path

Test driver code in movement primitives and mechanism primitives instead of full-match chaos. Add deadbands, slow modes, edge detection, and safe states only after students can explain the raw input and final output for each control.

For this specific lesson, students should first restate the goal in robot terms, then identify the value or behavior they expect to observe, then run the smallest test that proves the idea. The lesson should feel like a guided lab: predict, run, observe, explain, and only then extend.

MecanumTeleOp.java · Java

double drive = -gamepad1.left_stick_y;
double strafe = gamepad1.left_stick_x;
double turn = gamepad1.right_stick_x;

double fl = drive + strafe + turn;
double fr = drive - strafe - turn;
double bl = drive - strafe + turn;
double br = drive + strafe - turn;

double max = Math.max(1.0, Math.max(
  Math.max(Math.abs(fl), Math.abs(fr)),
  Math.max(Math.abs(bl), Math.abs(br))
));

frontLeft.setPower(fl / max);
frontRight.setPower(fr / max);
backLeft.setPower(bl / max);
backRight.setPower(br / max);

Debugging and failure modes

When TeleOp feels wrong, translate driver feedback into small tests: forward, strafe, rotate, precision mode, button press, held button, and safe recovery. Print raw inputs and final commands so the team can separate driver feel from wiring, math, and mechanism bugs.

Practice

Write mecanum drive code, then test forward, strafe, turn, and diagonal movement one at a time.

Checks

  • Forward on the stick moves the robot forward.
  • Strafe does not rotate the robot badly.
  • No motor receives power outside -1.0 to 1.0.

Check your understanding

Module check

What should you check first when robot code does not behave as expected?

0 of 1 answered

References

FIRST FTC DocsOfficial FTC SDK and robot programming documentation.Learn Road RunnerFTC autonomous and trajectory reference.

Finished reading?

Mark this lesson complete.

You'll move on to “Simple Autonomous” next.

Competition Readiness ChecklistSimple Autonomous