Advanced Telemetry Feedback for Drivers

Introduction: What is Telemetry?

This page covers advanced telemetry techniques for FTC robots. If you are new to telemetry, start with the Telemetry Logging lesson for an introduction to basic telemetry concepts and usage.

Why Use Advanced Telemetry?

Advanced telemetry lets you provide rich, organized, and actionable feedback to drivers and programmers. It helps with debugging, monitoring robot health, and making real-time decisions during matches. Well-structured telemetry can display warnings, highlight important states, and even help tune mechanisms on the fly.

Grouping and Formatting Telemetry Data

Use clear labels and group related data together. Format values for readability (e.g., use "%.2f" for decimals). Consider using addLine() for section headers or summaries.

Example: Grouped and Formatted Telemetry

telemetry.addLine("=== Drive ===");
telemetry.addData("L", "%.2f", leftDrive.getPower());
telemetry.addData("R", "%.2f", rightDrive.getPower());
telemetry.addLine("=== Arm ===");
telemetry.addData("Position", armMotor.getCurrentPosition());
telemetry.addData("Limit", armAtLimit ? "YES" : "NO");
telemetry.update();

Persistent and Event-Based Telemetry

Use telemetry.log() to display persistent messages (such as warnings or important events) that remain visible for longer. This is useful for debugging or alerting drivers to critical issues.

Example: Persistent Event Logging

if (Math.abs(leftDrive.getPower()) > 0.9) {
    telemetry.log().add("Warning: High left drive power!");
}
if (armAtLimit) {
    telemetry.log().add("Arm at limit!");
}
telemetry.update();

Dynamic Telemetry: Real-Time Feedback and Warnings

Advanced telemetry can provide real-time feedback, such as mode indicators (e.g., slow mode enabled), sensor health, or warnings if a mechanism is stuck. Use conditional logic to highlight important states.

Example: Real-Time Warnings and Mode Indicators

if (slowMode) {
    telemetry.addData("Mode", "SLOW");
}
if (armMotor.getCurrentPosition() > ARM_UPPER_LIMIT) {
    telemetry.addData("Warning", "Arm at upper limit!");
}
if (!sensor.isConnected()) {
    telemetry.addData("Error", "Sensor disconnected!");
}
telemetry.update();

Telemetry for Tuning and Autonomous Debugging

Advanced teams use telemetry to tune PID coefficients, monitor sensor values, and debug autonomous routines. Display setpoints, errors, and control outputs to help with tuning and troubleshooting. For more information on PID tuning, see PID Control.

Example: Telemetry for PID Tuning

telemetry.addData("Target", targetPosition);
telemetry.addData("Current", armMotor.getCurrentPosition());
telemetry.addData("Error", targetPosition - armMotor.getCurrentPosition());
telemetry.addData("Output", pidOutput);
telemetry.update();

Best Practices for Advanced Telemetry

Tips for effective advanced telemetry:

  • Call telemetry.update() once per loop.
  • Use clear, descriptive labels and group related data.
  • Limit the amount of data to avoid clutter.
  • Use telemetry.log() for persistent or event-based messages.
  • Display warnings and errors for critical issues.
  • Use telemetry to help with tuning and debugging.

Practice: Advanced Telemetry Feedback

Try these exercises to master advanced telemetry. Start with the basics and progress to more challenging tasks:

  • Group drive and arm data with clear section headers.
  • Add a persistent warning if a motor power exceeds 90%.
  • Display a real-time mode indicator (e.g., slow mode).
  • Show a warning if a sensor is disconnected or returns an error value.
  • Display PID setpoint, current value, error, and output for a mechanism.
  • (Challenge) Create a telemetry dashboard that updates only the most important values and uses color or formatting to highlight warnings.

Related Topics and Documentation

Open full interactive app