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 Profiling3/3
  • 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 Control
  • Driver Control
13 · Autonomous Build
  • Simple Autonomous
14 · Debugging
  • Debugging with Telemetry

07 / Motion Profiling

Testing Profiles and Failure Modes

Tune profiled control safely and diagnose overshoot, lag, and saturation.

60 minAdvancedMotion Profiling

You will

  1. 01Identify overshoot, lag, and output saturation.
  2. 02Tune velocity and acceleration limits before aggressive PID.
  3. 03Add emergency stops and safe targets.

Why Testing Profiles and Failure Modes matters

This lesson is about planning motion before controlling it. A profile turns a sudden target jump into a time-based path of positions, velocities, and accelerations that a controller can follow more gently.

Starting point

Profile constraints are tuning constants too

If the requested profile is too aggressive, PID will saturate and the mechanism will lag. Sometimes the right fix is lower max velocity or acceleration, not more proportional gain.

Safety belongs in the test plan

A profiled arm or lift can still hit hard stops if constants or units are wrong. Test small moves first, clamp outputs, and keep a driver-controlled disable path.

Build path

Draw the motion first, then code it. Students should label acceleration, cruise, deceleration, total time, and target position before implementing a profiled mechanism. The code should regenerate the profile only when the target changes, then follow the current profile state each loop.

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.

ProfileTelemetry.java · Java

telemetry.addData("profile x", state.x);
telemetry.addData("profile v", state.v);
telemetry.addData("actual", lift.getCurrentPosition());
telemetry.addData("error", state.x - lift.getCurrentPosition());
telemetry.addData("output", output);
telemetry.addData("saturated", Math.abs(output) >= 1.0);

Debugging and failure modes

Profiled systems fail when the requested motion is physically unrealistic or when the profile is restarted every loop. Saturated output, growing error, overshoot, and late arrival all point to different fixes. The lesson should make students name the failure mode before touching constants.

Practice

Run three target moves: small, medium, and full range. Record whether the mechanism overshoots, lags, or saturates.

Checks

  • Small moves are tuned before full-range moves.
  • Saturation is visible in telemetry.
  • There is a tested emergency stop path.

Check your understanding

Module check

If output is saturated for most of the move, what should you consider first?

0 of 1 answered

References

Game Manual 0Community FTC programming, control, and robot design reference.FTC DashboardTelemetry, config variables, and tuning support.

Finished reading?

Mark this lesson complete.

You'll move on to “VisionPortal Camera Setup” next.

Implementing a Profiled MechanismVisionPortal Camera Setup