{"id":2323,"date":"2014-06-16T08:50:06","date_gmt":"2014-06-15T23:50:06","guid":{"rendered":"http:\/\/oohito.com\/nqthm\/?p=2323"},"modified":"2014-06-16T08:50:06","modified_gmt":"2014-06-15T23:50:06","slug":"ros%e3%81%a7leapmotion%e3%81%ae%e3%83%87%e3%83%bc%e3%82%bf%e3%82%92%e5%be%97%e3%82%8b","status":"publish","type":"post","link":"https:\/\/oohito.com\/nqthm\/archives\/2323","title":{"rendered":"ROS\u3067LeapMotion\u306e\u30c7\u30fc\u30bf\u3092\u5f97\u308b"},"content":{"rendered":"<p>LeapMotion\u3092\u8cb7\u3063\u3066\u4ee5\u6765\u3001\u5869\u6f2c\u3051\u72b6\u614b\u3060\u3063\u305f\u306e\u3067\u4f7f\u3063\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u305f\u3002<br \/>\n\u3068\u3044\u3063\u3066\u3082\u3001\u65e2\u306b\u5148\u9054\u304cROS\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u4f5c\u6210\u3057\u3066\u3044\u308b\u306e\u3067\u305d\u308c\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u7a0b\u5ea6\u3002<br \/>\n\u516c\u5f0f\u306b\u306fros-groovy-leap-motion\u3068\u3044\u3046\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u51fa\u3066\u3044\u308b\u306e\u3067\u3001\u305d\u308c\u3092\u5c0e\u5165\u3059\u308b\u3002<br \/>\n\u5143\u30cd\u30bf\u306f\u3053\u3061\u3089\u3002<a href=\"http:\/\/wiki.ros.org\/leap_motion\">http:\/\/wiki.ros.org\/leap_motion<\/a><br \/>\n<!--more--><\/p>\n<h2>LeapSDK\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>ROS\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u5c0e\u5165\u306b\u5148\u7acb\u3063\u3066LeapSDK\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5fc5\u8981\u3068\u306a\u308b\u3002<br \/>\n<a href=\"https:\/\/developer.leapmotion.com\/\">Leap Motion Developer Portal<\/a>\u306e\u30b5\u30a4\u30c8\u304b\u3089Linux\u7528\u306eSDK\u3092\u5165\u624b\u3057\u3066\u5c55\u958b\u3059\u308b\u3068 LeapDeveloperKit_2.0.1+15831_linux \u306e\u3088\u3046\u306a\u30d5\u30a9\u30eb\u30c0\u304c\u3067\u304d\u308b\u3002\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u8a73\u7d30\u306fREADME\u30d5\u30a1\u30a4\u30eb\u3092\u898b\u308c\u3070\u308f\u304b\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u3002<br \/>\n\u30d5\u30a9\u30eb\u30c0\u306b\u306f\u3001Leap-2.0.1+15831-x64.deb\u3084Leap-2.0.1+15831-x86.deb\u3068\u3044\u3063\u305fdebian\u7528\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u306e\u3067\u300164bit\u7248\u306a\u3089x64\u306e\u65b9\u3092\u300132bit\u7248\u306a\u3089x86\u306e\u65b9\u3092\u305d\u308c\u305e\u308c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002\uff08\u3061\u306a\u307f\u306b\u4e0b\u8a18\u306f32bit\u7248\u306e\u5834\u5408\uff09<\/p>\n<pre>sudo dpkg --install Leap-1.2.0-x86.deb<\/pre>\n<p>\u305d\u306e\u5f8c\u3001LeapSDK\u30d5\u30a9\u30eb\u30c0\u3092\u9069\u5f53\u306a\u5834\u6240\uff08\u4f8b\u3048\u3070\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\uff09\u306b\u79fb\u52d5\u3059\u308b\u3002\u307e\u305f\u3001Python\u304c\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u898b\u3064\u3051\u3089\u308c\u308b\u3088\u3046\u306b\u74b0\u5883\u5909\u6570PYTHONPATH\u3092\u8a2d\u5b9a\u3059\u308b\u3002\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4ee5\u4e0b\u306bLeapSDK\u3092\u7f6e\u3044\u305f\u5834\u5408\u306b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3059\u308b\u3002<\/p>\n<pre>export PYTHONPATH=$PYTHONPATH:$HOME\/LeapSDK\/lib\/x86:$HOME\/LeapSDK\/lib<\/pre>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u76f4\u5f8c\u306fLeap Motion\u306e\u30c7\u30fc\u30e2\u30f3\uff08leapd\uff09\u304c\u8d77\u52d5\u3057\u3066\u3044\u306a\u3044\u5834\u5408\u3082\u3042\u308b\u306e\u3067\u8d77\u52d5\u3057\u3066\u304a\u304f\u3002<\/p>\n<pre>leapd &<\/pre>\n<p>LeapControlPanel\u3092\u8d77\u52d5\u3059\u308b\u3068\u901a\u77e5\u30a8\u30ea\u30a2\u306bLeapMotion\u306e\u30a2\u30a4\u30b3\u30f3\u304c\u8868\u793a\u3055\u308c\u308b\u306e\u3067\u9069\u5f53\u306b\u8a2d\u5b9a\u3057\u3066\u304a\u304f\u3002\u300c\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u300d\u30bf\u30d6\u306e\u4f4e\u30ea\u30bd\u30fc\u30b9\u30e2\u30fc\u30c9\u306b\u3057\u3066\u304a\u304f\u3068\u8ca0\u8377\u304c\u5c0f\u3055\u3044\u3089\u3057\u3044\u3002<\/p>\n<h2>ROS\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>\u5358\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3059\u308c\u3070\u826f\u3044\u3002<\/p>\n<pre>sudo apt-get install ros-groovy-leap-motion<\/pre>\n<h2>leap_motion\u30ce\u30fc\u30c9\u306e\u5b9f\u884c<\/h2>\n<p>rosrun\u3092\u7528\u3044\u3066\u5b9f\u884c\u3059\u308b\u3002<\/p>\n<pre>rosrun leap_motion sender.py<\/pre>\n<p>\u8d77\u52d5\u3059\u308b\u3068\u6b8b\u5ff5\u306a\u304c\u3089\u30a8\u30e9\u30fc\u306e\u5d50\u3068\u306a\u308b\u3002<\/p>\n<pre>Traceback (most recent call last):\n  File \"\/opt\/ros\/groovy\/lib\/leap_motion\/leap_interface.py\", line 66, in on_frame\n    if not frame.hands.empty:\n  File \"\/home\/itoh\/LeapSDK\/lib\/Leap.py\", line 831, in <lambda>\n    __getattr__ = lambda self, name: _swig_getattr(self, HandList, name)\n  File \"\/home\/itoh\/LeapSDK\/lib\/Leap.py\", line 57, in _swig_getattr\n    raise AttributeError(name)\nAttributeError: empty<\/lambda><\/pre>\n<p>\u8a73\u7d30\u306f\u308f\u304b\u3089\u306a\u3044\u304cLeapSDK\u306eAPI\u306e\u5909\u66f4\u306b\u3088\u308b\u3082\u306e\u306e\u3088\u3046\u3060\u3002\u5bfe\u5fdc\u3059\u308b\u306b\u306f\u3001\/opt\/ros\/groovy\/lib\/leap_motion\/leap_interface.py\u3092\u4fee\u6b63\u3057\u3066\u300165\u884c\u76ee\u3092\u5909\u66f4\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002\u5177\u4f53\u7684\u306b\u306f\u3001<\/p>\n<pre>if not frame.hands.empty:<\/pre>\n<p>\u3053\u308c\u3092\u3001<\/p>\n<pre>if not frame.hands.is_empty:<\/pre>\n<p>\u306e\u3088\u3046\u306b\u3059\u308b\u3002<br \/>\n\u3053\u308c\u3067rosrun\u3067\u5b9f\u884c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u3001LeapMotion\u306e\u4e0a\u306b\u624b\u3092\u304b\u3056\u3059\u3068\/leapmotion\/data\u3068\u3044\u3046\u30c8\u30d4\u30c3\u30af\u3067\u5ea7\u6a19\u5024\u3092\u5f97\u3089\u308c\u308b\u3088\u3046\u306b\u306a\u308b\u3002<\/p>\n<pre>rostopic echo \/leapmotion\/data<\/pre>\n<p>\u5f97\u3089\u308c\u308b\u30c7\u30fc\u30bf\u306f\u3053\u3093\u306a\u611f\u3058\u3002<\/p>\n<pre>header:\n  seq: 5042\n  stamp:\n    secs: 0\n    nsecs: 0\n  frame_id: ''\ndirection:\n  x: 0.932909011841\n  y: 0.0798121988773\n  z: -0.351156324148\nnormal:\n  x: 0.12350487709\n  y: -0.986899614334\n  z: 0.103806167841\npalmpos:\n  x: 51.1228790283\n  y: 163.470443726\n  z: 170.911972046\nypr:\n  x: 130.047144825\n  y: 12.8048776592\n  z: 94.8898589823\n---<\/pre>\n<h2>rosbridge\u3078\u306e\u5bfe\u5fdc<\/h2>\n<p>\u666e\u901a\u306e\u4f7f\u3044\u65b9\u3067\u3042\u308c\u3070\u4e0a\u8a18\u3067\u826f\u3044\u306e\u3060\u304c\u3001rosbridge\u7d4c\u7531\u3067\u4f7f\u3044\u305f\u3044\u5834\u5408\u306b\u306f\u554f\u984c\u304c\u751f\u3058\u308b\uff08\u304b\u3082\u3057\u308c\u306a\u3044\uff09\u3002<\/p>\n<pre>rosbridge rosbridge_server rosbridge_websocket.launch<\/pre>\n<p>\u4e0a\u8a18\u3067rosbridge\u3092\u8d77\u52d5\u3057\u3001\u5916\u90e8\u304b\u3089\u63a5\u7d9a\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30a8\u30e9\u30fc\u304c\u8868\u793a\u3055\u308c\u308b\u3002<\/p>\n<pre>subscribe: Unable to load the manifest for package leapmotion.<\/pre>\n<p>\u3069\u3046\u3084\u3089\u3001ROS\u304c\/leapmotion\/data\u3068\u3044\u3046\u30c8\u30d4\u30c3\u30af\u304b\u3089\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u898b\u3064\u3051\u3089\u308c\u306a\u3044\u3088\u3046\u3067\u3042\u308b\u3002\u3053\u308c\u306f\u3001\u30c8\u30d4\u30c3\u30af\u540d\u3092\/leapmotion\/data\u304b\u3089\/leap_motion\/data\u306e\u3088\u3046\u306b\u30d1\u30c3\u30b1\u30fc\u30b8\u540d\u3092\u542b\u3080\u3088\u3046\u306b\u5909\u3048\u308b\u3053\u3068\u3067\u5bfe\u5fdc\u3067\u304d\u308b\u3002\u3053\u308c\u306b\u306f\u3001\/opt\/ros\/groovy\/lib\/leap_motion\/sender.py\u306e11\u884c\u76ee\u3092\u4fee\u6b63\u3059\u308b\u3002<\/p>\n<pre>pub_ros   = rospy.Publisher('leapmotion\/data',leapros)<\/pre>\n<p>\u3053\u308c\u3092\u3001<\/p>\n<pre>pub_ros   = rospy.Publisher('leap_motion\/data',leapros)<\/pre>\n<p>\u306e\u3088\u3046\u306b\u3059\u308b\u3002<br \/>\n\u5f53\u7136\u306a\u304c\u3089\u3001\u4e0a\u8a18\u306e\u4fee\u6b63\u4ee5\u5f8c\u306f \/leap_motion\/data \u3068\u3044\u3046\u30c8\u30d4\u30c3\u30af\u540d\u3067subscribe\u3059\u308b\u3002<br \/>\n\uff08\u5b9f\u306f\u3001\u30d6\u30ed\u30b0\u8a18\u4e8b\u3092\u66f8\u304f\u305f\u3081\u306b\u30d1\u30c3\u30b1\u30fc\u30b8\u540d\u3092\/leapmotion\/data\u306b\u623b\u3057\u305f\u3089\u3001\u305d\u306e\u307e\u307e\u3067\u3082\u3046\u307e\u304f\u884c\u304f\u3053\u3068\u304c\u308f\u304b\u3063\u305f\u3002\u7406\u7531\u306f\u4e0d\u660e\u3060\u304cROS\u306e\u65b9\u3067\u30c8\u30d4\u30c3\u30af\u3068\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u5bfe\u5fdc\u3092\u4fdd\u6301\u3057\u3066\u3044\u308b\u306e\u304b\u3082\u3057\u308c\u306a\u3044\uff09<br \/>\nLeapMotion\u3067\u5f97\u3089\u308c\u305f\u30c7\u30fc\u30bf\u3092\u3069\u3046\u3059\u308b\u304b\u306f\u3053\u308c\u304b\u3089\u8003\u3048\u308b\u4e88\u5b9a\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>LeapMotion\u3092\u8cb7\u3063\u3066\u4ee5\u6765\u3001\u5869\u6f2c\u3051\u72b6\u614b\u3060\u3063\u305f\u306e\u3067\u4f7f\u3063\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u305f\u3002 \u3068\u3044\u3063\u3066\u3082\u3001\u65e2\u306b\u5148\u9054\u304cROS\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u4f5c\u6210\u3057\u3066\u3044\u308b\u306e\u3067\u305d\u308c\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u7a0b\u5ea6\u3002 \u516c\u5f0f\u306b\u306fros-groovy-leap-motion\u3068\u3044&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,11],"tags":[],"class_list":["post-2323","post","type-post","status-publish","format-standard","hentry","category-leapmotion","category-ros"],"_links":{"self":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/posts\/2323","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/comments?post=2323"}],"version-history":[{"count":0,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/posts\/2323\/revisions"}],"wp:attachment":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/media?parent=2323"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/categories?post=2323"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/tags?post=2323"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}