Go to Post Forget Pool Basketball or Pool Volleyball, it's time for some Pool Rack n' Roll! - Conor Ryan [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 20-02-2012, 17:04
tilky's Avatar
tilky tilky is offline
Registered User
AKA: Ryan Thielke
FRC #3137
Team Role: Programmer
 
Join Date: Nov 2011
Rookie Year: 2011
Location: Connetquot
Posts: 188
tilky is an unknown quantity at this point
getting distance from camera

the title explains it all. how would you use the reflective tape to find the distance from the camera to it
Reply With Quote
  #2   Spotlight this post!  
Unread 20-02-2012, 18:17
propionate's Avatar
propionate propionate is offline
Team co-lead and LabVIEW programmer
AKA: Stephen
FRC #1732 (Hilltopper Robotics)
 
Join Date: Jan 2012
Rookie Year: 2009
Location: Milwaukee
Posts: 93
propionate is on a distinguished road
Re: getting distance from camera

If you unbundle the target info global variable, you will see that one of the variables calculated is distance
Reply With Quote
  #3   Spotlight this post!  
Unread 20-02-2012, 18:38
Kazel's Avatar
Kazel Kazel is offline
Registered User
FRC #3414
 
Join Date: Feb 2012
Location: Farmington, MI
Posts: 3
Kazel is an unknown quantity at this point
Re: getting distance from camera

Hi,

Our team is having trouble integrating the target info into our main teleop.vi. We tried copying the Rectangular Processing example vi into our main project (the vi that only runs on the computer) and then placing it in our main code. However, whenever I try to run the code with this vi placed anywhere in it, the code doesn't work. I tried removing the vi and the code worked normally. Has anybody figured out the best way to actually use the target info?
Reply With Quote
  #4   Spotlight this post!  
Unread 20-02-2012, 20: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,756
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: getting distance from camera

There is a tutorial, available on the launch screen that walks you through the basics of the Rectangle example.

There are actually two different implementations, one targets the laptop, and one targets the cRIO. The cRIO one already has some amount of Robot Main and a Vision Processing.vi that incorporates the rectangle processing. As the tutorial explains, you open the vision processing and do a Save As and include dependencies to save it to your robot project. This will overwrite the Vision Processing VI and the Robot Globals, which should be what you want, but if you have added your own globals, you need to merge them.

Greg McKaskle
Reply With Quote
  #5   Spotlight this post!  
Unread 20-02-2012, 20:54
Kazel's Avatar
Kazel Kazel is offline
Registered User
FRC #3414
 
Join Date: Feb 2012
Location: Farmington, MI
Posts: 3
Kazel is an unknown quantity at this point
Re: getting distance from camera

Wow, can't believe I didn't see that tutorial a long time ago. Thank you very much! I had copied our current project from another computer, and it turns out I was having some path issues, but once I got those sorted out it worked fine!

Also, I apologize for hi-jacking this thread...
Reply With Quote
  #6   Spotlight this post!  
Unread 21-02-2012, 08:05
tilky's Avatar
tilky tilky is offline
Registered User
AKA: Ryan Thielke
FRC #3137
Team Role: Programmer
 
Join Date: Nov 2011
Rookie Year: 2011
Location: Connetquot
Posts: 188
tilky is an unknown quantity at this point
Re: getting distance from camera

where is target info global?
Reply With Quote
  #7   Spotlight this post!  
Unread 21-02-2012, 08:18
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,756
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: getting distance from camera

the target info global is written to in the Vision Processing VI and defined in the Robot Global VI. By default, no code in your project is reading it. You should copy/paste the global node or drag it from the project and select the right variable.

Greg McKaskle
Reply With Quote
  #8   Spotlight this post!  
Unread 21-02-2012, 08:36
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: getting distance from camera

If you have followed the instructions for integrating the rectangular vision target code into your project, the Target info global variable should be with all the other global variables, in the Robot Global Data vi.
Reply With Quote
  #9   Spotlight this post!  
Unread 21-02-2012, 09:19
tilky's Avatar
tilky tilky is offline
Registered User
AKA: Ryan Thielke
FRC #3137
Team Role: Programmer
 
Join Date: Nov 2011
Rookie Year: 2011
Location: Connetquot
Posts: 188
tilky is an unknown quantity at this point
Re: getting distance from camera

ummmmm....is the global variable supposed to be there?
Reply With Quote
  #10   Spotlight this post!  
Unread 21-02-2012, 11:03
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: getting distance from camera

Quote:
Originally Posted by tilky View Post
ummmmm....is the global variable supposed to be there?
If by "the global variable" you mean "Target info" and if by "there" you mean "in Robot Global Data.vi", then yes. If you mean something else, please ask again with more specific words.
Reply With Quote
  #11   Spotlight this post!  
Unread 21-02-2012, 11:39
tilky's Avatar
tilky tilky is offline
Registered User
AKA: Ryan Thielke
FRC #3137
Team Role: Programmer
 
Join Date: Nov 2011
Rookie Year: 2011
Location: Connetquot
Posts: 188
tilky is an unknown quantity at this point
Re: getting distance from camera

its not there. There is only enable vision, image size, and LED Toggle Rate.
Reply With Quote
  #12   Spotlight this post!  
Unread 21-02-2012, 11:55
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: getting distance from camera

Did you follow the instructions for adding the rectangular target processing code to your robot project? Doing that properly will replace the robot globals vi file with one that has the target info included.
Reply With Quote
  #13   Spotlight this post!  
Unread 21-02-2012, 22:54
tilky's Avatar
tilky tilky is offline
Registered User
AKA: Ryan Thielke
FRC #3137
Team Role: Programmer
 
Join Date: Nov 2011
Rookie Year: 2011
Location: Connetquot
Posts: 188
tilky is an unknown quantity at this point
Re: getting distance from camera

can you post a link of where to find that tutorial?
Reply With Quote
  #14   Spotlight this post!  
Unread 21-02-2012, 23:47
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: getting distance from camera

It's Tutorial 8—Integrating Vision into Robot Code. Find it, and all the other LabVIEW Getting Started Tutorials, on the Tutorials tab in LabVIEW.
Reply With Quote
  #15   Spotlight this post!  
Unread 22-02-2012, 09:28
tilky's Avatar
tilky tilky is offline
Registered User
AKA: Ryan Thielke
FRC #3137
Team Role: Programmer
 
Join Date: Nov 2011
Rookie Year: 2011
Location: Connetquot
Posts: 188
tilky is an unknown quantity at this point
Re: getting distance from camera

is there anywhere else i can find it, my computer is stupid and won't update the labview home screen with the frc update
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 13:15.

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