Go to Post FIRST is different... we commute, journey, and make pilgramage to attend our events. Something that is expensive and exclusive. - Erin Rapacki [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 09-01-2016, 23:57
KyloRen42 KyloRen42 is offline
Registered User
no team
 
Join Date: Jan 2016
Location: Detroit
Posts: 18
KyloRen42 is an unknown quantity at this point
Question How to calculate camera position from retroreflectors



Knowing the size and positions of these reflectors and assuming that the center of the field is (0,0) (or maybe there is one more zero for the camera's z?), how (mathematically) can I take pictures from a camera and calculate the camera's position on the field? Thanks in advance!
  #2   Spotlight this post!  
Unread 10-01-2016, 00:03
cgmv123's Avatar
cgmv123 cgmv123 is offline
FRC RI/FLL Field Manager
AKA: Max Vrany
FRC #1306 (BadgerBOTS)
Team Role: College Student
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Madison, WI
Posts: 2,081
cgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond repute
Re: How to calculate camera position from retroreflectors

Quote:
Originally Posted by KyloRen42 View Post
(or maybe there is one more zero for the camera's z?)
The height of the camera will be constant on most robots.

Quote:
how (mathematically) can I take pictures from a camera and calculate the camera's position on the field? Thanks in advance!
Trigonometry. You have a known length and an angle from the image.
__________________
BadgerBOTS Robotics|@team1306|Facebook: BadgerBOTS
2016 FIRST Championship Tesla Division | 2016 Wisconsin Regional Engineering Inspiration Award

2015 FIRST Championship Carson Division | 2015 Wisconsin Regional Chairman's Award

2013 FIRST Championship Curie Division | 2013 Wisconsin Regional Chairman's Award

2012 FIRST Championship Archimedes Division | 2012 Wisconsin Regional Engineering Inspiration Award, Woodie Flowers Finalist Award (Lead Mentor Ben Senson)

  #3   Spotlight this post!  
Unread 10-01-2016, 00:04
KyloRen42 KyloRen42 is offline
Registered User
no team
 
Join Date: Jan 2016
Location: Detroit
Posts: 18
KyloRen42 is an unknown quantity at this point
Re: How to calculate camera position from retroreflectors

Could you give me a link explaining how I'd do it? I don't have a super strong math background.
  #4   Spotlight this post!  
Unread 10-01-2016, 00:07
cgmv123's Avatar
cgmv123 cgmv123 is offline
FRC RI/FLL Field Manager
AKA: Max Vrany
FRC #1306 (BadgerBOTS)
Team Role: College Student
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Madison, WI
Posts: 2,081
cgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond repute
Re: How to calculate camera position from retroreflectors

length of target/tangent(angle of target in image) = distance to target
__________________
BadgerBOTS Robotics|@team1306|Facebook: BadgerBOTS
2016 FIRST Championship Tesla Division | 2016 Wisconsin Regional Engineering Inspiration Award

2015 FIRST Championship Carson Division | 2015 Wisconsin Regional Chairman's Award

2013 FIRST Championship Curie Division | 2013 Wisconsin Regional Chairman's Award

2012 FIRST Championship Archimedes Division | 2012 Wisconsin Regional Engineering Inspiration Award, Woodie Flowers Finalist Award (Lead Mentor Ben Senson)

  #5   Spotlight this post!  
Unread 10-01-2016, 00:07
plnyyanks's Avatar
plnyyanks plnyyanks is offline
Data wins arguments.
AKA: Phil Lopreiato
FRC #1124 (The ÜberBots), FRC #2900 (The Mighty Penguins)
Team Role: College Student
 
Join Date: Apr 2010
Rookie Year: 2010
Location: NYC/Washington, DC
Posts: 1,114
plnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond repute
Re: How to calculate camera position from retroreflectors

Quote:
Originally Posted by KyloRen42 View Post
Could you give me a link explaining how I'd do it? I don't have a super strong math background.
This thread from 2012 might be a good place to start, specifically this post
__________________
Phil Lopreiato - "It's a hardware problem"
Team 1124 (2010 - 2013), Team 1418 (2014), Team 2900 (2016)
FRC Notebook The Blue Alliance for Android

Last edited by plnyyanks : 10-01-2016 at 00:11.
  #6   Spotlight this post!  
Unread 10-01-2016, 00:09
KyloRen42 KyloRen42 is offline
Registered User
no team
 
Join Date: Jan 2016
Location: Detroit
Posts: 18
KyloRen42 is an unknown quantity at this point
Re: How to calculate camera position from retroreflectors

Quote:
Originally Posted by cgmv123 View Post
length of target/tangent(angle of target in image) = distance to target
But that only gives me distance, how do i determine where I lie on that circle?
  #7   Spotlight this post!  
Unread 10-01-2016, 00:16
Aur0r4's Avatar
Aur0r4 Aur0r4 is offline
Engineering Mentor
AKA: Jim Browne
None #1058 (PVC Pirates)
Team Role: Engineer
 
Join Date: Mar 2005
Rookie Year: 2002
Location: Londonderry, NH
Posts: 65
Aur0r4 has a brilliant futureAur0r4 has a brilliant futureAur0r4 has a brilliant futureAur0r4 has a brilliant futureAur0r4 has a brilliant futureAur0r4 has a brilliant futureAur0r4 has a brilliant futureAur0r4 has a brilliant futureAur0r4 has a brilliant futureAur0r4 has a brilliant futureAur0r4 has a brilliant future
Send a message via AIM to Aur0r4
Re: How to calculate camera position from retroreflectors

Quote:
Originally Posted by KyloRen42 View Post
But that only gives me distance, how do i determine where I lie on that circle?
We took a stab at this exact same situation a few different years, and its actually significantly harder than it sounds. Aside from the actual mathematics of it, the cameras we have access to do not produced a "flat" image. It has spherical distortion that isn't really obvious until you try doing math on different parts of the image. Even high end cameras used for actual aerial survey have this problem....we see it in "orthophotos" that have been corrected to give a reasonably "flat" picture that you can make measurements on. The jagged corrections made to straight line objects like roads gets more and more obvious the farther you get from the center of the frame. Also, parallax and other problems.

We can certainly learn things from the camera image, don't get me wrong.

Definitely rooting you on for trying to figure this out, and I'm definitely not saying its not objectively possible. Its just really, really hard with the equipment and processing power we have.
__________________
Jim Browne, EIT
Team 1058 - PVC Pirates
  #8   Spotlight this post!  
Unread 10-01-2016, 00:19
lethc's Avatar
lethc lethc is offline
#gkccurse
AKA: Becker Lethcoe
FRC #1806 (S.W.A.T.)
Team Role: Alumni
 
Join Date: Nov 2012
Rookie Year: 2013
Location: Smithville, MO
Posts: 119
lethc will become famous soon enough
Re: How to calculate camera position from retroreflectors

Quote:
Originally Posted by cgmv123 View Post
The height of the camera will be constant on most robots.



Trigonometry. You have a known length and an angle from the image.
How does the camera handle multiple targets (If I'm at an angle where two high goals can be seen by the camera at once)?
__________________
2016: Greater Kansas City Regional Finalists, Oklahoma Regional Winners, Tesla Semifinalists, IRI Quarterfinalists
2015: Greater Kansas City Regional Finalists, Oklahoma Regional Winners, Tesla Quarterfinalists, IRI Winners
2014: Central Illinois Regional Quarterfinalists, Greater Kansas City Regional Finalists, Newton Semifinalists
2013: Greater Kansas City Regional Winners, Oklahoma Regional Winners, Galileo Quarterfinalists
  #9   Spotlight this post!  
Unread 10-01-2016, 00:19
KyloRen42 KyloRen42 is offline
Registered User
no team
 
Join Date: Jan 2016
Location: Detroit
Posts: 18
KyloRen42 is an unknown quantity at this point
Re: How to calculate camera position from retroreflectors

Quote:
Originally Posted by Aur0r4 View Post
We took a stab at this exact same situation a few different years, and its actually significantly harder than it sounds. Aside from the actual mathematics of it, the cameras we have access to do not produced a "flat" image. It has spherical distortion that isn't really obvious until you try doing math on different parts of the image. Even high end cameras used for actual aerial survey have this problem....we see it in "orthophotos" that have been corrected to give a reasonably "flat" picture that you can make measurements on. The jagged corrections made to straight line objects like roads gets more and more obvious the farther you get from the center of the frame. Also, parallax and other problems.

We can certainly learn things from the camera image, don't get me wrong.

Definitely rooting you on for trying to figure this out, and I'm definitely not saying its not objectively possible. Its just really, really hard with the equipment and processing power we have.
OK. Is there a way to accurately track our robot's position on the field? We tried using a 6DOF IMU from sparkfun last year and the due to the compressor's vibrations, the readings were so inaccurate they were unusable.
  #10   Spotlight this post!  
Unread 10-01-2016, 00:19
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 989
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: How to calculate camera position from retroreflectors

http://wpilib.screenstepslive.com/s/...ng-the-targets
  #11   Spotlight this post!  
Unread 10-01-2016, 00:22
Aur0r4's Avatar
Aur0r4 Aur0r4 is offline
Engineering Mentor
AKA: Jim Browne
None #1058 (PVC Pirates)
Team Role: Engineer
 
Join Date: Mar 2005
Rookie Year: 2002
Location: Londonderry, NH
Posts: 65
Aur0r4 has a brilliant futureAur0r4 has a brilliant futureAur0r4 has a brilliant futureAur0r4 has a brilliant futureAur0r4 has a brilliant futureAur0r4 has a brilliant futureAur0r4 has a brilliant futureAur0r4 has a brilliant futureAur0r4 has a brilliant futureAur0r4 has a brilliant futureAur0r4 has a brilliant future
Send a message via AIM to Aur0r4
Re: How to calculate camera position from retroreflectors

Quote:
Originally Posted by KyloRen42 View Post
OK. Is there a way to accurately track our robot's position on the field? We tried using a 6DOF IMU from sparkfun last year and the due to the compressor's vibrations, the readings were so inaccurate they were unusable.
That's another issue we ran into....the camera is generally not stable enough for detailed calculations...of course, maybe that was just the mecanum wheels...

That's a very good question. The answer of a how to create a true "FRC GPS" is probably going to be a combination of techniques that might include camera data, inertial guidance data, floor features, range-finders, etc that all can be used to develop a "reasonable" position on the field. But someone's software team is going to have their work cut out for them, that's for sure.
__________________
Jim Browne, EIT
Team 1058 - PVC Pirates
  #12   Spotlight this post!  
Unread 10-01-2016, 00:24
KyloRen42 KyloRen42 is offline
Registered User
no team
 
Join Date: Jan 2016
Location: Detroit
Posts: 18
KyloRen42 is an unknown quantity at this point
Re: How to calculate camera position from retroreflectors

Quote:
Originally Posted by Aur0r4 View Post
That's another issue we ran into....the camera is generally not stable enough for detailed calculations...of course, maybe that was just the mecanum wheels...

That's a very good question. The answer of a how to create a true "FRC GPS" is probably going to be a combination of techniques that might include camera data, inertial guidance data, floor features, range-finders, etc that all can be used to develop a "reasonable" position on the field. But someone's software team is going to have their work cut out for them, that's for sure.
We should suggest for next years game that there be a few devices on the outside of the field that your robot can ping to calculate it's position.
  #13   Spotlight this post!  
Unread 10-01-2016, 00:32
Aur0r4's Avatar
Aur0r4 Aur0r4 is offline
Engineering Mentor
AKA: Jim Browne
None #1058 (PVC Pirates)
Team Role: Engineer
 
Join Date: Mar 2005
Rookie Year: 2002
Location: Londonderry, NH
Posts: 65
Aur0r4 has a brilliant futureAur0r4 has a brilliant futureAur0r4 has a brilliant futureAur0r4 has a brilliant futureAur0r4 has a brilliant futureAur0r4 has a brilliant futureAur0r4 has a brilliant futureAur0r4 has a brilliant futureAur0r4 has a brilliant futureAur0r4 has a brilliant futureAur0r4 has a brilliant future
Send a message via AIM to Aur0r4
Re: How to calculate camera position from retroreflectors

Quote:
Originally Posted by KyloRen42 View Post
We should suggest for next years game that there be a few devices on the outside of the field that your robot can ping to calculate it's position.
Well, that's certainly where things get interesting.... As you said earlier, you know where in a circle you are right now....all you need is one more circle to narrow it down to only two possible locations. I'd be curious to see what kinds of results someone could get with two cameras...one looking at each tower (assuming you can see them). Dunno if the control system infrastructure could support that, but that would get you going in the right direction.
__________________
Jim Browne, EIT
Team 1058 - PVC Pirates
Closed Thread


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 03:21.

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