{"id":1661,"date":"2022-06-28T17:35:29","date_gmt":"2022-06-28T08:35:29","guid":{"rendered":"https:\/\/techshare.co.jp\/faq\/?p=1661"},"modified":"2023-06-08T16:35:06","modified_gmt":"2023-06-08T07:35:06","slug":"go1_ultrasonic","status":"publish","type":"post","link":"https:\/\/techshare.co.jp\/faq\/unitree\/go1_ultrasonic.html","title":{"rendered":"\u3010Unitree Go1\u3011\u8d85\u97f3\u6ce2\u30bb\u30f3\u30b5\u30fc\u5024\u306e\u53d6\u5f97\u65b9\u6cd5\u306b\u3064\u3044\u3066"},"content":{"rendered":"<div style=\"text-align: center\"><img decoding=\"async\" src=\"https:\/\/techshare.co.jp\/faq\/wp-content\/uploads\/2022\/06\/ultrasonic_go1_02.png\" alt=\"\" width=\"60%\" \/><\/div>\n<h3>\u521d\u3081\u306b<\/h3>\n<hr \/>\n<p>Unitree Go1\u306e\u4e00\u90e8\u6a5f\u7a2e\u306b\u306f\u3001\u982d\u90e8\u3001\u53f3\u8107\u8179\u3001\u5de6\u8107\u8179\u306e\uff13\u30ab\u6240\u306b\u8d85\u97f3\u6ce2\u30bb\u30f3\u30b5\u30fc\u304c\u642d\u8f09\u3055\u308c\u3066\u3044\u307e\u3059\u3002\uff082022\u5e747\u6708\u4ee5\u524d\u306b\u3054\u8cfc\u5165\u306e\u5834\u5408\uff09<br \/>\n\u672c\u7a3f\u3067\u306f\u3001Unitree Go1\u306b\u642d\u8f09\u3055\u308c\u305f<strong>\u8d85\u97f3\u6ce2\u30bb\u30f3\u30b5\u30fc\u306e\u5024<\/strong>\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3054\u6848\u5185\u3057\u307e\u3059\u3002<\/p>\n<p>\u57fa\u672c\u7684\u306b\u306f\u3001\u4ee5\u4e0b\u306e\uff13\u3064\u306e\u65b9\u6cd5\u304c\u8003\u3048\u3089\u308c\u307e\u3059\u3002<\/p>\n<ol>\n<li><strong>ROS\u306etopic<\/strong>\u3088\u308a\u53d6\u5f97\u3059\u308b\u65b9\u6cd5<\/li>\n<li><strong>rangeObstacle<\/strong>\u3088\u308a\u53d6\u5f97\u3059\u308b\u65b9\u6cd5<\/li>\n<li><strong>include\u30d5\u30a1\u30a4\u30eb<\/strong>\u3092\u7528\u3044\u3066\u53d6\u5f97\u3059\u308b\u65b9\u6cd5<\/li>\n<\/ol>\n<p>\u9806\u756a\u306b\u8aac\u660e\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<h3>\u76ee\u6b21<\/h3>\n<hr \/>\n<ul>\n<li><a href=\"#0\">\u74b0\u5883<\/a><\/li>\n<li><a href=\"#1\">\uff11\uff0eROS\u306etopic<\/a><\/li>\n<li><a href=\"#2\">\uff12\uff0erangeObstacle<\/a><\/li>\n<li><a href=\"#3\">\uff13\uff0einclude\u30d5\u30a1\u30a4\u30eb<\/a><\/li>\n<li><a href=\"#4\">\u304a\u308f\u308a\u306b<\/a><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3 id=\"0\">\u74b0\u5883<\/h3>\n<hr \/>\n<p>\u74b0\u5883\u306f\u3001\u6b21\u306e\u3088\u3046\u306a\u3082\u306e\u3092\u60f3\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u6a5f\u7a2e: \u8d85\u97f3\u6ce2\u30bb\u30f3\u30b5\u30fc\u642d\u8f09\u306e<strong>R&amp;D(Edu), R&amp;D+(Edu+)<\/strong>\uff08Pro\u3067\u306f\u306a\u3044\u3082\u306e\uff09<\/li>\n<li>unitree_legged_sdk:<strong> v3.8.0<\/strong>\uff08v3.5.1\u3067\u3082\u554f\u984c\u306a\u3044\u3067\u3059\uff09<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3 id=\"1\">\uff11\uff0eROS\u306etopic<\/h3>\n<hr \/>\n<p>Go1\u306e\u96fb\u6e90\u3092\u3064\u3051\u308b\u3068\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067RaspberryPi\u3092\u4e2d\u5fc3\u3068\u3057\u305fROS\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u304c\u8d77\u52d5\u3057\u307e\u3059\u3002\u305d\u306e\u969b\u3001\u6d41\u308c\u308btopic\u306b\u3001<\/p>\n<p style=\"margin: 15px\"><strong>\/range_ultrasonic_face<\/strong><br \/>\n<strong>\/range_ultrasonic_left<\/strong><br \/>\n<strong>\/range_ultrasonic_right<\/strong><\/p>\n<p>\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u3001\u3053\u3061\u3089\u3088\u308a\u8d85\u97f3\u6ce2\u30bb\u30f3\u30b5\u30fc\u306e\u30c7\u30fc\u30bf\u53d6\u5f97\u304c\u53ef\u80fd\u3067\u3059\u3002<br \/>\n\u5177\u4f53\u7684\u306a\u624b\u9806\u4f8b\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\uff1a<\/p>\n<h4>Step.1<\/h4>\n<p>Go1\u5185\u90e8\u306b\u30a2\u30af\u30bb\u30b9\u3057\u307e\u3059\u3002<br \/>\n\u4eca\u56de\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u8d77\u52d5\u3059\u308bGo1\u306e<strong>Wi-Fi<\/strong>\u304b\u3089\u7121\u7dda\u63a5\u7d9a\u3067\u884c\u3063\u3066\u307f\u307e\u3059\u3002<br \/>\nWi-Fi\u306b\u63a5\u7d9a\u5f8c\u3001\u30bf\u30fc\u30df\u30ca\u30eb\u304b\u3089\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5165\u529b\u3057\u307e\u3059\uff1a<\/p>\n<p style=\"padding: 10px;margin-bottom: 10px;border: 1px solid #606060;background-color: #fafafa;color: #000000\">$ ssh pi@192.168.12.1<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/techshare.co.jp\/faq\/wp-content\/uploads\/2022\/06\/0624_03.png\" alt=\"\" width=\"100%\" \/><br \/>\npassword\u306f123\u3092\u5165\u529b\u3002<\/p>\n<h4>Step.2<\/h4>\n<p>Go1\u5185\u90e8\u306eRaspberryPi\u306b\u5165\u308a\u307e\u3057\u305f\u3089\u3001\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5165\u529b\u3057\u307e\u3059\uff1a<\/p>\n<p style=\"padding: 10px;margin-bottom: 10px;border: 1px solid #606060;background-color: #fafafa;color: #000000\">$ rostopic echo \/range_ultrasonic_right<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/techshare.co.jp\/faq\/wp-content\/uploads\/2022\/06\/0624_02.png\" alt=\"\" width=\"100%\" \/><br \/>\n\u4e0a\u306e\u3088\u3046\u306a\u3082\u306e\u304c\u9ad8\u901f\u3067\u6d41\u308c\u3066\u3044\u308c\u3070\u3001\u6210\u529f\u3067\u3059\u3002<br \/>\n\u5bfe\u5fdc\u95a2\u4fc2\u306f\u305d\u308c\u305e\u308c\u3001<\/p>\n<p style=\"margin: 15px\"><strong>\/range_ultrasonic_face<\/strong>\uff1a\u982d\u90e8\u306e\u8d85\u97f3\u6ce2\u30bb\u30f3\u30b5\u30fc<br \/>\n<strong>\/range_ultrasonic_left<\/strong>\uff1a\u5de6\u8107\u8179\u306e\u8d85\u97f3\u6ce2\u30bb\u30f3\u30b5\u30fc<br \/>\n<strong>\/range_ultrasonic_right<\/strong>\uff1a\u53f3\u8107\u8179\u306e\u8d85\u97f3\u6ce2\u30bb\u30f3\u30b5\u30fc<\/p>\n<p>\u3068\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<h3 id=\"2\">\uff12\uff0erangeObstacle<\/h3>\n<hr \/>\n<p>unitree_legged_sdk\u306eHighState\u306b\u3042\u308brangeObstacle\u3088\u308a\u3001\u8d85\u97f3\u6ce2\u30bb\u30f3\u30b5\u30fc\u306e\u30c7\u30fc\u30bf\u53d6\u5f97\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<h4>Step.1<\/h4>\n<p>Go1\u5185\u90e8\u306e<strong>RaspberryPi<\/strong>\u306b\u63a5\u7d9a\u3057\u3001unitree_legged_sdk\u306b\u79fb\u52d5\u3057\u307e\u3059\u3002<br \/>\n\u4eca\u56de\u306f\u3001<strong>example_walk.cpp<\/strong>\u3092\u7de8\u96c6\u3057\u3066\u3001\u8d85\u97f3\u6ce2\u30bb\u30f3\u30b5\u30fc\u306e\u5024\u3092\u53d6\u5f97\u3057\u3088\u3046\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u5177\u4f53\u7684\u306b\u306f\u3001example_walk.cpp\u306b\u3064\u3044\u3066\u3001if\u6587\u3092\u524a\u9664&amp;<strong>\u4ee5\u4e0b\u306eprint\u6587\u3092\u8ffd\u52a0<\/strong>\uff1a<\/p>\n<p style=\"padding: 10px;margin-bottom: 10px;border: 1px solid #606060;background-color: #fafafa;color: #000000\">printf(&#8220;rangeObstacle= [ %f, %f, %f, %f]\\n&#8221;, state.rangeObstacle[0], state.rangeObstacle[1], state.rangeObstacle[2], state.rangeObstacle[3]);<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/techshare.co.jp\/faq\/wp-content\/uploads\/2022\/06\/0628_01.png\" alt=\"\" width=\"100%\" \/><br \/>\n\u3053\u308c\u3092example_walk-edit.cpp\u3068\u3044\u3046\u540d\u524d\u3067\u4fdd\u5b58\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3059\u3002<\/p>\n<h4>Step.2<\/h4>\n<p>\u4f5c\u3063\u305fexample_walk-edit.cpp\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3059\u308b\u305f\u3081\u306b\u3001<strong>CMakeLists.txt<\/strong>\u306b\u4ee5\u4e0b\u306e\u884c\u3092\u8ffd\u52a0\u3057\u307e\u3059\uff1a<\/p>\n<p style=\"padding: 10px;margin-bottom: 10px;border: 1px solid #606060;background-color: #fafafa;color: #000000\">add_executable(example_walk-edit example\/example_walk-edit.cpp)<br \/>\ntarget_link_libraries(example_walk-edit ${EXTRA_LIBS})<\/p>\n<h4>Step.3<\/h4>\n<p>\u30d3\u30eb\u30c9\u3057\u3066\u5b9f\u884c\u3057\u307e\u3059\uff1a<\/p>\n<p style=\"padding: 10px;margin-bottom: 10px;border: 1px solid #606060;background-color: #fafafa;color: #000000\">$ mkdir build<br \/>\n$ cd build<br \/>\n$ cmake ..<br \/>\n$ make<br \/>\n$ .\/example_walk-edit<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/techshare.co.jp\/faq\/wp-content\/uploads\/2022\/06\/0628_02.png\" alt=\"\" width=\"100%\" \/><br \/>\n\u4e0a\u306e\u3088\u3046\u306a\u3082\u306e\u304c\u9ad8\u901f\u3067\u6d41\u308c\u3066\u3044\u308c\u3070\u6210\u529f\u3067\u3059\u3002<br \/>\n\u5468\u308a\u3068\u306e\u5bfe\u5fdc\u304c\u53d6\u308c\u3066\u3044\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n<p>\u5bfe\u5fdc\u95a2\u4fc2\u306f\u305d\u308c\u305e\u308c\u3001<\/p>\n<p style=\"margin: 15px\"><strong>\/rangeObstacle[0]<\/strong>\uff1a\u982d\u90e8\u306e\u8d85\u97f3\u6ce2\u30bb\u30f3\u30b5\u30fc<br \/>\n<strong>\/rangeObstacle[1]<\/strong>\uff1a\u5de6\u8107\u8179\u306e\u8d85\u97f3\u6ce2\u30bb\u30f3\u30b5\u30fc<br \/>\n<strong>\/rangeObstacle[2]<\/strong>\uff1a\u53f3\u8107\u8179\u306e\u8d85\u97f3\u6ce2\u30bb\u30f3\u30b5\u30fc<\/p>\n<p>\u3068\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3 id=\"3\">\uff13\uff0einclude\u30d5\u30a1\u30a4\u30eb<\/h3>\n<hr \/>\n<p>Go1\u5185\u90e8<strong>RaspberryPi<\/strong>\u306e~\/Unitree\/autostart\/utrack\/<strong>ultrasonic_listener_example<\/strong>\u306b\u3001\u8d85\u97f3\u6ce2\u306e\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u3042\u308a\u307e\u3059\u3002\uff08\u74b0\u5883\u306b\u3088\u3063\u3066\u306fPATH\u304c\u5c11\u3005\u7570\u306a\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\uff09<br \/>\n\u3053\u306e\u30d5\u30a9\u30eb\u30c0\u5185\u306b\u3042\u308binclude\u30d5\u30a1\u30a4\u30eb\u3092\u7528\u3044\u308c\u3070\u3001\uff12\u6b21\u958b\u767a\u306b\u304a\u3051\u308b\u5229\u7528\u304c\u53ef\u80fd\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n\u5177\u4f53\u7684\u306a\u624b\u9806\u4f8b\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\uff1a<\/p>\n<h4>Step.1<\/h4>\n<p>Go1\u5185\u90e8\u306e<strong>RaspberryPi<\/strong>\u306b\u63a5\u7d9a\u3057\u3001ultrasonic_listener_example\u306b\u79fb\u52d5\u3057\u307e\u3059\uff1a<\/p>\n<p style=\"padding: 10px;margin-bottom: 10px;border: 1px solid #606060;background-color: #fafafa;color: #000000\">$ cd ~\/Unitree\/autostart\/utrack\/ultrasonic_listener_example<\/p>\n<h4>Step.2<\/h4>\n<p>include\/lcm_msgs\u5185\u3067\u3001<strong>\u30d8\u30c3\u30c0\u30fc\u30d5\u30a1\u30a4\u30eb<\/strong>\u3092\u751f\u6210\u3057\u307e\u3059\uff1a<\/p>\n<p style=\"padding: 10px;margin-bottom: 10px;border: 1px solid #606060;background-color: #fafafa;color: #000000\">$ cd include\/lcm_msgs<br \/>\n$ lcm-gen -x ultrasonic_data.lcm<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/techshare.co.jp\/faq\/wp-content\/uploads\/2022\/06\/0624_10.png\" alt=\"\" width=\"100%\" \/><br \/>\n\u30d8\u30c3\u30c0\u30fc\u30d5\u30a1\u30a4\u30eb\u304c\u751f\u6210\u3055\u308c\u3066\u3044\u308c\u3070\u3001\u6210\u529f\u3067\u3059\u3002<\/p>\n<h4>Step.3<\/h4>\n<p>\u30d3\u30eb\u30c9\u3057\u3066\u5b9f\u884c\u3057\u307e\u3059\uff1a<\/p>\n<p style=\"padding: 10px;margin-bottom: 10px;border: 1px solid #606060;background-color: #fafafa;color: #000000\">$ cd ~\/Unitree\/autostart\/utrack\/ultrasonic_listener_example<br \/>\n$ mkdir build<br \/>\n$ cd build<br \/>\n$ cmake ..<br \/>\n$ make<br \/>\n$ cd ..\/bin<br \/>\n$ .\/ultrasonic_listener_lcm<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/techshare.co.jp\/faq\/wp-content\/uploads\/2022\/06\/0624_06.png\" alt=\"\" width=\"100%\" \/><br \/>\n<img decoding=\"async\" src=\"https:\/\/techshare.co.jp\/faq\/wp-content\/uploads\/2022\/06\/0624_07.png\" alt=\"\" width=\"100%\" \/><br \/>\n\u4e0a\u306e\u3088\u3046\u306a\u3082\u306e\u304c\u9ad8\u901f\u3067\u6d41\u308c\u3066\u3044\u308c\u3070\u3001\u6210\u529f\u3067\u3059\u3002<\/p>\n<h4>Step.4<\/h4>\n<p>\u5b9f\u969b\u306bunitree_legged_sdk\u3067\u8d85\u97f3\u6ce2\u30bb\u30f3\u30b5\u30fc\u306e\u5024\u3092\u7528\u3044\u308b\u5834\u5408\uff08\u7279\u306bLOW LEVEL\uff09\u3001<strong>ultrasonic_data.hpp\u3092include\u3059\u308c\u3070\u8d85\u97f3\u6ce2\u30bb\u30f3\u30b5\u30fc\u306e\u5024\u306e\u53d6\u5f97\u304c\u53ef\u80fd<\/strong>\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u672c\u8a18\u4e8b\u3067\u306f\u3053\u308c\u4ee5\u4e0a\u306f\u6271\u3044\u307e\u305b\u3093\u304c\u3001\uff12\u6b21\u958b\u767a\u3067\u4f7f\u3044\u305f\u3044\u65b9\u306fultrasonic_listner_lcm.cpp\u3092\u53c2\u8003\u306b\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>&nbsp;<\/p>\n<h3 id=\"4\">\u304a\u308f\u308a\u306b<\/h3>\n<hr \/>\n<p>ROS\u3001SDK\u554f\u308f\u305a\u8d85\u97f3\u6ce2\u30bb\u30f3\u30b5\u30fc\u306e\u5024\u304c\u53d6\u5f97\u3067\u304d\u308b\u3053\u3068\u3092\u898b\u3066\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u304c\u5c11\u3057\u3067\u3082\u5f79\u306b\u7acb\u3066\u305f\u306e\u306a\u3089\u5e78\u3044\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u521d\u3081\u306b Unitree Go1\u306e\u4e00\u90e8\u6a5f\u7a2e\u306b\u306f\u3001\u982d\u90e8\u3001\u53f3\u8107\u8179\u3001\u5de6\u8107\u8179\u306e\uff13\u30ab\u6240\u306b\u8d85\u97f3\u6ce2\u30bb\u30f3\u30b5\u30fc\u304c\u642d\u8f09\u3055\u308c\u3066\u3044\u307e\u3059\u3002\uff082022\u5e747\u6708\u4ee5\u524d\u306b\u3054\u8cfc\u5165\u306e\u5834\u5408\uff09 \u672c\u7a3f\u3067\u306f\u3001Unitree Go1\u306b\u642d\u8f09\u3055\u308c\u305f\u8d85\u97f3\u6ce2\u30bb\u30f3\u30b5\u30fc\u306e\u5024\u3092\u53d6\u5f97\u3059\u308b &hellip;<\/p>\n","protected":false},"author":15,"featured_media":3122,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31,26,51],"tags":[],"class_list":["post-1661","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-go1","category-unitree","category-unitree-tips"],"_links":{"self":[{"href":"https:\/\/techshare.co.jp\/faq\/wp-json\/wp\/v2\/posts\/1661","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techshare.co.jp\/faq\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techshare.co.jp\/faq\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techshare.co.jp\/faq\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/techshare.co.jp\/faq\/wp-json\/wp\/v2\/comments?post=1661"}],"version-history":[{"count":137,"href":"https:\/\/techshare.co.jp\/faq\/wp-json\/wp\/v2\/posts\/1661\/revisions"}],"predecessor-version":[{"id":237197,"href":"https:\/\/techshare.co.jp\/faq\/wp-json\/wp\/v2\/posts\/1661\/revisions\/237197"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techshare.co.jp\/faq\/wp-json\/wp\/v2\/media\/3122"}],"wp:attachment":[{"href":"https:\/\/techshare.co.jp\/faq\/wp-json\/wp\/v2\/media?parent=1661"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techshare.co.jp\/faq\/wp-json\/wp\/v2\/categories?post=1661"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techshare.co.jp\/faq\/wp-json\/wp\/v2\/tags?post=1661"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}