Line following is a great introduction to robot programming, and it makes a great contest: it’s easy to build a line-following course, the rules are simple to understand, and it’s not hard to program a robot to follow a line. Optimizing your program to make your robot zoom down the line at the highest speed possible, however, is a challenge that can introduce you to some advanced programming concepts.
When you’re ready for a more difficult task, build a line maze for your robot to solve. You can start by solving the maze with a simple “left hand on the wall” strategy and move up to more and more advanced techniques to make your robot faster.
In this tutorial, we’ll show you how to build a good-looking line following course and a line maze, step by step. The materials you’ll need (posterboard and electrical tape) are easy to find and should cost you under $10.
Suggested line following contest rules:
The contest is a single-elimination tournament in which two robots race against each other at a time, on two separate courses that are mirror images of each other. In each match of the contest, a robot races once on each course, and the robot with the best time (out of both races) is declared the winner of the match. A starting line must be marked on each course, in a way that will not interfere with the robots’ sensors. For example, the boundary between two segments of the course could be used. Two timers are used to time each robot for three laps.
A race proceeds as follows:
The robots must follow the line for the entire race. If there is ever a point in time when some part of the robot is not over the line, or if the robot skips a section of the course, it is disqualified for that race.
Suggested line maze contest rules:
Each robot makes four timed attempts to solve the maze, and the best time out of all attempts wins. The idea is that the first attempt is for learning the maze, and the robot remembers the path that it learns for subsequent attempts.
The robot may not be given advance knowledge about the details of the maze (such as whether it is better to follow a left-turning or right-turning strategy). However, the operator of a robot may clear its memory if he suspects the course was learned incorrectly, or adjust parameters like the speed to try to get the best possible time.
As in the line following contest, the robot is required to stay on the line at all times and may not take shortcuts.