Go to Post Don’t let the medals you win and the trophies on your mantel define who you are. Let it be the lives you’ve touched and the legacy you leave behind. - Sean Schuff [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 22-01-2012, 19:58
JChavis's Avatar
JChavis JChavis is offline
Team 3490's "Pro./Electrician"
FRC #3490 (Vyper Drive)
Team Role: Leadership
 
Join Date: Jan 2012
Rookie Year: 2007
Location: Summerville, SC
Posts: 52
JChavis is an unknown quantity at this point
Question Kinect Boolean Programming

I've been working on the programming for our Hybrid/Autonomous mode and I have one important problem to solve...

At the competitions alliance teams must "choose" which member of the alliance will use the Kinect during the Hybrid Period. If you are the team to be selected, you would place the USB at the operating console into your laptop to activate the Field Kinect from the Kinect Station.

So here's my question:

How would you be able to detect in Labview (and Java) if the USB for the field Kinect is in the laptop or not. I believe it is similar to the Boolean involved in detecting if a button on a controller is pushed or not, but its not in my certainty to guess....
__________________
Hmmm....I wonder if I can create a robot lawnmower with the knowledge I have gained from FRC.....
Reply With Quote
  #2   Spotlight this post!  
Unread 22-01-2012, 20:01
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 989
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: Kinect Boolean Programming

There are a number of options to do that using the data that will come in if you do have the Kinect plugged in and it's sending data to your robot. The easiest is probably to query the Number of Players and do Kinect stuff if it's 1 and non-Kinect stuff if it's zero. You should also decide what to do in the case that it's greater than 1 even though this shouldn't occur during competition.

The code to do this is obviously very different in the two languages, but I believe the Gesture Processing samples (unfortunately I don't have them on this PC to check) for both languages show how you would do this if you need help.

Last edited by RufflesRidge : 22-01-2012 at 20:03.
Reply With Quote
  #3   Spotlight this post!  
Unread 22-01-2012, 20:19
JChavis's Avatar
JChavis JChavis is offline
Team 3490's "Pro./Electrician"
FRC #3490 (Vyper Drive)
Team Role: Leadership
 
Join Date: Jan 2012
Rookie Year: 2007
Location: Summerville, SC
Posts: 52
JChavis is an unknown quantity at this point
Re: Kinect Boolean Programming

Thanks for the info, but is there a specific block in Labview to use? (i.e: JOYSTICK Open, DRIVE 4-Motors, GYRO Close)
__________________
Hmmm....I wonder if I can create a robot lawnmower with the knowledge I have gained from FRC.....
Reply With Quote
  #4   Spotlight this post!  
Unread 22-01-2012, 20:23
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 989
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: Kinect Boolean Programming

Quote:
Originally Posted by JChavis View Post
Thanks for the info, but is there a specific block in Labview to use? (i.e: JOYSTICK Open, DRIVE 4-Motors, GYRO Close)
Unfortunately I don't remember which block the number of players comes from in LabVIEW, it's definitely one from the Kinect palette. I think it's the Kinect Header, but Kinect Extra may also be a possibility.
Reply With Quote
  #5   Spotlight this post!  
Unread 22-01-2012, 22:14
MotorHead's Avatar
MotorHead MotorHead is offline
Programming Mentor
AKA: Jeff Beltramo
FRC #1922 (OZ-Ram)
Team Role: Coach
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Concord, NH
Posts: 68
MotorHead is a splendid one to beholdMotorHead is a splendid one to beholdMotorHead is a splendid one to beholdMotorHead is a splendid one to beholdMotorHead is a splendid one to beholdMotorHead is a splendid one to beholdMotorHead is a splendid one to behold
Re: Kinect Boolean Programming

I think this thread addresses one way to do what you want:

http://www.chiefdelphi.com/forums/sh...d.php?t=100643
__________________
Jeff Beltramo
Team #1922
Concord, New Hampshire

Reply With Quote
  #6   Spotlight this post!  
Unread 23-01-2012, 19:43
JChavis's Avatar
JChavis JChavis is offline
Team 3490's "Pro./Electrician"
FRC #3490 (Vyper Drive)
Team Role: Leadership
 
Join Date: Jan 2012
Rookie Year: 2007
Location: Summerville, SC
Posts: 52
JChavis is an unknown quantity at this point
Re: Kinect Boolean Programming

Thanks, Jeff, I'll see if I can Figure it out.
__________________
Hmmm....I wonder if I can create a robot lawnmower with the knowledge I have gained from FRC.....
Reply With Quote
  #7   Spotlight this post!  
Unread 24-01-2012, 07:05
JChavis's Avatar
JChavis JChavis is offline
Team 3490's "Pro./Electrician"
FRC #3490 (Vyper Drive)
Team Role: Leadership
 
Join Date: Jan 2012
Rookie Year: 2007
Location: Summerville, SC
Posts: 52
JChavis is an unknown quantity at this point
Lightbulb Re: Kinect Boolean Programming

Well, guys, I do believe that I have figured out a few ways to program this section in Autonomous/Hybrid. I am extreemely sure that these are some ways to go around this...

In the first picture, I didn't write a program in the false case block for the first scenario, I just entered some other programming options...

What do you guys think?
Attached Thumbnails
Click image for larger version

Name:	Hybrid Detect Samples.png
Views:	43
Size:	53.2 KB
ID:	11548  Click image for larger version

Name:	Steps to Kinect Header Block.png
Views:	37
Size:	32.2 KB
ID:	11549  
__________________
Hmmm....I wonder if I can create a robot lawnmower with the knowledge I have gained from FRC.....

Last edited by JChavis : 24-01-2012 at 19:24.
Reply With Quote
  #8   Spotlight this post!  
Unread 24-01-2012, 21:54
JChavis's Avatar
JChavis JChavis is offline
Team 3490's "Pro./Electrician"
FRC #3490 (Vyper Drive)
Team Role: Leadership
 
Join Date: Jan 2012
Rookie Year: 2007
Location: Summerville, SC
Posts: 52
JChavis is an unknown quantity at this point
Exclamation Re: Kinect Boolean Programming

I have my examples for the kinect detection options, and I just need some quick feedback on it...
__________________
Hmmm....I wonder if I can create a robot lawnmower with the knowledge I have gained from FRC.....
Reply With Quote
  #9   Spotlight this post!  
Unread 19-02-2012, 11:07
JChavis's Avatar
JChavis JChavis is offline
Team 3490's "Pro./Electrician"
FRC #3490 (Vyper Drive)
Team Role: Leadership
 
Join Date: Jan 2012
Rookie Year: 2007
Location: Summerville, SC
Posts: 52
JChavis is an unknown quantity at this point
Exclamation Re: Kinect Boolean Programming

Quote:
Originally Posted by JChavis View Post
What do you guys think?
We are within 2 days before we have to stop testing the main robot...

Are the Examples I have given you a good way to tell the Autonomous/Hybrid program which program should run?
__________________
Hmmm....I wonder if I can create a robot lawnmower with the knowledge I have gained from FRC.....
Reply With Quote
  #10   Spotlight this post!  
Unread 19-02-2012, 11:18
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 989
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: Kinect Boolean Programming

I would get rid of the two small case structures inside. Just put your non-Kinect auto code there. If there are 0 players, either the Kinect isn't being used or your player is not detected, either way you want to just run auto. If there are two players, you are not necessarily going to get good data from the Kinect so I would just run the auto code there as well. This means that if "players" is anything but 1, you want to run your auto code, which is what your larger outside case structure will do.
Reply With Quote
  #11   Spotlight this post!  
Unread 20-02-2012, 15:39
JChavis's Avatar
JChavis JChavis is offline
Team 3490's "Pro./Electrician"
FRC #3490 (Vyper Drive)
Team Role: Leadership
 
Join Date: Jan 2012
Rookie Year: 2007
Location: Summerville, SC
Posts: 52
JChavis is an unknown quantity at this point
Re: Kinect Boolean Programming

Quote:
Originally Posted by RufflesRidge View Post
I would get rid of the two small case structures inside. Just put your non-Kinect auto code there. If there are 0 players, either the Kinect isn't being used or your player is not detected, either way you want to just run auto. If there are two players, you are not necessarily going to get good data from the Kinect so I would just run the auto code there as well. This means that if "players" is anything but 1, you want to run your auto code, which is what your larger outside case structure will do.
Oh, I didn't mean for the two inside structures to mean that it is a part of the program, I just put them there to show different examples...
__________________
Hmmm....I wonder if I can create a robot lawnmower with the knowledge I have gained from FRC.....
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