Unit 01

The Command Pattern

By 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.

Robotics Programming · members' unit

The Command Pattern is behind a locked door

Units in Robotics Programming are for people taking the course. Getting in takes a link or a key — signing in on its own doesn't do it.

What's in this unit · 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

26 quick checksannotated specimencode exercises

1 Sign in

With your school Google account. This is how your work reaches the gradebook — it doesn't open the unit by itself.

2 Get in

Open the class link your teacher posted — that's the usual way, and it enrolls you on the spot. Or paste an access key if you were handed one.

Or buy it

Reading on your own, with no class? The course can be yours.

A key unlocks this browser and keeps your progress here; signing in keeps it with you across devices. Either way the key itself is only ever checked as a hash. Manage all of this on your account, read what signing in stores, or go back to Robotics Programming.

Sources

  • GA-Moonshots — Artemis, the team base code
  • Seattle Solvers — SolversLib documentation
  • Christopher Alexander, Sara Ishikawa and Murray Silverstein — A Pattern Language: Towns, Buildings, Construction (1977)
  • Kent Beck and Ward Cunningham — Using Pattern Languages for Object-Oriented Programs (OOPSLA 1987)
  • Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides — Design Patterns: Elements of Reusable Object-Oriented Software (1994)
  • Gilmour Academy Competitive Robotics — Software Team course notes — the chapters these standards were harvested from