Go to Post I'm excited. Probably too much, but eh, I'm a big geek. - Brandon Martus [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
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 07-01-2012, 20:28
MysterE's Avatar
MysterE MysterE is online now
FRC Team #3337
AKA: Coach Eiland
FRC #3337 (Panthrobotics)
Team Role: Coach
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Baton Rouge
Posts: 509
MysterE has a reputation beyond reputeMysterE has a reputation beyond reputeMysterE has a reputation beyond reputeMysterE has a reputation beyond reputeMysterE has a reputation beyond reputeMysterE has a reputation beyond reputeMysterE has a reputation beyond reputeMysterE has a reputation beyond reputeMysterE has a reputation beyond reputeMysterE has a reputation beyond reputeMysterE has a reputation beyond repute
Send a message via AIM to MysterE
Question from a Coach

Ok all -

Just of curiosity - is it mathematically feasible to create a shooter than can calculate distance/angle/etc of a shooter and have it accurately make shots? Can it be done or is it simply a pipe dream?

Thanks.
__________________
Coach. D. Eiland
Head Coach - Team #3337
Panthrobotics (Woodlawn HS)
2016: Bayou Regional WFFA Winner
2016: Rocket City Regional Judges Award
2015: Bayou Spirit Award, Bayou Chairman's Award, Bayou Dean's List Finalist (Danielle Massey), Bayou Volunteer of the Year Award
2014: Bayou Dean's List Finalist (Witni Widmeier)
2011: Bayou Regional Winner | Judges Award
2010: Rookie Inspiration Award
Reply With Quote
  #2   Spotlight this post!  
Unread 07-01-2012, 20:29
Andrew Lawrence
 
Posts: n/a
Re: Question from a Coach

It's possible. 100% possible.
Reply With Quote
  #3   Spotlight this post!  
Unread 07-01-2012, 20:31
the man's Avatar
the man the man is offline
Registered User
AKA: Jacob Overla
FRC #4004
Team Role: Mechanical
 
Join Date: Jan 2009
Rookie Year: 2009
Location: muskegon MI
Posts: 344
the man is on a distinguished road
Re: Question from a Coach

I was thinking something along these lines, but the camera would only need to calculate distance. Then adjust a shooter to hit the selected basket at that distance. I have no idea how to do it, that's the programmers problem.
__________________
Every day is a new adventure!!!
Reply With Quote
  #4   Spotlight this post!  
Unread 07-01-2012, 20:38
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,113
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: Question from a Coach

It's entirely feasible. I spent a good part of today discussing with another programmer the best way to implement it - it's just some simple trigonometry in solving the triangle made from your shooter, the alliance wall, and the hoop.
__________________
Phil Lopreiato - "It's a hardware problem"
Team 1124 (2010 - 2013), Team 1418 (2014), Team 2900 (2016)
FRC Notebook The Blue Alliance for Android
Reply With Quote
  #5   Spotlight this post!  
Unread 07-01-2012, 20:39
Silver218's Avatar
Silver218 Silver218 is offline
Registered User
FRC #1827 (Robo-Jackets)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2010
Location: Kansas City, MO
Posts: 5
Silver218 is an unknown quantity at this point
Re: Question from a Coach

Does anybody know if the Kinect camera can be used to locate the reflective tape on the baskets?
Reply With Quote
  #6   Spotlight this post!  
Unread 08-01-2012, 02:29
mesamb1's Avatar
mesamb1 mesamb1 is offline
Registered User
AKA: Sam Bacon
FRC #1466 (Webb Robotics)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2004
Location: Knoxville
Posts: 93
mesamb1 is just really nicemesamb1 is just really nicemesamb1 is just really nicemesamb1 is just really nice
Re: Question from a Coach

Quote:
Originally Posted by Silver218 View Post
Does anybody know if the Kinect camera can be used to locate the reflective tape on the baskets?
Check the other forumns on the Kinect camera on the bot. not wise.

Axis works fantastic. Perhaps FIRST will be nice enough to include a sonar sensor in the kit of parts you could use to....
Reply With Quote
  #7   Spotlight this post!  
Unread 09-01-2012, 08:25
Doug Norman's Avatar
Doug Norman Doug Norman is offline
Registered User
no team (National Instruments)
Team Role: Engineer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Austin, TX
Posts: 134
Doug Norman will become famous soon enoughDoug Norman will become famous soon enough
Re: Question from a Coach

Quote:
Originally Posted by mesamb1 View Post
Perhaps FIRST will be nice enough to include a sonar sensor in the kit of parts you could use to....
There should be a sonar sensor in the kit. I remember writing a new example for it.
__________________
Doug Norman
National Instruments
Reply With Quote
  #8   Spotlight this post!  
Unread 07-01-2012, 20:49
theprgramerdude theprgramerdude is offline
WPI Freshman
AKA: Alex
FRC #2503 (Warrior Robotics)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2008
Location: Brainerd, Minnesota
Posts: 347
theprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud of
Re: Question from a Coach

Quote:
Originally Posted by MysterE View Post
Ok all -

Just of curiosity - is it mathematically feasible to create a shooter than can calculate distance/angle/etc of a shooter and have it accurately make shots? Can it be done or is it simply a pipe dream?

Thanks.
Mathematically, optimistically and practically feasible. As long as the sensor system and filtering done on the sensors is reliable (slight challenge, as an image analyzer sub-routine might take a while to fine-tune), and the shooter mechanism has a low standard deviation in it's behavior (read: reliable in shot taking), it's a piece of cake to code a system that can do a bit of math and calculate the shot trajectory.
__________________
Attending: MN Duluth Regional
Reply With Quote
  #9   Spotlight this post!  
Unread 07-01-2012, 21:08
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Question from a Coach

A white paper is or should be posted on the NI site before too long that explains some approaches to processing images.

There are a number of techniques for calculating distance, but the straightforward one is to use the known width of the target and the information about the camera lens optics. You can find the optics view angle on the Axis web site.

Basically, if a target width is known, camera resolution is known, and lens info is known, you can calculate distance pretty accurately to a target located at any of the heights.

Greg McKaskle
Reply With Quote
  #10   Spotlight this post!  
Unread 09-01-2012, 16:41
BlueNova's Avatar
BlueNova BlueNova is offline
Registered User
FRC #2704 (Order 2 Chaos)
Team Role: Alumni
 
Join Date: Mar 2011
Rookie Year: 2005
Location: Batavia, Illinois
Posts: 13
BlueNova is an unknown quantity at this point
Re: Question from a Coach

Quote:
Originally Posted by Greg McKaskle View Post
A white paper is or should be posted on the NI site before too long that explains some approaches to processing images.

There are a number of techniques for calculating distance, but the straightforward one is to use the known width of the target and the information about the camera lens optics. You can find the optics view angle on the Axis web site.

Basically, if a target width is known, camera resolution is known, and lens info is known, you can calculate distance pretty accurately to a target located at any of the heights.

Greg McKaskle
I currently have a SubVi in Labview that calculates the distance to an object based off its width, and the angles you are viewing its edges.
However, I don't currently understand the stuff about the camera optics.
To get the angle that the camera is viewing the object at, is it an ArcCos function?
(pretty sure ArcCos is the simple name for the inverse function of cosine)
__________________
"We're all nerds here, no need to be socially awkward"
"Oh, you want to know what I would do? I'd make a helicopter."

Once a FIRST Student, ALWAYS a FIRST Student


Last edited by BlueNova : 09-01-2012 at 17:04.
Reply With Quote
  #11   Spotlight this post!  
Unread 09-01-2012, 17:00
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Question from a Coach

If you want to post more information about your approach, I or another mentor should be able to help. Yes, ArcCosine is the Inverse Cosine, but that isn't enough information to say it is the correct function.

Greg McKaskle
Reply With Quote
  #12   Spotlight this post!  
Unread 09-01-2012, 17:30
BlueNova's Avatar
BlueNova BlueNova is offline
Registered User
FRC #2704 (Order 2 Chaos)
Team Role: Alumni
 
Join Date: Mar 2011
Rookie Year: 2005
Location: Batavia, Illinois
Posts: 13
BlueNova is an unknown quantity at this point
Re: Question from a Coach

My approach to the triangulation is like you said. I declare the camera to be at (0,0), and I input the object's width, and the angles that the camera is viewing the right and left edges of the object at.
I can then calculate the coordinates of the object, and from that find the distance and angle required to hit it.

However, I don't know how to find the angle that the camera is viewing the object at.
I would imagine that the simplest way would be to take the position the object is on the screen (in relation to the center), multiplying it by some constant, and then putting that number through an ArcSin function.
I think this would get the angle that the object's angle in relation to the center of the field of view.
Basically:
ArcSin((Position on Screen - Center of Screen) / Screen Width) = Angle Object is viewed at.

If the camera was a typical FRC Camera found in the kit of parts, would this be correct?
__________________
"We're all nerds here, no need to be socially awkward"
"Oh, you want to know what I would do? I'd make a helicopter."

Once a FIRST Student, ALWAYS a FIRST Student

Reply With Quote
  #13   Spotlight this post!  
Unread 09-01-2012, 17:45
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Question from a Coach

I'm not following the approach you've laid out. Are you trying to determine the distance to the target, the height of the target, or the location of the robot on the field?

To review, sin(theta) is equal to (side opposite theta)/hypotenuse. This is of course only true for right triangles.

Can you draw a sketch showing the triangle and labeling what the points of the triangle correspond to?

Greg McKaskle
Reply With Quote
  #14   Spotlight this post!  
Unread 10-01-2012, 18:10
BlueNova's Avatar
BlueNova BlueNova is offline
Registered User
FRC #2704 (Order 2 Chaos)
Team Role: Alumni
 
Join Date: Mar 2011
Rookie Year: 2005
Location: Batavia, Illinois
Posts: 13
BlueNova is an unknown quantity at this point
Re: Question from a Coach

I'm still new to the interface on chief delphi, so let me know if this didn't work.
I put some pictures up on my profile that describe what I am thinking.
Basically, I need to find Theta 1 and Theta 2 on the triangulation diagram somehow.
I would like to use some sort of vision.
However, I'm not sure what math is required to convert an image from a camera into the angle that the camera is viewing something at.
If you could explain that to me, or direct me to a site that does, it would be greatly appreciated.
__________________
"We're all nerds here, no need to be socially awkward"
"Oh, you want to know what I would do? I'd make a helicopter."

Once a FIRST Student, ALWAYS a FIRST Student

Reply With Quote
  #15   Spotlight this post!  
Unread 10-01-2012, 18:30
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Question from a Coach

You may find it useful to look through the white paper on the NI site. It is also posted in the media papers section. There is also some discussion of this on the Java forum.

Greg Mckaskle
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:14.

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