OS: Ubuntu 16.04.02 LTS x64
ROS: Kinetic
LeapSDK: V2 Tracking
There is a simple way to make use of Leap Motion in ROS, namely the leap_motion package. Let me show you how to deploy it to your system.
Step 1 Download and install V2 Tracking. Click here for detailed process.
Step 2 Download leap_motion package.
cd YOUR_WORK_SPACE/src
git clone https://github.com/qqfly/leap_motion.git
cd YOUR_WORK_SPACE
catkin_make
Step 3 Export python path.
You must make sure that python can find the essential modules.
source YOUR_WORK_SPACE/devel/setup.bash
export PYTHONPATH=$PYTHONPATH:$HOME/LeapSDK/lib:$HOME/LeapSDK/lib/x64
Step 4 Run the ROS driver. Connect the Leap Motion to your computer.
sudo leapd #A new terminal
LeapControlPanel #A new terminal
cd YOUR_WORK_SPACE
roscore #A new terminal
rosrun leap_motion send.py
Now you can see the data updating in the terminal window. Refer to here for more details.
In addition, if you encounter the following problem:
[Info] Tracking initialized
[Critical] Secure WebSocket server failed to start
[Critical] WebSocket server failed to start
[Critical] Have you tried running as root/Administrator?
after you type
sudo leapd
It’s due to the problem that more than one leapd service is runing. Then you can type
sudo service leapd stop
to stop the leapd service and restart it by leapd.