WestlakeLEARN
FTC · Java

FIRST Tech Challenge

FTC · Java

  • Git Workflow for FTC Teams
  • Debugging with Telemetry
  • Code Review for Robot Programmers
  • Competition Code Freeze and Recovery Workflow

Debugging with Telemetry

Use telemetry to find what the robot thinks is true.

Module 14: Team Workflow and Competition ReadinessWalkthrough

In this lesson, you will:

  1. 01Print sensor and state values clearly.
  2. 02Separate driver mistakes from code mistakes.
  3. 03Make a short pre-match debug checklist.

Telemetry is the robot talking back

Good telemetry turns mystery behavior into visible data. Show joystick input, current state, motor power, and any sensor value that affects decisions.

Debug the smallest claim first

Before rewriting logic, check whether the robot sees the same input you think it sees. Most fixes start with one boring value on screen.

Change one thing at a time

If you change three things and the robot improves, you do not know which change worked — or which one will bite you later. Make one change, test it, write down what happened, then move on.

Robot code habit

Display expected and actual values together when debugging a sensor or mechanism target.

On-robot safety

Do not raise motor power to diagnose an unknown fault. Prove the input and calculation first, then test hardware at low power.

TelemetryDebug.javaJava

telemetry.addData("Drive", drive);
telemetry.addData("Strafe", strafe);
telemetry.addData("Turn", turn);
telemetry.addData("Lift target", liftTargetTicks);
telemetry.addData("Lift position", liftMotor.getCurrentPosition());
telemetry.update();

Practice

Add telemetry for drivetrain inputs, calculated wheel powers, and one mechanism state. During INIT and then while running safely on blocks, predict each value before moving the matching control.

Checks

  • Every label is short enough to scan from the Driver Station under pressure.
  • Each displayed input changes only when its matching control changes.
  • Calculated motor powers agree with the command before the wheels are allowed to move.
  • A teammate can use the display to name whether a fault is in the input, math, or hardware layer.

Lesson check

Check your understanding before moving on.

The robot drifts left when the driver pushes straight forward. What do you check first?

What makes a telemetry label useful during a match?

0 of 2 answered

References

FTC DocsOfficial FTC SDK and robot programming documentation.Road Runner 1.0 DocsCurrent official setup guide. Confirm TeamCode's Gradle versions first; 1.0 is not compatible with 0.5.x examples.

Finished reading?

Mark this lesson complete — “Code Review for Robot Programmers” is up next.

Git Workflow for FTC TeamsCode Review for Robot Programmers