Go to Post As an adult who has spent years working with youth in Boy Scouts and FIRST, and on behalf of all other adults at the event: deodorant. - Rick TYler [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 18-02-2012, 03:51
Luiz12 Luiz12 is offline
Registered User
FRC #4210
 
Join Date: Jan 2012
Location: South Gate
Posts: 45
Luiz12 is an unknown quantity at this point
Kinect problems please help!

Hi during autonomous mode I simply want to move my left foot and cause whatever is in the case structure, whether it be a motor or a frame to be activated. When I use the code below, a motor just keeps running which means that its constantly tracking my foot. How can I just make it work with a simple action like moving my foot.
  #2   Spotlight this post!  
Unread 18-02-2012, 08:39
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,751
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: Kinect problems please help!

The issue is that tracked means that the Kinect processing code knows where your foot is. It doesn't mean that it moved. If you check that the foot is tracked and check that the position is different by a large enough amount, that would be a better trigger.

More than likely, you probably want to look at a single measure of the foot, just the Y if you want to raise it, just X if you step to the side, or just z if you step forward. And you will likely want to make it a relative compare, between the foot and hip for instance, and give it a threshold that you have to cross.

If you have an English sentence such as ...
When my right foot moves twelve inches to the right of my hip, I want the pneumatic ram to push the basketball into the spinning flywheel.

then you can translate that into code. Discuss the sentence with the appropriate team members first so that you know what the trigger is, and then write the code. Post it if you want confirmation.

Greg McKaskle
  #3   Spotlight this post!  
Unread 18-02-2012, 14:54
Rogue Leader Rogue Leader is offline
Registered User
FRC #0696 (Circuit Breakers)
Team Role: Programmer
 
Join Date: Feb 2012
Rookie Year: 2011
Location: Glendale, CA
Posts: 78
Rogue Leader is an unknown quantity at this point
Re: Kinect problems please help!

Yeah, your code is just saying "If the Kinect can see my foot, then do this code; if not, do this code." You need to change the code to have it based on where your foot is. However, I have no idea how to do this... I believe you find the x and y coordinates of you foot, and then base your code on those numbers. But don't make them exact numbers. Make then in a limit by using the "Range and Coerce" block from the comparison palette. It should allow you to base the cases on where your foot is. I would use this because your foot won't be able to stay in one exact coordinate for more than a few milliseconds.

Hope I helped!
Closed Thread


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 00:44.

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