Skip to content
Leap Motion ROS integration
C++ Python CMake
Branch: hydro
Clone or download
Pull request Compare This branch is 4 commits ahead, 5 commits behind warp1337:master.
nowittyusername Merge pull request #54 from axkoenig/hydro
Publish direction and normal. Changed RPY to correct order.
Latest commit 5a7bbc4 Aug 17, 2019


ROS driver for the Leap Motion Controller

Build Status


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


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.


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/, lib/x86/, lib/x86/, lib/x64/, lib/x64/ lib/, lib/libLeap.dylib.


# 64-bit operating system

# 32-bit operating system

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


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

    cd ~/catkin_ws/src
    git clone
    cd ~/catkin_ws

2. Start the Leap control panel in another terminal.


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.

You can’t perform that action at this time.