TeleOp // Student lesson

Tele-Learn-MecanumDrive

Mecanum Drive

Trace Tele-Learn-MecanumDrive from signed joystick inputs to four normalized motor commands. This lesson uses Start.blk, not a sensor-guarded replacement; it has no wall or vision stop. Read and calculate first. Any physical trial requires a separate supervisor review, secure support, and Driver Station STOP access.

The opening comment mentions left-motor reversal, but the actual setup reverses both left motors AND back-right. BRAKE is zero-power behavior, not a position lock. The enabled source flag is not approval to run this mounting-specific sample.

Start with a question

How can three requests, each no larger than 1, combine to demand more than one wheel can accept?

By the end, you can…

  • Translate joystick signs into forward, strafe, and turn requests.
  • Calculate a common normalization denominator without amplifying small inputs.
  • Predict all four mecanum powers and the effect of the held slow-mode bumper.
  • Distinguish commanded power, telemetry, physical speed, and stopping behavior.

Before running: Ask your supervisor first. Keep Driver Station STOP ready.

Read · predict · explain

Build the idea, one block at a time

Read these steps before exploring the full program. The numbered blue comments in the diagram link back to the matching step.

01Read all four directions, not just the comment

Actual Blocks for this section
Blocks for Read all four directions, not just the comment
Blocks to notice
  • set Direction
  • set ZeroPowerBehavior BRAKE
  • set Mode RUN_WITHOUT_ENCODER
  • set Power 0

The actual Blocks set front-left, back-left, and back-right REVERSE; front-right is FORWARD. Mirrored mounting motivates direction correction, but these settings need physical verification for this robot. All four use BRAKE and RUN_WITHOUT_ENCODER, then receive zero. BRAKE resists motion at zero; it does not actively hold an encoder position or guarantee no coast.

For example: Copying only 'reverse the left motors' misses the back-right setting. Equal positive commands are intended to produce shared forward motion only with the matching mounting and wiring.

Think first

Does RUN_WITHOUT_ENCODER make +0.25 an exact wheel speed?

Show Answer

No. It is a power request; battery, load, friction, and mounting affect actual movement.

02Separate initialization from active driving

Actual Blocks for this section
Blocks for Separate initialization from active driving
Blocks to notice
  • telemetry READY
  • waitForStart
  • while opModeIsActive

Setup and zero commands occur before waitForStart. That block waits for Driver Station START; joystick mixing lives inside the later active loop. The READY display is information, not permission from a safety system. This sample does not have a repeated sensor-preview INIT loop.

For example: A nonzero joystick during waitForStart is not yet processed by the drive loop, but START can immediately make that held request active.

Think first

Is it safe to leave a joystick held just because INIT requested zero?

Show Answer

No. Release controls before START; the active loop will read current stick positions.

03Give each joystick axis a signed job

Actual Blocks for this section
Blocks for Give each joystick axis a signed job
Blocks to notice
  • get LeftStickY
  • negate
  • get LeftStickX
  • get RightStickX
  • set speed 1

forward = -LeftStickY, strafe = LeftStickX, and turn = RightStickX. A pushed-up left stick reports negative Y, so negation makes forward positive. Positive strafe requests right; negative requests left. The loop resets speed to 1 each time before checking the bumper.

For example: LeftStickY = -0.60, LeftStickX = -0.20, RightStickX = +0.10 become forward +0.60, strafe -0.20, turn +0.10.

Think first

What forward value comes from pulling LeftStickY to +0.40?

Show Answer

forward = -0.40, a backward request.

04Scale while the bumper is held

Actual Blocks for this section
Blocks for Scale while the bumper is held
Blocks to notice
  • if LeftBumper
  • set speed 0.35
  • multiply speed

Holding LEFT BUMPER changes speed from 1 to 0.35 for this loop. Every wheel gets the same final multiplier, preserving the normalized command ratios. This is a held control, not a toggle, and it applies to turns as well as translation. A 35% command scale is not a guarantee of 35% measured speed.

For example: A normalized wheel request of -0.80 becomes -0.28 while the bumper is held, then -0.80 after release if the sticks have not changed.

Think first

Does releasing the bumper keep slow mode latched?

Show Answer

No. The next loop resets speed to 1 unless the bumper is held again.

05Measure combined demand without sign cancellation

Actual Blocks for this section
Blocks for Measure combined demand without sign cancellation
Blocks to notice
  • ABS forward
  • ABS strafe
  • ABS turn
  • add
  • set denominator

The source adds |forward| + |strafe| + |turn|. Absolute values count each demand's magnitude; opposite signs must not cancel in this bound. A wheel numerator is a sum of signed requests, so this magnitude sum bounds every wheel's possible absolute demand.

For example: forward = 0.60, strafe = -0.60, turn = 0.20 give denominator 1.40, not the signed sum 0.20.

Think first

For forward = 1, strafe = 1, turn = 0, what demand must the denominator account for?

Show Answer

2: the front-left and back-right numerators can reach +2 before division.

06Never divide small requests by a small bound

Actual Blocks for this section
Blocks for Never divide small requests by a small bound
Blocks to notice
  • if denominator < 1
  • set denominator 1
  • divide wheel numerator

