View Single Post
  #2   Spotlight this post!  
Unread 26-02-2012, 21:31
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Controlling motors using vision processing help

The output of the rectangular target processing is between -1 and 1. You should be able to scale this a bit and build a proportional controller pretty easy. If you do nothing else, you can send the value to the motor, or perhaps the negative of the value.

Another important element is to select which target you are aiming at and keep it consistent.

Finally, you may find that the camera is not a very quick sensor. It is great for deciding how much to rotate, not so great to close a control loop with. You may find that using a pot or encoder may be even better way to go once you know how much to rotate.

Greg McKaskle
Reply With Quote