Supplementary tutoring for the robotics team

Get in the game

This is extra help beside the team, not another class. It shows you what is going on inside the robot from the ground up: how its code is put together, why it is built that way, and how to change it without breaking it. The more of it you understand, the more you can do at meetings and on the field.

Curriculum

Units

01lockedThe Command PatternBy the end of this unit you can say why a robot that waits in a loop can do nothing else, turn that loop into a command, and say what a command owns that the rest of the robot does not.Inside · 12 min read
  1. A problem with a name
  2. A robot that can only do one thing
  3. Ask again instead of waiting
  4. What a command owns
  5. One file per behavior
  6. Practice in a simulator
20 quick checksannotated specimencode exercises
02lockedWriting a CommandBy the end of this unit you can write each part of a command, say why each line lives where it does, and commit a movement command that gives up safely when it gets stuck.Inside · 19 min read
  1. Somewhere to put your own code
  2. Getting code onto the actual robot
  3. One real command, all the way through
  4. The constructor: what never changes
  5. initialize(): what depends on the moment
  6. execute(): a little work, then return
  7. and 4 more
30 quick checksannotated specimensteppercode exercises
03lockedSubsystems and HardwareBy the end of this unit you can write a subsystem that claims its own hardware, read a sensor into something a command can use, and give every number the one home it needs.Inside · 13 min read
  1. The part of the robot that stays
  2. One motor, one owner
  3. Name it once
  4. Where a number lives
  5. The dial that did nothing
  6. Reading a sensor
  7. and 3 more
31 quick checkscode exercises
04lockedRunning the RobotBy the end of this unit you can start the robot from either door, bind a button to the behavior it actually means, and compose an autonomous from commands you already wrote.Inside · 13 min read
  1. Two doors, one robot
  2. The command that never finishes
  3. Hands off, it holds
  4. The panic button
  5. One flush, one loop
  6. Three ways to mean “the button”
  7. and 4 more
34 quick checkscode exercises
05lockedAutonomous Navigation with PedroBy the end of this unit you can prove the field frame is right before writing a coordinate, drive a path that hands control back cleanly, and tune the follower in the right order.Inside · 18 min read
  1. Where the robot thinks it is
  2. Radians, always
  3. Which way is zero
  4. Two maps of the same field
  5. The check that needs no robot
  6. Convert once, at the edge
  7. and 11 more
41 quick checksannotated specimencode exercises
06lockedVision: Where Is That?By the end of this unit you can aim a mechanism at a target without blocking the loop, say how far a stale frame throws a tag, and defend leaving vision corrections off until proven.Inside · 17 min read
  1. One subsystem owns the camera
  2. Two jobs, one camera
  3. What a sighting tells you
  4. null means three different things, on purpose
  5. Do not wait for a good reading
  6. Why a sighting is kept on the field
  7. and 13 more
32 quick checkscode exercises
07lockedReading the Library You Depend OnBy the end of this unit you can trace a scheduler you did not write to explain what the robot did, read a library's source against its docs, and put a hook where it is sure to run.Inside · 11 min read
  1. You have been taking its word for it
  2. Whose code is this, actually
  3. One iteration, in the order it really happens
  4. periodic() is not interrupted, because it was never scheduled
  5. A docstring is a claim; the source is the evidence
  6. Which method does what the sentence says
  7. and 3 more
14 quick checkscode exercises
08lockedProcess, the Team, and the SeasonBy the end of this unit you can leave a shared laptop ready for the next person, judge borrowed or generated code against its requirement, and isolate a fault one layer at a time.Inside · 28 min read
  1. The person who sits down next
  2. What a commit message is actually for
  3. Pull before you start
  4. When the build breaks right after a pull
  5. The docs never show your exact case
  6. When the documentation is wrong
  7. and 20 more
69 quick checkscode exercises