Skip to content

Latest commit

 

History

History
80 lines (52 loc) · 3.15 KB

README.md

File metadata and controls

80 lines (52 loc) · 3.15 KB

ROS LEAP MOTION

ROS driver for the Leap Motion Controller

Build Status

REQUIREMENTS

You should have ROS Kinetic or a newer version installed on your device and the Leap Motion SDK for Linux.

FEATURES

Currently, this ROS package supports one person (left and right arm), publishing raw camera images from the controller, basic visualization using RViz and a pointcloud2 generated from stereo_image_proc node.

There is also a filter node implementing a 2nd-order Butterworth lowpass filter that is used to filter the hand x, y, z coordinates coming from the Leap Controller via Human.msg. For more information refer to Julius O. Smith III, Intro to Digital Filters with Audio Applications.

INSTALLATION

Python API installation

1. If you wish to use the old deprecated Python API you need to append the location of your LeapSDK to your environment variables. This step differs depending on where you saved the SDK. The LeapSDK folder should contain the following files: lib/Leap.py, lib/x86/LeapPython.so, lib/x86/libLeap.so, lib/x64/LeapPython.so, lib/x64/libLeap.so lib/LeapPython.so, lib/libLeap.dylib.

Example:

# 64-bit operating system
export PYTHONPATH=$PYTHONPATH:$HOME/LeapSDK/lib:$HOME/LeapSDK/lib/x64

# 32-bit operating system
export PYTHONPATH=$PYTHONPATH:$HOME/LeapSDK/lib:$HOME/LeapSDK/lib/x86

2. (OPTIONAL) You can edit your ~/.bashrc file to remove the need to export the location of your LeapSDK every time you open a new shell. Just append the LeapSDK location to the end of the PYTHONPATH.

# 64-bit operating system
echo "export PYTHONPATH=$PYTHONPATH:$HOME/LeapSDK/lib:$HOME/LeapSDK/lib/x64" >> ~/.bashrc
source ~/.bashrc

# 32-bit operating system
echo "export PYTHONPATH=$PYTHONPATH:$HOME/LeapSDK/lib:$HOME/LeapSDK/lib/x86" >> ~/.bashrc
source ~/.bashrc

Usage

1. Just go to the src folder of your catkin workspace.

    cd ~/catkin_ws/src
    git clone https://github.com/ros-drivers/leap_motion.git
    cd ~/catkin_ws
    catkin_make

2. Start the Leap control panel in another terminal.

LeapControlPanel

3. (OPTIONAL) If it gives you an error about the leap daemon not running, stop the LeapControlPanel have a look here and use the following command:

sudo service leapd restart

4. Source your current catkin workspace.

source ~/catkin_ws/devel/setup.bash

5. Launch the demo.launch file to see if you have set everything up correctly. If you wish to enable a lowpass filter change "enable_filter" to true in filter_params.yaml file.

roslaunch leap_motion demo.launch

6. You are done! You should see an RViz window opening up displaying the detected hands from the controller.