Save position of right hand as "home"-position

When the Kinect has tracked my right hand (JointType.HandRight), I want it to save the current position of the hand as a "home"-position which later can be referred to when for example my right hand moves to the right from the "home"-position.
I'm a novice in programming and would highly appreciate code for show and an explanation (and note if there's anything in the existing code that's wrong or missing)! Thanks!
// Find the right hand joint
IList<Microsoft.Kinect.Body> bodies;
void Reader_MultiSourceFrameArrived(object sender, MultiSourceFrameArrivedEventArgs e)
var reference = e.FrameReference.AcquireFrame();
using (var frame = reference.BodyFrameReference.AcquireFrame())
if (frame != null)
bodies = new Microsoft.Kinect.Body[frame.BodyFrameSource.BodyCount];
frame.GetAndRefreshBodyData(bodies);
foreach (var body in bodies)
if (body != null)
if (body.IsTracked)
// Find the joint
Joint handRight = body.Joints[Microsoft.Kinect.JointType.HandRight];
// Around here maybe having the code which saves the current position as "home"

I could make an IF code line where if I close my hand, the kinect will respond to that action as saving that position as "home" and while I have my hand closed the robot will respond when I move my hand from that positioned home. How do I perform
what you said in the following: "Then you could compute for each body frame, what is the position vector from the home point and make your robot move depending on than vector"? I suppose you'r talking about making the work space in x, y, z work as
the robot will perform the same movement as my hand? I'm right now a little of a novice in programming as I've gotten a little rusty while I haven't programmed that much during the years. I've checked the Kinect v2 documentation but I don't know what information
nor code I could use.
I have watched the jump start videos and they gave me a better understanding in the kinect but didn'tfeel that
they were helpful for the coding and
for my specific work, but I could be wrong.
Once again I've haven't got a good understanding of the differences yet so if you say body frame is enough
you'r probably right, could you tell me the differences?
And do I change
thus only the multisource for the body frame in the code?
Thank you for the help and sorry for my late response!

