top of page
Search

FLL Robot Consistency: How to Make Every Run Repeatable

Nov 12
5 min read

FLL robot consistency comes from controlling everything that can change between runs: where the robot starts, which way it points, where the attachment sits, how charged the battery is, and how the code corrects for small errors. Teams that score the same on run 10 as on run 1 usually aren't using fancier code. They use a launch jig, reset their sensors and attachments the same way every time, add a few checkpoints on the mat, and practice runs as a routine. This guide walks through each of those habits, with a short SPIKE Prime Python routine you can copy.

With FIRST LEGO League tournaments happening across the country this season, this is the moment when a robot that "worked at home" suddenly misses at the table. Here's how to close that gap.

Why the same code gives different results

A robot run is a chain of moves, and every small error carries forward. If the robot starts 1 cm to the left and 2 degrees crooked, that drift grows with every meter it drives. Common sources of variation:

  • Start position and angle in launch area

  • Wheel slip from dusty tires or fast starts

  • An attachment that begins in a slightly different spot

  • Battery level (motors behave differently on a low battery)

  • Table differences: mat wrinkles, wall height, lighting for color sensors

You can't remove all of these, but you can control most of them.

1. Build a launch jig

A jig is a simple LEGO frame that sits against the wall or a mat line in the launch area. The robot slides into it, so it starts in exactly the same place and angle every time. Check the current season's rules for what's allowed in the launch area, and keep the jig light and easy to remove.

  • Touch the jig against two fixed edges (for example, a wall and a line) so it can't rotate

  • Make one jig per run if your starting spots differ, and label them by color

  • Press the robot back into the jig gently before every launch, and don't eyeball it

2. Reset sensors and attachments before every run

The gyro heading and motor positions should start at known values. A reliable trick for attachments is "homing": drive the arm slowly into a hard stop, wait until it stalls, then call that position zero. After that, every arm move goes to an exact position instead of "turn 90 degrees from wherever it happens to be".

Assumptions: SPIKE Prime hub with the SPIKE App's Python, attachment motor on port C, and a physical stop the arm can safely push against. Flip the sign of HOME_SPEED if your arm homes in the other direction, and lower the speed if the arm is fragile. We tested the logic with stubbed hardware functions; test it on your robot at low speed first.

from hub import port, motion_sensor
import motor, runloop

ARM = port.C            # attachment motor
HOME_SPEED = -300       # direction that pushes the arm into its hard stop
STALL_SPEED = 30        # below this |deg/s| we call it stalled

async def home_attachment(timeout_ms=2000):
    # Drive the arm gently into its hard stop, then call that position zero
    motor.run(ARM, HOME_SPEED)
    await runloop.sleep_ms(200)          # give it time to start moving
    elapsed = 200
    while abs(motor.velocity(ARM)) > STALL_SPEED and elapsed < timeout_ms:
        await runloop.sleep_ms(10)
        elapsed += 10
    motor.stop(ARM)
    motor.reset_relative_position(ARM, 0)
    return elapsed < timeout_ms          # False means it never stalled: check the arm

async def start_of_run():
    motion_sensor.reset_yaw(0)           # heading = 0 while robot sits in the jig
    ok = await home_attachment()
    if not ok:
        print("Arm did not home - check for a jam before running")
    return ok

async def main():
    if await start_of_run():
        # same starting state every time: now run the mission code
        await motor.run_to_relative_position(ARM, 90, 400)

runloop.run(main())

If the arm never stalls within two seconds, the routine reports a problem instead of running with a bad zero. That's a good habit in general: when something is off, find out before the run, not halfway across the table.

3. Let the field correct the robot

Even with a perfect start, error builds up. The fix is to re-align on things that don't move:

  • Gyro steering keeps long drives straight. See Drive Straight with a Gyro.

  • Line squaring lines the robot up on a black line mid-run. See FLL Line Squaring.

  • Wall squaring: back gently into a wall so both wheels touch, then drive away

  • Slow down near targets: fast approaches overshoot more

A good rule: after any long drive or several turns, add a checkpoint before precise work.

4. Treat the battery as part of the robot

Many teams see runs change as the battery drains. Charge fully before practice and before the tournament, check the level between rounds, and test your runs at both full and partly charged levels so you know how much they change. Using speed-controlled moves (degrees per second) instead of raw power also helps.

5. Practice runs, not just missions

Consistency is a human skill too. Write a short pre-run checklist and have the drivers say it out loud each time:

  1. Correct attachment on, homed

  2. Robot pressed into the right jig

  3. Program number checked

  4. Hands off until the robot leaves the launch area

Then track results. Run each program 10 times and write down how many succeed. A run that works 6 out of 10 needs more checkpoints, not more missions. For deciding which missions are worth the time, see FLL Robot Game Strategy, and for the big day, our FLL Tournament Checklist.

Common questions

How consistent should our runs be before a tournament?

Aim for most runs succeeding in practice, such as 8 out of 10. If a run is below that, simplify it or add an alignment checkpoint before adding more missions.

Is a jig allowed in FLL?

Teams commonly use launch jigs, but details on what can be in the launch area and when can change by season. Read the current Robot Game Rules and Challenge updates on the official FIRST LEGO League site, and ask your referee if you're unsure.

Should we use the gyro or encoders?

Both. Encoders measure how far the wheels turned; the gyro measures which way the robot points. Use encoders for distance and the gyro for heading, then add line or wall checkpoints for position.

Learn these skills with Fusion Robotics Education

Our free FLL Competition-Ready course and our LEGO SPIKE Prime course cover sensors, Python and reliable robot design step by step. Browse the full course catalog, start free self-paced courses, try All-Access for $39/month with a 7-day free trial, or book Remote 1-on-1 live lessons ($149/month) by texting (619) 786-5731.

In San Diego? Our weekend group sessions in Scripps Ranch are 1.5 hours a week for ages 6–18, with at most 10 kids and every child building their own project at their own pace. Your first session is free: text (619) 786-5731 to book.

 
 
 

Comments


bottom of page