ROS_Kinetic_25 在ubuntu16.04使用Leap_motion并作为手势输入控制Gazebo中的机器人

ROS_Kinetic_25 在ubuntu16.04使用Leap_motion并作为手势输入控制Gazebo中的机器人

 

先附上资料网址:

1.  https://developer.leapmotion.com/

2.  https://github.com/warp1337/rosleapmotion

3.  https://github.com/CityU-MBE/leap_motion_ros

--------

1 安装Leap Motion


注意32bit和64bit版本。在终端输入:

~/LeapDeveloperKit$ sudo dpkg -i Leap-2.3.1+31549-x64.deb

会出现如下错误:


解决方法:

sudo gedit /lib/systemd/system/leapd.service

输入并保存:

[Unit]
Description=LeapMotion Daemon
After=syslog.target

[Service]
Type=simple
ExecStart=/usr/sbin/leapd

[Install]
WantedBy=multi-user.target

~/LeapDeveloperKit$ sudo ln -s /lib/systemd/system/leapd.service /etc/systemd/system/leapd.service

~/LeapDeveloperKit$ systemctl daemon-reload

接着安装就一切顺利了。

~/LeapDeveloperKit$ sudo dpkg -i Leap-2.3.1+31549-x64.deb


我开机不用Leap motion,安装成功后删除了一些配置等,具体说明也可以参考文档和官网。

2 启动测试Leap motion

~/LeapDeveloperKit$ sudo leapd


~/LeapDeveloperKit$ LeapControlPanel


3 在ROS kinetic中使用Leap motion

需要按照相关功能包中的说明文件修改编译环境库或很少的源码,编译成功后,


使用下面命令测试:

rosrun leap_motion sender.py

rosrun leap_motion subscriber.py



4 遥控Gazebo中turtlebot的示例

roslaunch turtlebot_gazebo turtlebot_world.launch

roslaunch leap_motion_control leap_control_turtlebot.launch



原文地址:https://www.cnblogs.com/liang123/p/6324883.html