Quote:
|
Originally Posted by pickle
Well, we covered the white with some black sheets, and then we did some other stuff to add more dark, and we got 3 values, but it seems that that made things worse, it couldn't track any colors with them.... Before calibration, we used hyper terminal to get the servo to follow green, and after, it wouldn't follow anything. I'm really not liking this camera. I'm just going to assume that treacking green will be the most useful thing, since the vision tetras are green. Otherwise, I'll set up something to get it all working using the manual method suggested earlier. Consider that image obsolete, there is no more glare, and no more black in the image. When we select the red triangle, its the only thing within the threshhold of 25 that gets selected in the image. *shrugs* Same story with green and yellow, however, I know green works, because I got it to track it. So ya
|
I think FIRST chose a special green so make sure you are using it if you are trying to calibrate with the GUI and default RGB values in config.txt. The .txt file also specifies the size of the targets and the green is smaller so you may have better luck if you duplicate the exact size of the smaller green target. I found that you can send commands down "manually" with the GUI and can prove things out by doing the following:
1. Launch GUI. Enter Config menu. Set White balance ON, Auto gain ON, and then hit Update All down on the bottom. Then run the Calibration to make sure you get good numbers. Either adjust lighting and/or alter config.txt to match your colors. You can use white balance on Auto Gain ON for testing but not in competition because they are too slow. These settings let the camera automatically adjust exposure settings for light.
2. Go to the Color menu and hit Track Yellow with the yellow target which is the easiest. You should see it highlighted with a red pixel in the centroid. If so, then try this because it's a good demo:
A. Press STOP and then wait 10 seconds because the GUI hangs. I think there is trouble with the GUIs serial driver if you send commands while the camera is still streaming data. Then go to the Console entry box of the GUI on the top of the screen and type SM 15 to set the servos to autotrack the target. Press SEND to send the command to the camera. My GUI's AutoTrack ain't working and only sends SM 1.
B. Then type TC 100 255 75 255 0 20 <ret> in the console . The Camera should find the Yellow target and servos should track it as you move the target around.
That's how I got it to work in my basement last night with a 3" Yellow triangle on a black sheet mounted about 6 feet away. Now it's off to the school to try things out for real. Keep plugging away at it, you'll get it. There is nothing else to do in autonomous mode.