From Maslab 2011
Upon activation, the bot will begin randomly driving around picking up balls with a roller as it drives over them and holds them in a storage area. It will not differentiate between our balls and the opposing team’s balls because it is advantageous to us to have both colors on the other side of the yellow wall. While collecting balls, the robot will watch for yellow walls even though it does not intend to shoot yet. If it sees any, it will attempt to record the location of the wall using a magnetometer (digital compass) and odometry so it may return to face the wall more quickly when the time comes.
As the balls enter, they trip a switch so the robot can keep track of how many balls it’s holding. When it has picked up about 3 balls (exact quantity subject to change), it will switch to searching for a yellow wall to launch the balls over using a flywheel. The robot will look for the distance to the wall with an IR sensor and adjust the flywheel speed to ensure clearing the wall with minimal risk of overshooting. After expending its ammo, the robot will reenter search and gather mode.