View Single Post
  #12   Spotlight this post!  
Unread 05-01-2014, 12:41
topgun's Avatar
topgun topgun is offline
Registered User
FRC #2846 (FireBears)
Team Role: Mentor
 
Join Date: Oct 2008
Rookie Year: 2008
Location: Minnesota
Posts: 229
topgun has a brilliant futuretopgun has a brilliant futuretopgun has a brilliant futuretopgun has a brilliant futuretopgun has a brilliant futuretopgun has a brilliant futuretopgun has a brilliant futuretopgun has a brilliant futuretopgun has a brilliant futuretopgun has a brilliant futuretopgun has a brilliant future
Re: Vision Targeting for Aerial Assist 2014

Quote:
Originally Posted by faust1706 View Post
I"m going to finish it as soon as I can so I can then outsource the code. If you do a cascade on the object, then you can calculate distance via sterio or depth. You can "measure" the distance traveled between 2 frames for this ball or robot, along with the distance on screen. Size you can assume that the robot's frame dimensions will be almost identical for every robot (or you could save that robot's dimensions when doing a cascade of them), you can measure the velocities in the other two, then use simply add all 3 and now you know it's velocity. Then you know how fast you are going to roll the ball at them, so you do a vector problem. This does assume that they will continue their speed.

The ball is a fairly easy. You already know how big the ball is (therefore its diameter). You could simply use the area of the ball to calculate how far away it is. It would take some testing, but it is very doable. Then the same math applies to the previous example.
If you didn't outsource the code before Kickoff you are to late and you can't use it on your 2014 robot:
R13 ROBOT elements created before Kickoff are not permitted. ROBOT elements, including software, that are designed before Kickoff are not permitted, unless they or their source files are publicly available prior to Kickoff.
I hope that you did outsource it before Kickoff as I am interested in seeing your techniques as a learning tool for my team's programmers. Please include a publicly available link to your source code.
__________________
-T