View Single Post
  #1   Spotlight this post!  
Unread 09-02-2010, 14:01
Mike Soukup's Avatar
Mike Soukup Mike Soukup is offline
Software guy
FRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1996
Location: Schaumburg, IL
Posts: 797
Mike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond repute
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.
Reply With Quote