Go to Post I always say find what works best for your team, for your given situation. Why should we rely on someone else to tell me what will work best for our situation? - JVN [more]
Home
Go Back   Chief Delphi > Technical > Programming
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 19-04-2016, 16:47
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,064
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: Angle Calculation from image of goal

Quote:
Originally Posted by pipsqueaker View Post
Could you elaborate more on what trig you'd need to use? I've been wondering about this, and it seems to me that the angle the camera is mounted at should only affect the y coordinate, and since the angle calculation only takes x coordinates the mount angle shouldn't affect the result.
I will try to post a more detailed explanation tonight, but for now: it affects both coordinates.

Imagine a camera that is looking straight up. What does the x coordinate mean with respect to the robot? What does the y coordinate mean?
Reply With Quote
  #2   Spotlight this post!  
Unread 19-04-2016, 22:53
Camilo86's Avatar
Camilo86 Camilo86 is offline
Registered User
AKA: camilo
FRC #0125 (Nutrons)
Team Role: Programmer
 
Join Date: Jun 2013
Rookie Year: 2012
Location: Boston
Posts: 21
Camilo86 is a glorious beacon of lightCamilo86 is a glorious beacon of lightCamilo86 is a glorious beacon of lightCamilo86 is a glorious beacon of lightCamilo86 is a glorious beacon of lightCamilo86 is a glorious beacon of light
Re: Angle Calculation from image of goal

We actually took the time to do the trig out for the offset. You can take a look at our function https://github.com/FRC125/NU16/blob/...lator.java#L31 you will just need to now the fov, dimensions of image, height of camera, x,y offset of camera in inches and angle of the camera.

Your offset basically changes based on the distance to the target. You use the y coordinate of the target to calculate this distance.
__________________
Hopper finalist 2015
Dean's List winner 2015
Reply With Quote
  #3   Spotlight this post!  
Unread 21-04-2016, 20:04
cjl2625's Avatar
cjl2625 cjl2625 is offline
apel py
AKA: Cory Lynch
FRC #2067 (Apple Pi)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Guilford, CT
Posts: 412
cjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to beholdcjl2625 is a splendid one to behold
Re: Angle Calculation from image of goal

Quote:
Originally Posted by Rflax40 View Post
Basically it is giving out smaller angles than it should right now. Would the camera being offset ~2 inches from our center of rotation be enough to cause these issues?
Our camera is offset ~5" from the shooter wheel and we don't have that problem. If you're using a calculation that uses the camera's field of view, try increasing the value for the field of view until you get angles that look better. (that's what I did, anyway)

The horizontal field of view that you'd find on the camera's data sheet doesn't always agree perfectly with the observed results; it might take a bit of experimental tweaking.
__________________
Head Programmer / Driver
Reply With Quote
  #4   Spotlight this post!  
Unread 21-04-2016, 20:08
Rflax40's Avatar
Rflax40 Rflax40 is offline
Registered User
AKA: Ross Flaxman
FRC #1124 (UberBots)
Team Role: Mechanical
 
Join Date: Jan 2015
Rookie Year: 2011
Location: Avon, CT
Posts: 6
Rflax40 has a spectacular aura aboutRflax40 has a spectacular aura about
Re: Angle Calculation from image of goal

Quote:
Originally Posted by Jared Russell View Post
I will try to post a more detailed explanation tonight, but for now: it affects both coordinates.

Imagine a camera that is looking straight up. What does the x coordinate mean with respect to the robot? What does the y coordinate mean?
I'm not sure this holds true when working with a "flat" image, we just tried rotating the camera and it did not change the x value of the target
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 08:53.

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