Replace any denominator below 1 with 1. This prevents division by zero at neutral sticks and prevents a small request from being amplified. Larger combined demands use their original sum so all wheels shrink together rather than being clipped independently.

For example: With forward 0.20 and other inputs zero, the raw sum is 0.20 but the final denominator is 1; each wheel stays at 0.20 before speed scaling.

Think first

What denominator is used when all three inputs are zero?

Show Answer

1, yielding zero wheel powers without dividing by zero.

07Mix the signs for each wheel

Actual Blocks for this section
Blocks for Mix the signs for each wheel
Blocks to notice
  • FL = forward + strafe + turn
  • FR = forward - strafe - turn
  • BL = forward - strafe + turn
  • BR = forward + strafe - turn

Each numerator is divided by the same denominator and multiplied by speed. Positive strafe adds to front-left/back-right and subtracts from front-right/back-left; positive turn adds on the left and subtracts on the right. Roller placement plus verified motor directions turns these patterns into chassis motion. No sensor guard modifies these powers.

For example: forward = 1, strafe = 1, turn = 0, speed = 1 give FL 1, FR 0, BL 0, BR 1 after dividing by 2. With slow mode, FL and BR become 0.35.

Think first

For pure positive strafe 0.50 with no bumper, what are FL, FR, BL, BR?

Show Answer

+0.50, -0.50, -0.50, +0.50, in that order.

08Compare inputs with the final command

Actual Blocks for this section
Blocks for Compare inputs with the final command
Blocks to notice
  • telemetry addData
  • get motor Power
  • button displays
  • telemetry update

Telemetry reports forward, strafe, turn, speed scale, and each motor's Power property, plus raw button states. Motor Power here is the requested value, not measured RPM or a distance. update sends the display; it does not add obstacle protection. Displayed Start/Back/A/B/X/Y buttons have no drive-stop branch in this sample.

For example: Joystick forward can read 1 while FL motor power reads 0.35 because the bumper changed the final scale.

Think first

If telemetry says FL power 0.35, does it prove that wheel is rotating?

Show Answer

No. It proves a command value, not physical motion; a stall or wiring problem can still exist.

09Clear every motor on exit

Actual Blocks for this section
Blocks for Clear every motor on exit
Blocks to notice
  • opModeIsActive
  • set four motor powers 0

When the active loop ends, the final chain explicitly requests zero from all four motors. Driver Station STOP ends the OpMode; a displayed gamepad button is not a substitute. Zero command and BRAKE cannot guarantee instantaneous physical stopping, and a software exit chain is not an independent hardware emergency stop.

For example: An earlier diagonal request left FL and BR powered. Exit must clear those outputs as well as FR and BL.

Think first

Would zeroing only the front motors completely clear the previous drive request?

Show Answer

No. Back-left and back-right also need zero.

Try it without a robot

Make the math make sense

forward = -LeftStickY; strafe = LeftStickX; turn = RightStickX
Preserve the signed requests; only the controller's forward/back Y is negated.
D = max(1, |forward| + |strafe| + |turn|)
Use one bound for all wheels; do not amplify small requests.
FL = s*(f+x+r)/D; FR = s*(f-x-r)/D; BL = s*(f-x+r)/D; BR = s*(f+x-r)/D
Here f is forward, x is strafe, r is turn, and s is 1 or held-bumper 0.35. These are power commands, not distances.

Use a notebook or talk through your answer with a partner. You do not need a robot to predict what these blocks will do.

1. Trace a mixed command

On paper use LeftStickY -0.60, LeftStickX -0.20, RightStickX +0.10. Calculate forward, strafe, turn, D, and FL/FR/BL/BR at speed 1 and 0.35. Which signs change when the bumper is pressed?

2. Compare common normalization with clipping

Use forward 1, strafe 0.50, turn 0.50. Calculate the four raw numerators and normalized powers. Compare with independently clipping each raw numerator to [-1,1]. Explain why the ratios differ.

3. Separate request from evidence

Make columns for INIT, START with neutral sticks, pure right strafe, bumper-held strafe, and STOP. Write requested powers and the observations you would need to verify movement. Explain why telemetry alone cannot certify a safe robot.

Full commented Blocks program

One source program, in one column. Calls connect any named helper routines; they are not separate programs. Click a numbered blue comment to return to its explanation.

100%

Ask your supervisor before importing or running these Blocks. Viewing the program does not control the robot.

Section in context

Full Blocks program

The highlighted Blocks belong to this section. You can select another blue comment.

Check your understanding

Your turn

Choose an answer, then check your thinking. You can change an answer and try again.

Your answers stay on this page and reset when you reload. No cookies, account, or saved answers.

0 / 6 correct · 0 / 6 answered

0
0
Question 1LeftStickY is -0.70 and the other stick axes are zero. What forward command is calculated?

Question 2forward = 0.20, strafe = 0, turn = 0. Which denominator and normal-mode wheel power are used?

Question 3forward = 1, strafe = 1, turn = 0, with LEFT BUMPER held. What are FL, FR, BL, BR?