Similar Messages

  • I cannot save PDF files that has a lock on the right hand side of the tab in safari iOS 5 from my iPad. Please help to find a solution.

    Can someone help find a fix of how to save PDF files from safari in iOS 5.0.1? The PDF files show a lock on the right hand side of tab. Only these lock PDF cannot be save. Any help will be highly appreciated.

    I assume that you have iBooks or GoodReader or Adobe Reader - some app that will open PDF files so my suggestion would be to start with the basic things, restart your iPad, reset it or quit Safari and restart.
    Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
    Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.
    In order to close/quit apps - Go to the home screen first by tapping the home button. Quit/close open apps by double tapping the home button and the task bar will appear with all of you recent/open apps displayed at the bottom. Tap and hold down on any app icon until it begins to wiggle. Tap the minus sign in the upper left corner to close the apps. Restart the iPad. Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off.
    To power up hold the sleep button until the Apple logo appears and let go of the button.
    The lock to the right side of the tab indicates that the website is secure - or at least that is what it looks like in Safai on my iPad. Sites with the https in the address have the lock icon in the tab, non secure sites - web pages without the https - do not have the lock icon. I'm not sure if that has any bearing on it - none of the PDF files that I have opened in Safari have the lock icon.
    But if you can open the file - it doesn't make sense that it would be locked??? Try the basic suff and see if any of that helps.
    Message was edited by: Demo

  • The search bar in the top right hand side of my screen works fine, but the main search bar in the middle of the home screen doesn't at all; do you know how I can fix this?

    I can access bookmarked pages, pages that are on a saved RSS feed, and can search the web using the top right-hand bar on my screen. However, the main bar, in the center of the home page (not sure of the correct name) will not do anything - whether I press search, or hit enter on my keyboard. There also appears to be another bar underneath that, which I can press, but it remains useless.
    My Dad is running Firefox 4 on his computer, and has showed me what it is meant to look like. I can therefore conclude that there is definitely something up with mine.
    I am currently using Firefox 4 with my laptop, which runs Windows 7.
    I have uninstalled and reinstalled Firefox 4, but the problem still remains. I am not keen to use Internet Explorer, purely because I have bookmarked so many pages on the previous version of Firefox but also because I get on very well with the whole layout etc.
    If it comes to it, I am willing to take the risk of losing my bookmarks, but if there are any suggestions at '''''all''''' of how I could possibly fix this problem, I would welcome them.

    Go to this address: http://mycroft.mozdev.org/search-engines.html?country=AU
    Item 24 lists 3 installable major search engines for Australia.
    You can also restrict your search in Google by including ''country:au'' or ''location:au'' or ''city:perth'' (for example) in your search terms. Example: ''city:sydney plumbers'' in the Google search box will list plumbers in cities named sydney.

  • JScrollPane : save positions

    I am working on file browser. I have a table in JScrollPane. I want to save position of JScrollPane vertical bar when I select a folder. I realized a class that save value when I select a folder. When I move up it loads these values and sets these properties back. But I have a problem. If I move from a folder with big number of files (maximum is big) to a folder with a few files all works fine.
    JScrollPane s =...
    s.getVerticalScrollBar().setValue (400);
    assert s.getVerticalScrollBar().getValue() == 400;
    But if I move from a folder with a few files (maximum is small) t oa folder with a lot of files it doesn't work.
    JScrollPane s =...
    s.getVerticalScrollBar().setValue (400);
    assert s.getVerticalScrollBar().getValue() != 400; //s.getVerticalScrollBar().getValue() == 152 for example
    What should I do?

    Try something like this:
    SELECT substring(I.ItemCode+'XXXXXXXXXXXXXXXXXXXXX',1,18) from OITM I

  • After I log on to facebook in the upper right hand corner of facebook my Home, Profile and account feature is missing only when I use Firefox if I use MSN it doesn't do this what's going on?

    When I log onto Facebook using Mozilla Firefox in the upper right hand corner of the facebook page where it has my Home, Profile and Account setting it is missing but if I use MSN to log on it's there. What's going on?

    No problem

  • I just downloaded Firefox 4 but there is no "connection scale" on the right hand bottom of the screen and no icons on the top left of the screen like a "home" for home page etc. top

    On the old Firefox 3.0 I had a 'connection scale" on the bottom right hand corner (just above the time) which shows you the extent of connection. I also had icons on the top left hand corner of a 'home' for home page...etc. On Firefox.4.0 these are missing. Can they be obtained by the "settings"?

    I'm not sure what you mean by "connection scale". If you are referring to the padlock, this has been replaced by the site identity button, for details on using it see https://support.mozilla.com/kb/Site+Identity+Button
    The Home button by default has been moved to the right hand side of the navigation toolbar, you can move it back. For details of how to do that see https://support.mozilla.com/kb/how-do-i-customize-toolbars
    If any buttons are missing, you can restore them as shown here - https://support.mozilla.com/kb/Back+and+forward+or+other+toolbar+items+are+missing

  • Hi, in almost every other browser, when i save a document or attach a file in my gmail i have a search bar in the top right hand corner of the window pane that opens. Does Firefox do this?

    for example, those of you running windows, if you key;
    start/computer/C drive you will notice a search bar in tope right hand corner. Can this happen in Firefox.

    Go to this address: http://mycroft.mozdev.org/search-engines.html?country=AU
    Item 24 lists 3 installable major search engines for Australia.
    You can also restrict your search in Google by including ''country:au'' or ''location:au'' or ''city:perth'' (for example) in your search terms. Example: ''city:sydney plumbers'' in the Google search box will list plumbers in cities named sydney.

  • How do I force all Tabs to the right hand side, leaving space on the left?

    It feels more intuitive to have the first tab against the right hand side and it's easier to find because it always remains in the same position when, eg, closing other tabs. I use TabMixPlus, but can't find the required option. Many thanks.

    You can check out code in the userChrome.css file to see that it doesn't really work well (tabs move around when you hover or click).
    Add code to the <b>userChrome.css</b> file below the default @namespace line.
    *http://kb.mozillazine.org/userChrome.css
    <pre><nowiki>@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
    #tabbrowser-tabs tab:first-child {-moz-box-ordinal-group:2}
    </nowiki></pre>
    The customization files userChrome.css (user interface) and userContent.css (websites) are located in the <b>chrome</b> folder in the Firefox profile folder.
    *http://kb.mozillazine.org/Editing_configuration
    You can use this button to go to the currently used Firefox profile folder:
    *Help > Troubleshooting Information > Profile Directory: Show Folder (Linux: Open Directory; Mac: Show in Finder)
    * Create the chrome folder (lowercase) in the <xxxxxxxx>.default profile folder if this folder doesn't exist
    * Use a plain text editor like Notepad to create a (new) userChrome.css file in this folder (the names are case sensitive)
    * Paste the code in the userChrome.css file in the editor window and make sure that the userChrome.css file starts with the default @namespace line
    * Make sure that you select "All files" and not "Text files" when you save the file via "Save file as" in the text editor as userChrome.css.<br>Otherwise Windows may add a hidden .txt file extension and you end up with a not working userChrome.css.txt file

  • Indesign CS6 won't load on my right hand monitor

    Indesign CS6 won't load on my right hand monitor

    Joining the discussion... [running CS6 on Windows8; dual screen 23"; 1920 x 1080 (NVIDIA GeForce 9600GT card; DVI, HDMI)]
    I have had the same problem. Each of the panels (pages, layers etc.) would not work with the mouse/pointer... if I clicked in a panel, I could tab/shift tab through each component in the panel, use the arrow keys to make changes, but the mouse/pointer was not active.
    After extreme frustration... The following appears to solve the issue.
    Solution: Open Indesign CS6, set up screen positions for the panels as required, save the workspace (Window/Workspace/New Workspace...).
    Sorry... this appeared to worked... but I have dicovered that it only works for a short period then this problem seems to rear it ugly head again and all panels are intermitent in their responsiveness. Currently I have tried re-start... doesn't seem to change the problem, a shutdown and startup resets everything but the problem soon appears again. I'm searching for a solution... anyone? 

  • Randomly i won't be able to use the exit or maximize/minimize buttons in the upper right hand corner. Anyone know what to do?

    the minimize, maximize, and exit buttons in the upper right hand corner randomly stop working. i have tried to restart firefox in safe-mode and it still happens. I have also tried reinstalling firefox and that did not work either. anyone know a solution?

    Hi,
    If the problem occurs in more than one application it could be a system graphics setting, problem or similar. You can try to check by opening another application in the same position and using it for some time.
    You can also try Firefox in a [https://support.mozilla.org/en-US/kb/Managing-profiles new profile] for some time, and later also deselect '''Use hardware acceleration when available''' in '''Tools''' ('''Alt''' + '''T''') > '''Options''' > '''Advanced''' [https://support.mozilla.org/en-US/kb/Options%20window%20-%20Advanced%20panel?as=u General], restart in the new profile and check again.
    [https://support.mozilla.org/en-US/kb/Options%20window Options]

  • Aperture 2.0 Inspector (move it to Right hand side?)

    I saw somewhere in this discussion group that the inspector can be moved to the right hand side from it's default on left. I cant find it anywhere in the manual. Can someone give me the keyboard short cut to make that move?

    view -> inspector -> swap position ...
    or shift-i ...

  • I recebtly bought an app (FIFA 12) now every time i play a match after the match it does not save an just goes to the home page without warning and i have to start all over again and no i did not press the home button. plz help

    i recebtly bought an app (FIFA 12) now every time i play a match after the match it does not save an just goes to the home page without warning and i have to start all over again and no i did not press the home button. plz help

    You can't gift it, gifting can only be done from within the store, not from within your library.
    Puchases are considered final but you can try the 'report a problem' link to contact iTunes Support and see if they will refund or credit you : http://reportaproblem.apple.com
    If the 'report a problem' link doesn't work then you can try contacting iTunes Support via this page : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • Why is Ink only ergonomic for right-handed people?

    The Ink feels great in the right-hand, the twist in the metal puts the pen in just the right position, but in the left-hand, the twist is the wrong direction. The point of the triangle rests on the hand. Ink is lightweight but the twisting the wrong direction makes it harder to control. When will left-handed people get their own? I'm kinda disappointed in Ink.

    Yes, I have worked with it in both my right and left hands. The twist is biased for right-handers (see my photos below to see how the Ink sits differently in the left hand. In the left hand, the point of the triangle rests on the hand. In the right hand, the flat of the triangle rests on the hand. But the shape of the triangle still provides a stable grip at the fingers, it won't twist out on you). After using it, I decided not to return it because to be honest, the case is great.
    Adonit (the actual manufacturers of Ink & Slide) makes a very similar product for less ($119) called the Adonit Jot Touch. In fact, it's basically the same thing, it has the Pixelpoint technology, the access to Creative Cloud, everything AND it is uniform/ambidextrous in design. So you might consider this option instead.
    The Slide has come in handy for quick drawing but with Adobe's free programs (specifically Line), the features of Slide are still available with the Adonit Jot Touch without actually having Slide. BUT - apart from the effort of returning Ink & Slide - I kept Ink because of its amazing case. The Jot Touch charges with a dongle, Ink charges inside a protective case. I work between digital and traditional media, so I put my Ink into my pencil case with wood pencils, micron pens, lead holders and sharpeners (messy stuff). The case is just great (see my photo below of Ink inside its case).
    As I stated above, the biggest problem with the handedness of Ink, is the fact that I paid $200 for it, it actually works great and is not uncomfortable, just not equal. Know what I mean?

  • JSplitPane keeps right-hand component same size

    I have a JInternalFrame... on its content pane sits a JScrollPane. Viewport view of JScrollPane is set to a JSplitPane.
    I want to make it so that, when the split pane divider is pulled either way (left or right), the right-hand component stays the same size... i.e. the width of the JSplitPane grows or diminishes accordingly. Obviously you would then see this reflected in the width and position of the slider of the horizontal scroll bar of the JScrollPane.
    I'm finding this very difficult to implement. To the point that I'm wondering whether I have to subclass BasicSplitPaneUI.BasicHorizontalLayoutManager ... which itself is not clear because the ** horizontal ** layout manager can't be instantiated (although its subclass the ** vertical ** layout manager can be).
    Alternatively I'm wondering if maybe JSplitPane is just not designed for such a purpose... in which case which layout manager would be appropriate? I'm not an expert on them... but do any of them actually give you a bar of some kind by which to resize one of their components? This is the attraction of JSplitPane for me...
    Another possibility might I suppose be a 1 row x 2 col JTable... but I'd like to find a split pane solution ideally

    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Dimension;
    import java.awt.EventQueue;
    import java.awt.Point;
    import java.awt.Rectangle;
    import java.awt.event.AdjustmentEvent;
    import java.awt.event.AdjustmentListener;
    import java.awt.event.ComponentAdapter;
    import java.awt.event.ComponentEvent;
    import java.beans.PropertyChangeEvent;
    import java.beans.PropertyChangeListener;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollBar;
    import javax.swing.JScrollPane;
    import javax.swing.JDesktopPane;
    import javax.swing.JInternalFrame;
    import javax.swing.JSplitPane;
    public class SimpleJSplitPaneTest {
         public static void main(String[] a_args) {
              EventQueue.invokeLater(new Runnable() {
                   public void run() {
                        new SimpleJSplitPaneTest();
         SimpleJSplitPaneTest() {
              final JFrame f_mainFrame = new JFrame( "Simple JSplitPane test");
              f_mainFrame.setDefaultCloseOperation( JFrame.DISPOSE_ON_CLOSE );
              f_mainFrame.setSize(800, 400);
              JDesktopPane desktopPane = new JDesktopPane();
              f_mainFrame.getContentPane().add(desktopPane, BorderLayout.CENTER );
              desktopPane.setBackground( Color.blue );
              final JInternalFrame f_internalFrame = new JInternalFrame("New JInternalFrame", true, true, true, true );
              f_internalFrame.setResizable(true);
              f_internalFrame.setBounds(0, 0, 450, 250 );
              desktopPane.add(f_internalFrame);
              JScrollPane mainScrollPane = new JScrollPane();
              f_internalFrame.getContentPane().add(mainScrollPane, BorderLayout.CENTER );
              // rh panel of main split pane
              final JPanel f_rHPanel = new JPanel();
              // main split pane
              final JSplitPane f_mainSplitPane = new JSplitPane(){
                   public boolean isValidateRoot(){
                        boolean result = super.isValidateRoot();
                        p( "== isValidateRoot - result: " + result );
                        return result;
                   public void resetToPreferredSizes(){
                        p( "== resetToPreferredSizes" );
                        super.resetToPreferredSizes();
                   public void doLayout(){
                        int lastDivLoc = this.getLastDividerLocation();
                        int presDivLoc = this.getDividerLocation();
                        int diff = presDivLoc - lastDivLoc;
                        p( "== diff " + diff );
                        if( diff != -1 ){
                             Dimension mainPrefSize = this.getPreferredSize();
                             Dimension mainSize = this.getSize();
    //                         this.setPreferredSize( new Dimension( mainPrefSize.width + diff, mainPrefSize.height ));
    // THIS DOESN'T WORK:
    //                         this.setSize( new Dimension( mainSize.width + diff, mainSize.height ));
                             Dimension rHPrefSize = f_rHPanel.getPreferredSize();
                             Dimension rHSize = f_rHPanel.getSize();
    //                         f_rHPanel.setPreferredSize( new Dimension( rHPrefSize.width + diff, rHPrefSize.height ));
    // THIS DOESN'T WORK:
    //  Whoops! Of course it's the LEFT panel which needs to have its "pref size" or "size" altered after a divider
    // movement... but that doesn't work either... thing is, I have been experimenting with code quite a bit... best thing
    // is to ignore this "remnant" code ...
    //                         f_rHPanel.setSize( new Dimension( rHSize.width + diff, rHSize.height ));
                        p( "== doLayout" );
                        super.doLayout();
                   public void validate(){
                        p( "== validate" );
                        super.validate();
              mainScrollPane.setViewportView(f_mainSplitPane);
              // lh panel of main split pane
              final JPanel f_lHPanel = new JPanel();
              f_lHPanel.setBackground( Color.red );
              f_mainSplitPane.setLeftComponent(f_lHPanel);
              f_lHPanel.setPreferredSize( new Dimension( 300, 200 ));
              f_lHPanel.setSize( new Dimension( 300, 200 ));
              f_mainSplitPane.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY, new PropertyChangeListener() {
                   @Override
                   public void propertyChange(PropertyChangeEvent pce) {
                        System.out.println( "PROP CHANGE: main div changed");
                        int lastDivLoc = f_mainSplitPane.getLastDividerLocation();
                        int presDivLoc = f_mainSplitPane.getDividerLocation();
                        int diff = presDivLoc - lastDivLoc;
    // NOTHING HERE SEEMED TO WORK
                        printSizes( "  f_lHPanel", f_lHPanel );
                        printSizes( "  f_rHPanel", f_rHPanel );
                        printSizes( "  f_mainSplitPane", f_mainSplitPane );
              f_rHPanel.addComponentListener( new ComponentAdapter(){
              public void componentResized(ComponentEvent e){
                   System.out.println( "RHPanel resized" );
                   int lastDivLoc = f_mainSplitPane.getLastDividerLocation();
                   int presDivLoc = f_mainSplitPane.getDividerLocation();
                   int diff = presDivLoc - lastDivLoc;
                   p( "  diff: " + diff );
                   Dimension mainPrefSize = f_mainSplitPane.getPreferredSize();
                   Dimension mainSize = f_mainSplitPane.getSize();
    //               f_mainSplitPane.setPreferredSize( new Dimension( mainPrefSize.width + diff, mainPrefSize.height ));
    // THIS DOESN'T WORK:
    //               f_mainSplitPane.setSize( new Dimension( mainSize.width + diff, mainSize.height ));
                   printSizes( "  f_lHPanel", f_lHPanel );
                   printSizes( "  f_rHPanel", f_rHPanel );
                   printSizes( "  f_mainSplitPane", f_mainSplitPane );
              f_mainSplitPane.setRightComponent(f_rHPanel);
              f_rHPanel.setPreferredSize( new Dimension( 500, 200 ));
              f_rHPanel.setSize( new Dimension( 500, 200 ));
              f_internalFrame.setVisible(true);
              f_mainFrame.setVisible(true);
         public static void printSizes( String name, Component comp ){
              System.out.println( name + ": size: " + comp.getSize() + "; pref size: " + comp.getPreferredSize() );
         private static void p(String s) {
              System.out.println(s);
    }as the main JSplitPane's divider is dragged right or left, I have found no way of keeping the main JSplitPane's RH component (JPanel) the same size... the problem is that if you, for example, find out the pixel change of the divider, and alter the size of main JSplitPane accordingly, it appears that a "do layout" event is called...
    I've tried quite a few permutations and various listeners... either I get an endless loop of events calling events, or the divider simply snaps back to where it was... or the "printSizes" print-outs show that things are not the sizes they appear (which of course simply means that a subsequent event occurs which changes the sizes)...
    And, as I said, I don't know how to subclass BasicSplitPaneUI.BasicHorizontalLayoutManager

  • When I open an email, my computer won't go to the link listed, or when I am doing research the same thing, then I see a ALLOW in the upper right hand corner of the screen and I have to click on that. What happened and how do I fix this?

    Somehow my settings have changed. When I open an email and there is a link, my computer won't allow it, also when I am doing a search, my computer won't allow certain links to open.
    What I see is "ALLOW" in the upper right hand corner of the screen, and I have to click on that in order to continue my email or do a search. How did this suddenly happen and how do I change it back to being able to roam the Internet without having to click on ALLOW all the time?
    Also, I set up Google as my home page, but it won't list Email or any other options. I have to type in Google in the Google box, then Email appears. How do I get the right Google set up as my home page so I can access Email without jumping through hoops.
    Thanking you so much for your time and consideration.
    Sincerely,
    [email protected]

    Sign out of the iTunes Store. Sign in again.
    tt2

Maybe you are looking for

  • How does "New Window Containing Selection" under "Services" work in Snow Leopard?

    Hello all, In OSX 10.5.8 creating simple clickable server paths was a cinch via Services > TextEdit > New Window Containing Selection [please see reference images]. However, in Snow Leopard this option is a grand mystery. Our online searches have bee

  • CRVS2010 Beta - FormulaException when adding condition for group summaries

    Hello, I have an application that makes some changes in a report and show the preview in a WPF Viewer. At some point, I define the following formula: crFormulaFieldDefinition.Text = "Maximum({Categories.CategoryID},{Products.Discontinued},'any change

  • Set variable samples per chanel from counter

    Hi, all. I have to set variable samples per chanel for sample clock. I want to take that samples from counter input with different number of edges for every second (different speed of metal plate). What can i do for that task? Is there a god example

  • How to have item unit price in BP currency during sales invoice creating ?

    Hi all, is there a way when you keypunch a sales invoice to have the unit price automatically converted to customer currency (as it is done for total amount of the invoice line) ? Thanks for your help. Regards

  • Trouble with Pages 5

    How do I get rid of Pages 5 after I downloaded Mavericks? (Maybe a huge mistake). I still have Pages 09 on my dock but every time I open a document it opens as Pages 5, which is NOT user friendly at all. I tried opening up my documents in Spotlight,