View Single Post
  #9   Spotlight this post!  
Unread 05-02-2016, 06:45
rich2202 rich2202 is online now
Registered User
FRC #2202 (BEAST Robotics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 1,130
rich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond repute
Re: [Vision] Multithreading?

We have it running as a separate program on the Driver Station. We use Network Tables to communicate with the RoboRio. It grabs the same picture that is being displayed on the DS for the driver.

when "picture" is 0, the vision program does nothing.
When "picture" is 1, it starts vision processing, and changes the value to "2" to indicate it is working.
When it is done calculating, it sets "Angle", and "Distance", and changes "picture" back to 0.

On the RoboRio, it waits for "picture" to go back to "0". when it sees that, it takes "Angle" and "Distance" and drives there (using NavX).

Rinse, repeat, until Angle and Distance are close enough to shoot.
Reply With Quote