Go to Post Put on shows. Start new teams, FRC, FVC, or FLL. It doesn't matter. But I know that being on the robotics team has given me some of the best memories of my life, and I wouldn't want anybody else to miss out on that. - irishninja [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 30-01-2012, 09:43
sometimestommy's Avatar
sometimestommy sometimestommy is offline
Schrödinger's Assistant
AKA: Thomas Moll
FRC #1939 (Ku-Nig-Its)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2009
Location: US
Posts: 48
sometimestommy is on a distinguished road
[Vision Tracking][Offering Tracking Tutorial/Help]

Good news everyone! Team 1939 has vision tracking up and running on robot code. As one of the lead programmers on the team, I've learned a lot through the process and I'm offering help to any team that needs any assistance with tracking. If you would like some assistance, PM me on the forums and I can point you in the right direction.

To teams that have programming experience:
In order to get code to work for tracking, find the example "rectangle tracking example.vi" (Or something like this) under the Vision section of the support category in lab view. Go To the block diagram (ctrl-e) and then copy all of the code inside of the while loop and save it to another VI.
Next, Open up a robot project from the Labview splash screen and open the VI that you just created. Under team code, go to the vision tracking VI and paste the code from your saved VI into the inner most while loop box. then simply wire the purple image stream from inside the loop to the top left corner of your imported code. Then just run robot main.VI, (with your bridge connecting your laptop, axis camera, and robot), then open up the front panel of your vision tracking vi and look at the image viewers, If your camera is appropriately set up, you should see what the camera is seeing.
Then, simply click the "Luminance" Tab above the original image and adjust the sliders such that the target is being tracked (with retro reflective tape and a flashlight next to the camera. then you get a Target Array out with the X, Y , and distance.

Thanks for Listening!

ps: Later today i can get some of the code in Sub Vi form so that teams can drag and drop. But please actually look into the code to learn how it functions!

-Thomas Team 1939
__________________
-Team 1939 The Barstow Ku-Nig-Its!
Reply With Quote
  #2   Spotlight this post!  
Unread 30-01-2012, 20:20
sometimestommy's Avatar
sometimestommy sometimestommy is offline
Schrödinger's Assistant
AKA: Thomas Moll
FRC #1939 (Ku-Nig-Its)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2009
Location: US
Posts: 48
sometimestommy is on a distinguished road
Re: [Vision Tracking][Offering Tracking Tutorial/Help]

Bump. I'm still offering assistance in vision tracking. I still need to get the code in SubVi form.
__________________
-Team 1939 The Barstow Ku-Nig-Its!
Reply With Quote
  #3   Spotlight this post!  
Unread 30-01-2012, 20:55
Blackphantom91's Avatar
Blackphantom91 Blackphantom91 is offline
Mentor + 4 = Stuck For Life
AKA: Malcolm Stirckland
FRC #1986 (Team Titanium)
Team Role: Mentor
 
Join Date: Nov 2009
Rookie Year: 2008
Location: Kansas City
Posts: 232
Blackphantom91 has a spectacular aura aboutBlackphantom91 has a spectacular aura aboutBlackphantom91 has a spectacular aura about
Re: [Vision Tracking][Offering Tracking Tutorial/Help]

Im interested to see what you have came up with and how accurately you are able to track the square and how far, test we have came up with it looses it in poor conditions very easily.
__________________
[img*]http://i.imgur.com/Os2oTET.jpg[/img*]
Reply With Quote
  #4   Spotlight this post!  
Unread 30-01-2012, 21:19
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: [Vision Tracking][Offering Tracking Tutorial/Help]

Congratulations on getting working vision code. But, may I point out that there is a somewhat easier way to incorporate the vision code into the framework. As detailed in the tutorial, I'd encourage you to open the Vision VI and Save As to the framework project.

The primary reason to do this is to avoid cross-linking between the code in the example and the code in the project. To view where the code resides, go to the project window and click on the Files tab to see if any files from the example are being used. It isn't the end of the world if they are, but it indicates that those files are now used by your robot project and if changed or deleted will impact your robot code. In general, I wouldn't advise adding example source to your project without making a copy.

Greg McKaskle
Reply With Quote
  #5   Spotlight this post!  
Unread 31-01-2012, 15:23
nick1023 nick1023 is offline
Registered User
FRC #1023
 
Join Date: Dec 2008
Location: Toledo, Ohio
Posts: 19
nick1023 will become famous soon enough
Re: [Vision Tracking][Offering Tracking Tutorial/Help]

When we run the example code (using the save as method mentioned in the code comments) execution hangs at the getimage VI. The default code camera loop runs without hanging, the driver station is retrieving the camera images and the begin.vi was checked for consistency in naming with the example vision VI. Is there anything that we are forgetting causing the code to be unable to retrieve an image from the camera?
__________________
1023 Bedford Express
Reply With Quote
  #6   Spotlight this post!  
Unread 05-02-2012, 14:54
sotaprogrammer sotaprogrammer is offline
Registered User
FRC #2557
 
Join Date: Jan 2012
Location: Tacoma, WA
Posts: 1
sotaprogrammer is an unknown quantity at this point
Re: [Vision Tracking][Offering Tracking Tutorial/Help]

Quote:
Originally Posted by nick1023 View Post
When we run the example code (using the save as method mentioned in the code comments) execution hangs at the getimage VI. The default code camera loop runs without hanging, the driver station is retrieving the camera images and the begin.vi was checked for consistency in naming with the example vision VI. Is there anything that we are forgetting causing the code to be unable to retrieve an image from the camera?
We are having a similar issue. Were you able to find a solution?
Reply With Quote
  #7   Spotlight this post!  
Unread 08-12-2016, 17:08
Bill Chapman Bill Chapman is offline
Registered User
FRC #4522
 
Join Date: Nov 2016
Location: Sedalia, Missouri
Posts: 2
Bill Chapman is an unknown quantity at this point
Re: [Vision Tracking][Offering Tracking Tutorial/Help]

We only have lab view, will your tracking tutorial work with it?
Reply With Quote
  #8   Spotlight this post!  
Unread 08-12-2016, 18:20
kylelanman's Avatar
kylelanman kylelanman is offline
Programming Mentor
AKA: Kyle
FRC #2481 (Roboteers)
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2007
Location: Tremont Il
Posts: 186
kylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to all
Re: [Vision Tracking][Offering Tracking Tutorial/Help]

This is a thread from back in 2012. I'm guessing you found it through the forum search. The OP hasn't been active since 2013 so it isn't very likely that you will get a response from them. You might try looking for a different thread or creating your own.
__________________
"May the coms be with you"

Is this a "programming error" or a "programmer error"?

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

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