What is programming?
I get all kinds of answers to that question.
-
- Programmers make really cool games
- Programmers make the Tesla cars drive without humans
- Programmers can access banks and infrastructure like nuclear power plants
I never get: Programmers make checklists for computers to follow.
But, … that’s what programmers do.
We’re talking about programming robots, and specifically the robot brain, so from this point forward – I’m going to say “robot brain” instead of computer.
Programmers make checklists for the robot brain to follow. The robot brain will monitor its sensors (sources of input about the outside world) and activate or de-activate motors based on those checklists.
Even in driver mode, the driver doesn’t directly control the motors on the robot. The programmer writes code to tell the robot brain what to do when the driver pushes buttons or moves joysticks on the controller. Then the brain tells the motors what to do based on the checklist (program) the programmer gave the robot.
In a way, the robot is always in autonomous mode!
In driver mode, the driver gets to touch the brain’s controller inputs. In “autonomous mode,” the competition template blocks any input from the controller. All of the brain’s awareness of the playing field has to come from other sensors like the bumper, range, color, motor distance encoding, inertial, vision, and the Game Positioning Sensor (GPS) or in the worst case scenario – from timing.
Next post, we’ll look at approaches to making those checklists flexible enough to enable the robot to sense and respond to scoring challenges!