Skip navigation

Community

Currently Being Moderated

Using the Leap Motion Controller Toolkit

VERSION 2  Click to view document history
Created on: Aug 22, 2013 10:36 PM by MilanR - Last Modified:  Sep 26, 2013 2:22 PM by MilanR

Step A: Install the Leap Motion Controller Toolkit for LabVIEW


See the Instructions available in the
Installing the Leap Motion Controller Toolkit for LabVIEW tutorial.


Step B: Install the Leap Motion Controller Driver and Test the Example Programs

 

See the Instructions available in the Getting Started with the Leap Motion Controller Toolkit tutorial.

 

Step C: Understanding the Data in the Leap Motion Toolkit

 

Overview:

The toolkit consists of 3 major VIs:


1.  Leap Open

Leap Open.png

Use this VI initially to open a session with the Leap Motion device.  It returns a reference which must be passed to subsequent uses of Leap VIs.


2.  Leap Read

Leap Read.png

This VI returns current information from the Leap Motion device in the form of a Frame.  This Frame contains positional data on objects such as hands and pointables as well as gesture information.  A general description of some of the data is provided below.  The structure of the Frame in LabVIEW is made to mimic the class structure within the Leap Motion .NET API.  For a comprehensive overview of all the data contained in the Frame please see the API documentation in the Leap Motion SDK.

  • Frame
    • ID - Unique ID of the individual frame
    • Timestamp - Capture time of the frame in microseconds
    • Hands - A list of hand objects observed by the Leap.  The order of these objects is arbitrary
      • Hand - Contains physical characteristic information of a detected hand
        • Pointables - Contains physical characteristic information of a detected finger or tool
  • Key Tap Gestures - Contains information regarding key tapping gestures from fingers or tools
  • Screen Tap Gestures - Contains information regarding screen tapping gestures from fingers or tools
  • Circle Gestures - Contains information regarding circular gestures from fingers or tools
  • Swipe Gestures - Contains information regarding swiping gestures from fingers or tools


3.  Leap Close

Leap Close.png

Use this VI as your program ends to close the session with the Leap Motion device.  After this VI executes, the Leap Reference will no longer be valid.

 

Using the Leap Motion Controller Toolkit in LabVIEW:

In order to start programming with the toolkit in LabVIEW, navigate to the block diagram and access the Leap VIs from the Functions Palette:

Leap Palette.png

To create a simple program interfacing with the Leap use these 3 VIs to open a session, loop through reading frames until the stop button is pressed, then close the session:

Leap Example.png

Running this simple program with a Leap Motion device connected will allow you to read the device's data in LabVIEW.  Information in the frame cluster such as hand and gesture data may be used in your application for programmatic purposes at this point.  For further examples see the example VIs located in <LabVIEW Install Directory>\examples\LVH\Leap Motion Controller Toolkit\Examples.



Comments (1)