Skip to content
CrocoDocs
Starter GuideProgrammingEngineeringDesignPortfolio
Documentation

Introduction

IntroductionBIOBUZZ game overview

Getting started

Getting startedBlocksOnBot JavaAndroid StudioYour first OpModeJava basicsMotors and servosNonblocking codeDebugging robot code

Control systems

Control systemsJoystick mappingField-centric mecanum drivePID controlFeedforwardFlywheel velocity controlSystem identificationMotion profilingKalman filterLow-pass filter

Autonomous

AutonomousTimed and encoder movementOdometryLocalization troubleshootingMotion planningReliable autonomous sequencesPure PursuitSensor fusionAuto to TeleOp handoff

Season topics

Season topicsProjectile mathematicsTurret aimingShooting on the move

Code practices

Code practicesNaming conventionsCode organizationLoop timing and bulk readsFormattingComments and documentationTeam collaboration

Libraries

LibrariesNextFTCFTCLibSolversLibPedro PathingRoad RunnerFTC DashboardMercurial v2Mercurial v1PanelsSloth

Community software

Community softwareBlaze FTCOpenLoopHive Vision

Sensors and vision

Vision overviewVision basicsLimelight 3A
Starter Guide
Engineering
Design
Portfolio
Appearance

Control systems

Learn how commands, sensors, and feedback affect robot motion

Motor commands

A control system turns a goal into a action. For example, pushing a gamepad stick gives the a command. Asking an arm to hold a position gives its a target.

Check whether the program measures the motion produced by its command.

Open-loop control sends a command to a motor. Closed-loop control also reads a sensor and uses that measurement to adjust the next command.

Open-loop control

Suppose your code sets an arm motor to 0.3 power for half a second. The program has sent a command, but it has not measured the arm's final position. Battery , friction, or an added game piece can change where it stops.

Open-loop control is a good first step for learning motor direction and power. It can also work when exact position is unimportant. Test it at low power before using it on a .

Closed-loop control

Now suppose the arm has an . Your code compares the target position with the measured position and changes motor power based on the difference. That difference is called the error.

If the arm is…The controller can…
Below its targetMove it upward
Above its targetMove it downward
Near its targetReduce power or hold position

Feedback helps a robot correct for changing conditions, but it needs a trustworthy measurement and careful tuning. A reading alone does not make an action accurate.

Learning order

  1. Joystick mapping: turn driver input into motor commands.
  2. PID control: use error to correct a motor or mechanism.
  3. Motion profiling: choose smoother target motion.
  4. Low-pass filtering: reduce noise in a measurement.
  5. Kalman filtering: combine predictions and measurements when simpler filters are not enough.

You do not need to master every technique at once. Begin with one motor and one measurement; add complexity only after you can observe what the robot is doing.

For gravity-loaded mechanisms, continue from to Feedforward.

For a drivetrain, Field-centric drive connects driver input to a heading measurement. For a shooter, Flywheel velocity control covers encoder units, controller choice, and measured recovery before feeding.

Once the mechanism's measurements and limits are reliable, system identification explains how to fit and validate a voltage model from test data. Keep the resulting units and hardware configuration with the coefficients.

Sources

  • CTRL ALT FTC: Control theory (concepts and pseudocode)
  • Tyler Veness: Controls Engineering in FRC — deeper control theory; FRC-specific APIs need a separate FTC implementation.
  • The Dairy Cookbook — community recipes; check their measurements, lifecycle, and version assumptions before adapting code.

Debugging robot code

Separate build, configuration, runtime, and behavior failures with evidence

Joystick mapping

Turn gamepad input into simple, testable motor commands

On this page

Motor commandsOpen-loop controlClosed-loop controlLearning orderSources