View Single Post
  #2   Spotlight this post!  
Unread 10-02-2013, 18:57
Ginto8's Avatar
Ginto8 Ginto8 is offline
Programming Lead
AKA: Joe Doyle
FRC #2729 (Storm)
Team Role: Programmer
 
Join Date: Oct 2010
Rookie Year: 2010
Location: Marlton, NJ
Posts: 174
Ginto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of light
Re: WPILIB Camera Code Implementation HELP

Once you have the locations of the targets' centers, there's a lot of information that can be extracted and used:
  • You can use the horizontal and vertical field-of-view angles to find the relative horizontal and vertical angles of each target
  • You can use these relative angles to determine the setpoints for PID loops controlling the turn/tilt of your shooter -- I'd recommend a gyro for turn feedback and an accelerometer for tilt feedback.
  • The angles, along with the angle and height of your camera and the height of the targets, can be used to determine how far away the target is. This can then be plugged into a look-up table populated by experimental results to choose the best speed.
__________________
I code stuff.
Reply With Quote