Vision target

We are planning on using the camera for targeting, but we want to experiment with our 2010 robot instead of rushing into competition blindly sticking it on next year. It would be a lot easier for me to make a smaller vision target than the official measurements, so would the camera code still track a smaller target?

Thanks in advance.

We started out with the target printed on a 8.5"x11" sheet. It tracks it fine as long as you are close enough.

We ended up printing our target full size at kinkos (in black and white) for around $10.

Thank you very much. I’m actually taking a class about manufacturing, and one of the machines cuts out vinyl sticks to a maximum of 2’ wide, so I can get one for free that way.

Yes, it works great.
Team 1578 printed the target on a regular A4 paper and the example code worked great, without any problems.
The only problem you can have is in the distance part of the code.

Good luck, Yaar.

We just made a stencil and spray painted a replica of the goal. That seemed to work well too

We printed off a to-scale one on a plotter. It worked well for testing. I don’t know the actual dimensions of it though.

We printed a bunch of 8.5" by 11" sheets and taped them together to make a full-size target.

We also made a small version (just 8.5" by 11") on cardboard, which was great because we could tape it onto a PVC pipe and have people wave it around for the robot to track. Also, that way the person holding it could be safely out of the way when the robot decided it had found the target and it was time to fire ::safety::.

During competition, we made a target about 1 inch in diameter (a rush job). As long as you hold it close enough, it will see it the same.

It works. We made one on a 1’ x 1’ piece of lexan before going to nationals. At Hartford and New York, we brought a target of full dimensions - it was a nightmare to carry around, and to store.

I really wish we’d thought of making the smaller one earlier :x

A few notes on the default camera code:

  1. To compensate for the smaller image, you could run the camera at a higher resolution so it can still see it (from a full-field distance the normal target is only a few pixels in the lowest resolution mode, so it won’t see the little one at all.).
  2. It uses a gyro to angle itself based on the vision data. There is some tuning in this that must be done. Since the target blurs when moving, you can only get frames when not moving.
  3. It only ever gets one camera image. You can do a check on the gyro that says something like “when not moving update image and try again” to get closer.
  4. Vision processing takes up a TON of CPU. We weren’t able to do any vision stuff this year (or last) because the timing of the asynchronous loops would be sporadic, and since PID controls use T, if T is not constant then they will freak out (the gyro also uses T but it is handled on the FPGA, not the main processor). If it is not a problem for you, you could send a trigger to the camera to only process when you need the frames. You could do this by having a Occurrence that you trigger when you want the image, which would trigger the camera code, then have another one to trigger the main loop to use the data. Since Occurrences are triggers, it would be impossible for the camera code to run multiple times on one call as it would be if you passed a Boolean enable bit.

As for the target, we printed an 8 1/2x11 and used it for basic testing of the camera code, then printed a full-size one which we taped first to the wall in the hallway then to the wooden goal when it was built. One of our engineers is in design at Chrysler, so he printed out a big target on paper.

The target can be whatever size you like. In fact, cameras are pretty easy to fool in this respect. Double the distance to the camera, double the size of the target in both X and Y, and the image looks the same. This lets you use a small target as long as you think through the proportions and correct for the distance.

The targets can be printed, painted, or colored with a marker. My personal favorite was to purchase black vinyl from a fabric store, cut the inner and outer circle, and slap it on a white board. It clings, it releases, it folds and goes into a drawer. Full-size cost four dollars. From the left-overs, you can create half or fourth size as well. Be sure to scale the width of the ring.

Greg McKaskle