Question 4Which direction detail is in the actual Start Blocks but omitted by a left-motors-only summary?

Question 5The bumper is released while unchanged sticks request motion. What happens next loop?

Question 6Does Start.blk automatically stop a right strafe at a wall 12 inches away?

Reset clears every choice, explanation, and score.

For supervisors: 60-minute teaching plan & robot setup

Before the robot is used

Safety: This is a read-and-calculate lesson first. Enabled metadata does not authorize operation. For a separately approved demonstration, support the robot with all wheels clear, exclude hands and loose items, use an operator and a supervisor at Driver Station STOP, and stop promptly for unexpected direction or a stall. There is no wall guard. BRAKE does not eliminate coast; isolate power before touching the drivetrain.

Required hardware & dependencies

  • Four mecanum drive motors named front_left_drive, front_right_drive, back_left_drive, and back_right_drive; verify each configured name against its physical cable and wheel.
  • FTC Robot Controller, Driver Station, secure battery, and a notebook. Motor direction settings are specific to the source and mounting, not universal wiring instructions.
  • Paired gamepad with verified left-stick axes, right-stick X, and LeftBumper. Stable wheels-clear support for any separately approved demonstration.

Source identity remains Start.blk. It uses native FTC Blocks and the four exact drive-device names; no helper ZIP is supplied or implied. Review motor mounting, directions, controller mapping, and an approved wheels-clear test plan before any operation. This migration does not deploy or change a robot.

Robot setup checklist

  1. Review Start.blk in the FTC Blocks editor without treating import as deployment. Resolve the four native motor devices; no separate MyBlocks helper is claimed.
  2. Compare each actual direction: FL REVERSE, BL REVERSE, FR FORWARD, BR REVERSE. Check mecanum roller orientation and physical cable labels before authorizing a bench test.
  3. Confirm RUN_WITHOUT_ENCODER, BRAKE, zero setup powers, neutral controls, and STOP access. Do not expect wall sensors or gamepad face buttons to stop this sample.

60-minute teaching sequence

  1. 0-10 min

    Predict signs from joystick positions and compare the setup comment with all four Blocks.

    Look for: Students notice the back-right reversal and distinguish BRAKE from a position hold.

  2. 10-25 min

    Compute denominators for neutral, small, diagonal, and mixed inputs.

    Look for: Absolute magnitudes do not cancel; small inputs use D = 1.

  3. 25-40 min

    Trace wheel signs and repeat one calculation with the held bumper.

    Look for: All four powers share the same denominator and scale.

  4. 40-60 min

    Compare a paper telemetry table with the quiz and discuss a separately approved bench observation.

    Look for: Requested power is not measured motion, and STOP clears all four outputs.

Observation notebook

Notebook: inputs, calculated commands, and separate physical evidence
Conditionf / strafe / turnD / speedFL / FR / BL / BREvidence or question
Small forward0.20 / 0 / 01 / 10.20 / 0.20 / 0.20 / 0.20Power request, not RPM
Diagonal, bumper1 / 1 / 02 / 0.350.35 / 0 / 0 / 0.35Why do two wheels receive zero?
ExitNot usedNot used0 / 0 / 0 / 0Record coast only in an approved demonstration

Use paper traces unless a supervisor has separately approved hardware activity. Label motor Power readings as commands and physical movement as observations.

Troubleshooting · stop before investigating

A wheel appears to oppose the other wheels.
STOP; review the exact four direction settings, motor mapping, and roller orientation. Do not compensate with an invented mix before checking hardware.
Tiny stick movement predicts full power.
Inspect the denominator < 1 branch; D must become 1 rather than the small magnitude sum.
A wall does not change the command.
That matches this source: no wall sensor is read. Do not enable a separate study and assume it guards Start.
Power telemetry is nonzero but the wheel does not move.
STOP and isolate power before inspecting wiring or a stall. A power property is not an encoder or motion measurement.

Exit ticket & assessment

  1. Calculate pure positive strafe at 0.50.
  2. Explain why D cannot be 0.20 for a 0.20 forward request.
  3. Name the absent safety feature and the correct control for ending the OpMode.

Assessment: Require correct signs, a common denominator, held-bumper behavior, and a command-versus-motion explanation. Safety understanding includes no wall guard and all-four zero cleanup; correct arithmetic alone is not a pass.

Extension challenge: On paper compare common normalization and independent clipping for one mixed input. Propose a hardware-verification checklist without editing or deploying robot code.

Teacher key · discuss after students predict

Mixed-input practice

f = 0.60, strafe = -0.20, turn = 0.10; D = 1. Powers are 0.50, 0.70, 0.90, 0.30. At 0.35 they are 0.175, 0.245, 0.315, 0.105; signs do not change.

Normalization versus clipping

For 1,0.50,0.50, raw powers are 2,0,1,1. D = 2 gives 1,0,0.50,0.50. Independent clipping gives 1,0,1,1 and changes the ratios.

Safety and source fidelity

Back-right REVERSE is an actual setting. RUN_WITHOUT_ENCODER is direct power control; BRAKE is not a hold guarantee. Start contains no sensor guard.