This is an archived page, Return to the Home Page for the current contest.
[ Home - 2006 Rules - Photo Gallery - Final Results ]

Robotic Shooting Gallery - Reference Design, Software

The real challenge for this contest is the software. The mechanics of the gun are fairly easy to do, it's mostly just bolting together other products.

This is the software that I wrote to test the arena to make sure that the rules, match lengths, etc are realistic. At this point, this software was able to shoot down 30 static targets in just over three minutes (match length's are 5 minutes).

Unfortunately, all the code is in Visual Basic 6. I had code from past projects that controlled servos, and code that used the webcam, so for me it was quickest to merge all that code rather than put my time into figuring all that out in another language. So at the very least this code should give you some ideas about what the basic capabilities of your bot should be.

How it works

  • If there is a white pixel in the center of the image then fire the gun.
    Note that the webcam has an IR filter on it which shows a purpleish image with the IR LED's as bright white points a few pixels across.
  • From the center of the webcam image, search in an outward spiral pattern looking for single white pixels.
  • Move the gun to the closest white pixel.

    Hardware

  • All control is done through servos. The Pololu Serial 8-Servo Controller was selected because it is extremely easy to interface to a computer. It is also affordable at about $26.
  • The gun was disassembled and rewired so that a momentary switch will fire it. That switch was then mounted so that a small servo's arm will hit it when turned.
  • The gun is aimed using two servos.
  • The webcam (Logitech USB Quickcam Zoom) is mounted just above the barrel. It has an IR filter which blocks all visible light so that the targets show up as white circles.
  • Note that the servos can move farther than the physical design of the gun allows. Therefore, the software needs to know the range that it is allowed to move. This is adjusted using the three sliders on the upper left. The rest of the code merely passes in percentages which are then translated to a location within that range. You could also just experiment and hard code the values.

    Files

    software_defconbots_20060709.zip - 27k - Public Domain

    The goal of releasing this reference design is to get people started on a bot easily and with a better idea of what it takes to get a working bot. In the past, build costs skyrocketed easily and outside of our expectations. With this design, you will be able to have a working bot up and running for about the price listed here.

  • Questions? kallahar@kallahar.com