Go to Post I want to wish everyone a Happy Ship Day. - JohnBoucher [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 08-02-2012, 19:24
Ian McShane Ian McShane is offline
Registered User
FRC #3585 (Rogue Robots)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2009
Location: NH
Posts: 141
Ian McShane will become famous soon enoughIan McShane will become famous soon enough
Question Vision tracking

This year our team is trying to use vision tracking to determine our original location on the field. our idea is to use the 3 backboards to somewhat triangulate where EXACTLY (down to maybe an inch) we are on the field so that we could use that information to then shoot baskets autonomously. Does have an ideas as to how to use vision tracking in java. what steps we would have to take as far as writing the code. How to use vision tracking in general, and how vision tracking might relate to what we ar trying to do (a.k.a. what will the code look like as far as classes, subsystems, projects, etc.)


(or if any of this is even possible)
__________________
in FIRST, it's process over product, and team over robot.
http://www.roguerobotsof4h.com/
Team 3585 Rogue Robots of 4-H

Last edited by Ian McShane : 08-02-2012 at 19:33.
Reply With Quote
  #2   Spotlight this post!  
Unread 08-02-2012, 23:19
adf0221 adf0221 is offline
Registered User
FRC #1517 (Lumberjacks)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Bow NH
Posts: 24
adf0221 is an unknown quantity at this point
Re: Vision tracking

for starters there is a very nice sample code that you can upload if you download the newest FRC plugins on netbeans. We used it with great success and our robot tracks squares very nicely. As for finding your position we are calculation the distance by using the camera and trig functions as well as several encoders/gyros to help us find the appropriate angle to shoot. Hope this helps!
Reply With Quote
  #3   Spotlight this post!  
Unread 08-02-2012, 23:58
jesusrambo jesusrambo is offline
Self-Proclaimed Programmer Messiah
AKA: JD Russo
FRC #2035 (Robo Rockin' Bots)
Team Role: Programmer
 
Join Date: Feb 2012
Rookie Year: 2010
Location: Carmel, CA
Posts: 114
jesusrambo is an unknown quantity at this point
The problem with a method like this is as far as I know and as far as we've talked on our team, the only way to really effectively do this would be with reverse skew matrices.

Basically, in graphics, when you're generating an object, say, a square, you want to know how that object will look as the camera moves around it. To calculate this you use something called a "skew matrix" that's basically a mathematical explanation of how the object will distort as you move around it.

Unfortunately, as far as we've found, doing this backwards (what you'd need to determine position given skew of the targets) is far from easy. Hopefully someone has found a better way to do it and will let us all know here.
Reply With Quote
  #4   Spotlight this post!  
Unread 09-02-2012, 03:02
Patrick Chiang Patrick Chiang is offline
Programming
FRC #3070 (Team Pronto)
Team Role: Mentor
 
Join Date: Feb 2009
Rookie Year: 2009
Location: Seattle
Posts: 162
Patrick Chiang is a name known to allPatrick Chiang is a name known to allPatrick Chiang is a name known to allPatrick Chiang is a name known to allPatrick Chiang is a name known to allPatrick Chiang is a name known to all
Re: Vision tracking

Interesting. I haven't done this (robot not yet built. we only have one), but I've been thinking about ways to do this.

If you know the side and top length of the vision tracking box, you can use the known ratio of the side/top to determine the angle at which you are to the baskets. Then, using the side length, you can determine the distance you are to the baskets. Using this information, you pretty much have all you need.

Of course, if your camera height is significantly different from the target height, you'd have to account for that too (the side length will seem slightly less than it actually is)
Reply With Quote
  #5   Spotlight this post!  
Unread 10-02-2012, 00:13
Patrick Chiang Patrick Chiang is offline
Programming
FRC #3070 (Team Pronto)
Team Role: Mentor
 
Join Date: Feb 2009
Rookie Year: 2009
Location: Seattle
Posts: 162
Patrick Chiang is a name known to allPatrick Chiang is a name known to allPatrick Chiang is a name known to allPatrick Chiang is a name known to allPatrick Chiang is a name known to allPatrick Chiang is a name known to all
Re: Vision tracking

Attached is my explanation in pictured form.
Attached Thumbnails
Click image for larger version

Name:	position finder.png
Views:	62
Size:	34.0 KB
ID:	11828  
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:56.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi