|
Re: Robot Code State starving loops
The vision loop will automatically wait for the next image from the camera, so you don't need to put in a more visible wait. It won't necessarily hurt, but it is redundant since one is inside the Get image.
My point is that if you computer takes 60ms to process the image and you run the camera at 20 or 30fps, you are guaranteed to always have the CPU pegged. You want to find out the capacity and run something below that.
And of course it is also worth coming at this from the other direction. How few images can you process and still be successful? If you process an image every 250ms, can you get the robot into scoring position? Can you aim and score? If the objects are moving, then fast frames are a good thing. Ditto to low latency. But sometimes the Red October approach of "One PING only" makes the most sense.
Greg McKaskle
|