Develop Leap Motion in ROS Kinetic: Hello World

来源:互联网 发布:淘宝策划做什么工作 编辑:程序博客网 时间:2024/04/18 08:58

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/srcgit clone https://github.com/qqfly/leap_motion.gitcd YOUR_WORK_SPACEcatkin_make

Step 3 Export python path.
You must make sure that python can find the essential modules.

source YOUR_WORK_SPACE/devel/setup.bashexport 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 terminalLeapControlPanel #A new terminalcd YOUR_WORK_SPACEroscore #A new terminalrosrun 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.

原创粉丝点击