|
Re: 2010 FRC camera vision tracking delay, image processing lag
Our experience with the camera code is similar to yours. After playing around with the default tracking code, I realized that it wasn't cut out for driving with simultaneous tracking because of the lag you mentioned. Our solution was as you suggested, to separate the vision processing into its own task. This new task gets a new image from the camera, runs the (slightly modified) ellipse detection code, and writes the results to a global structure. The main robot task reads the results from the global structure as part of its normal loop. It's not really that difficult as long as you remember to protect accesses to the shared memory with a semaphore.
|