|
Re: vision causes mega-lag in main loop
WPILib includes source for a reason, and tinkering with it is of course an OK thing to do, but if your goal is to speed things up, you may want to consider some other approaches. Wire length, tunnels, and even shift registers are not really performance problems in general.
First, you may want to build a simple test framework that would probably be based on one of the camera examples, or perhaps on the default code. Add some panel indicators or some code with outputs you can probe, and then run through different settings. You may want to guide your exploration a bit using the white paper on the NI.com/FIRST site.
One approach is to use the small camera settings, and simply make the vision work better by improving the contrast in the image and figuring out how to limit the false positives.
The other approach is to start with the medium image size and see what parameters allow you to simply get the images fast enough -- hint, raise the compression to about 20 or 25.
And finally, post questions as you go.
Greg McKaskle
|