Line Following using Vision Processing

My first project using vision processing was my line following robot that used the CMUcam to track a line.

I quickly drew up a CAD of what I wanted my robot to look like.

I ended up ditching the original CAD and made a better, smaller version. However, the parts used remained basically the same.

  1. FOUR Pololu 298:1 metal gearmotors
  2. FOUR Pololu motor mounts
  3. FOUR 42mm Pololu tires
  4. TWO L298 motor controllers
  5. ONE Axon microcontroller
  6. ONE CMUcam
  7. ONE white LED spotlight
  8. ONE 6V NiMH battery

Looking around online I was unable to find anyone who had published any code that allowed for communication with the CMUcam. I read the CMUcam manual several times and wrote up my code to talk to the CMUcam. It and a tutorial can be found here:

After a couple of days of research and experimenting, I was able to have the robot track a red object.

At first I decided to mount the camera on a servo and have it pan around so it gets a clear picture of the field:

The servo was not helping much so I removed it and had the camera remain stationary on the robot.

I added some code for the robot to follow a black line and to stop whenever the robot saw red tape on the field:

Vision processing is a lot of fun and allows for some advanced behaviors. Look for more advanced vision processing in my next robot, the Robocup Soccer robot.