Go to Post If we succeed, we succeed as a team if we fail, we fail as a team but either way, we are a team - we go home together and celebrate our accomplishments, whatever they are and try to learn from our mistakes. - KenWittlief [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 24-01-2012, 22:11
nydnh01 nydnh01 is offline
Registered User
AKA: Naresh Hing
FRC #1601 (Quantum Samurai)
Team Role: Alumni
 
Join Date: Feb 2011
Rookie Year: 2011
Location: Richmond Hill, NY
Posts: 43
nydnh01 is an unknown quantity at this point
Programming Kinect

I am having trouble locating a proper example of how to program the kinect in Labview. Please post any of your examples which can help me program kinect in labview.
Reply With Quote
  #2   Spotlight this post!  
Unread 25-01-2012, 01:59
rachelholladay's Avatar
rachelholladay rachelholladay is offline
Registered User
FRC #1912 (Team Combustion)
 
Join Date: Dec 2010
Rookie Year: 2006
Location: Slidell, Louisiana, USA
Posts: 540
rachelholladay has a reputation beyond reputerachelholladay has a reputation beyond reputerachelholladay has a reputation beyond reputerachelholladay has a reputation beyond reputerachelholladay has a reputation beyond reputerachelholladay has a reputation beyond reputerachelholladay has a reputation beyond reputerachelholladay has a reputation beyond reputerachelholladay has a reputation beyond reputerachelholladay has a reputation beyond reputerachelholladay has a reputation beyond repute
Re: Programming Kinect

We Beta Tested the Kinect and the YouTube demonstration can be seen here http://www.youtube.com/watch?v=IYhxqsj70VY

Also, once build season had started, we wrote a manual of sorts to try to help pass on our lessons learned as well as give instructions on hardware and software setup. There are some example code snippets included.
http://team1912.com/docs/kinectmanual.pdf
__________________
Carnegie Mellon School of Computer Science Class of 2017
2012 Dean's List Winner, 2011 NWCIT Award of Aspirations in Computing National Winner

2014 - : FIRST Team 3504 Girls of Steel (Mentor)
2014 Engineering Inspiration

2006 - 2013: FIRST Team 1912 Combustion (Webmaster / Controls Capt / Beta Test Lead / Drive Capt / JrFLL Coach)
2013 Woodie Flowers Finalist for Wendy Holladay. 2010 - 2013 Regional Chairman's Award at the Bayou Regional. 2011 - 2012 Best Website at the Bayou Regional. 2010 - 2013 Beta Test Team for Hardware and LabVIEW. 2012 JrFLL State Expo Coordinator.
Reply With Quote
  #3   Spotlight this post!  
Unread 25-01-2012, 08:53
zaphodp.jensen zaphodp.jensen is offline
Alumni and Mentor of 3130
AKA: Pierce Jensen
FRC #3130 (East Ridge Robotics Ominous Raptors (E.R.R.O.R.'s))
Team Role: Mentor
 
Join Date: Oct 2009
Rookie Year: 2009
Location: Minnesota
Posts: 76
zaphodp.jensen is a jewel in the roughzaphodp.jensen is a jewel in the roughzaphodp.jensen is a jewel in the rough
Re: Programming Kinect

We have been programming our own custom routines, and that has worked out great for us. I wrote a Kinect Array to Cluster VI, that generates a Named Cluster that you can just Unbundle. This cleans up the Code, because you do not need an Index Array for every value.

I'll include the VI, and some sample code for everyone's convenience. It took me about 2 hours of naming and Indexing the Array to properly get the Cluster, so please give reference to Team 3130, the E.R.R.O.R.'s.
Reply With Quote
  #4   Spotlight this post!  
Unread 25-01-2012, 09:11
RahatAhmed RahatAhmed is offline
Registered User
FRC #4300 (The Lion Kings)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Texas
Posts: 24
RahatAhmed is an unknown quantity at this point
Re: Programming Kinect

Quote:
We have been programming our own custom routines, and that has worked out great for us. I wrote a Kinect Array to Cluster VI, that generates a Named Cluster that you can just Unbundle. This cleans up the Code, because you do not need an Index Array for every value.

I'll include the VI, and some sample code for everyone's convenience. It took me about 2 hours of naming and Indexing the Array to properly get the Cluster, so please give reference to Team 3130, the E.R.R.O.R.'s.
Did you have to do anything to get your kinect to communicate to the robot? Our driver station picks up the skeleton but the robot doesn't seem to be able to connect to the Kinect.
Reply With Quote
  #5   Spotlight this post!  
Unread 25-01-2012, 09:15
inkspell4's Avatar
inkspell4 inkspell4 is offline
Registered User
FRC #3650 (Robo Raptors)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Maryland
Posts: 326
inkspell4 will become famous soon enough
Re: Programming Kinect

Could you post your code as an example
__________________
Chesapeake Regional : 2013, 2012, 2011
Rookie Year: 2011
2013 RoboRaptors Team 3650 Programming Team Captain
Team Website : http://www.roboraptorsfrcteam3650.com/index.html
_____________________________________________
Reply With Quote
  #6   Spotlight this post!  
Unread 25-01-2012, 10:17
nydnh01 nydnh01 is offline
Registered User
AKA: Naresh Hing
FRC #1601 (Quantum Samurai)
Team Role: Alumni
 
Join Date: Feb 2011
Rookie Year: 2011
Location: Richmond Hill, NY
Posts: 43
nydnh01 is an unknown quantity at this point
Re: Programming Kinect

According to the National Instruments example it shows that the kinect uses an index array to get the hand gestures but when connecting the kinect extra class it does not give that option to use the hand for the gestures.
Reply With Quote
  #7   Spotlight this post!  
Unread 25-01-2012, 13:34
zaphodp.jensen zaphodp.jensen is offline
Alumni and Mentor of 3130
AKA: Pierce Jensen
FRC #3130 (East Ridge Robotics Ominous Raptors (E.R.R.O.R.'s))
Team Role: Mentor
 
Join Date: Oct 2009
Rookie Year: 2009
Location: Minnesota
Posts: 76
zaphodp.jensen is a jewel in the roughzaphodp.jensen is a jewel in the roughzaphodp.jensen is a jewel in the rough
Re: Programming Kinect

Here is the code for the Cluster VI. This needs no modification to work.

The example code is purely example code, and has two fairly simple examples to look at. The code can be placed into the autonomous loop, and then deployed.

Please give reference to Team 3130, the E.R.R.O.R.'s.
Attached Files
File Type: vi Kinect Vertex to Cluster.vi (29.2 KB, 83 views)
File Type: vi Example Kinect Code.vi (12.3 KB, 29 views)
Reply With Quote
  #8   Spotlight this post!  
Unread 25-01-2012, 13:36
zaphodp.jensen zaphodp.jensen is offline
Alumni and Mentor of 3130
AKA: Pierce Jensen
FRC #3130 (East Ridge Robotics Ominous Raptors (E.R.R.O.R.'s))
Team Role: Mentor
 
Join Date: Oct 2009
Rookie Year: 2009
Location: Minnesota
Posts: 76
zaphodp.jensen is a jewel in the roughzaphodp.jensen is a jewel in the roughzaphodp.jensen is a jewel in the rough
Re: Programming Kinect

As a side note, you should check out the internal workings of my VI. Now imagine having an index array everywhere that you need a vertex broken out. An unbundle by name works extremely well for this purpose.
Reply With Quote
  #9   Spotlight this post!  
Unread 25-01-2012, 13:42
zaphodp.jensen zaphodp.jensen is offline
Alumni and Mentor of 3130
AKA: Pierce Jensen
FRC #3130 (East Ridge Robotics Ominous Raptors (E.R.R.O.R.'s))
Team Role: Mentor
 
Join Date: Oct 2009
Rookie Year: 2009
Location: Minnesota
Posts: 76
zaphodp.jensen is a jewel in the roughzaphodp.jensen is a jewel in the roughzaphodp.jensen is a jewel in the rough
Re: Programming Kinect

Quote:
Originally Posted by nydnh01 View Post
According to the National Instruments example it shows that the kinect uses an index array to get the hand gestures but when connecting the kinect extra class it does not give that option to use the hand for the gestures.
You are correct. The Get Kinect Extra VI actually grabs extra data relating to actually tracking. What you use to get the Vertex is the Get Kinect Vertices, and then normally, you use an Index Array to get the actual vertex info. I use my VI, which converts that array into a named cluster, which can then be unbundled.
Reply With Quote
  #10   Spotlight this post!  
Unread 25-01-2012, 15:22
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,752
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: Programming Kinect

I'm happy to see that you wrote a converter to a cluster, but there are a few things worth mentioning.

You can grow the index array and it will extract the next element without an enum cluster wired up. That syntax shortcut comes in handy pretty often.

I attached an alternate implementation that keeps the original cluster order (which matches the Microsoft header file), and uses some casting to simplify the diagram. I also attached a typedef for the cluster. Because ctls are not a supported upload type, they are in a zipped folder.

Greg McKaskle
Attached Files
File Type: zip Vertex Array to Cluster.zip (23.2 KB, 20 views)
Reply With Quote
  #11   Spotlight this post!  
Unread 25-01-2012, 16:07
zaphodp.jensen zaphodp.jensen is offline
Alumni and Mentor of 3130
AKA: Pierce Jensen
FRC #3130 (East Ridge Robotics Ominous Raptors (E.R.R.O.R.'s))
Team Role: Mentor
 
Join Date: Oct 2009
Rookie Year: 2009
Location: Minnesota
Posts: 76
zaphodp.jensen is a jewel in the roughzaphodp.jensen is a jewel in the roughzaphodp.jensen is a jewel in the rough
Re: Programming Kinect

The only reason that I had the enums wired up was because I was not sure as to what the order of the array was going to be, and I wanted them to be in a specific order in the cluster.
If you do not know the order of the array, it is always safer to wire in all of the enums to ensure that the output is the correct value from the array.

But thanks for the code anyways!
Reply With Quote
  #12   Spotlight this post!  
Unread 25-01-2012, 23:19
SuperS_5's Avatar
SuperS_5 SuperS_5 is offline
[Certified LabVIEW Developer]
FRC #1219
 
Join Date: Dec 2010
Rookie Year: 2010
Location: Canada
Posts: 140
SuperS_5 will become famous soon enoughSuperS_5 will become famous soon enough
Re: Programming Kinect

Quote:
Originally Posted by Greg McKaskle View Post
I attached an alternate implementation that keeps the original cluster order (which matches the Microsoft header file), and uses some casting to simplify the diagram.
Greg McKaskle
Hey Greg, thanks for the converter VI, could be useful but noticed one thing. The array to cluster function was left at the default of 9 elements. It would have to be set to 20 if you want the whole control to be casted.
__________________
Mike B
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 22:29.

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