{"id":7403,"date":"2025-02-16T17:13:19","date_gmt":"2025-02-16T08:13:19","guid":{"rendered":"https:\/\/robot.e-nat.org\/?p=7403"},"modified":"2025-02-16T20:35:38","modified_gmt":"2025-02-16T11:35:38","slug":"%e3%83%a8%e3%83%bc%e8%a7%92%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%83%ad%e3%83%9c%e3%83%83%e3%83%88%e3%82%9290%e5%ba%a6%e5%8f%b3%e3%81%ab%e6%97%8b%e5%9b%9e%e3%81%95%e3%81%9b%e3%82%8b","status":"publish","type":"post","link":"https:\/\/robot.e-nat.org\/?p=7403","title":{"rendered":"\u30e8\u30fc\u89d2\u3092\u4f7f\u3063\u3066\u30ed\u30dc\u30c3\u30c8\u309290\u5ea6\u53f3\u306b\u65cb\u56de\u3055\u305b\u308b"},"content":{"rendered":"\n<p>\u91d1\u5b8f\u548c\u5be6\u3067\u3059\u3002<br>\u30b8\u30e3\u30a4\u30ed\u30bb\u30f3\u30b5\u30fc\u306e\u8fd4\u3059\u30e8\u30fc(yaw\uff09\u89d2\u3092\u4f7f\u3063\u3066\u3001\u30ed\u30dc\u30c3\u30c8\u309290\u5ea6\u53f3\u306b\u65cb\u56de\u3055\u305b\u3066\u307f\u307e\u3059\u3002<br>\u30b8\u30e3\u30a4\u30ed\u30bb\u30f3\u30b5\u30fc\u306f\u30e8\u30fc(yaw\uff09\u3068\u30d4\u30c3\u30c1\uff08picth\uff09\u3068\u30ed\u30fc\u30eb(role)\u3092\u8fd4\u3059\u3002\u98db\u884c\u6a5f\u3067\u8003\u3048\u308b\u3068\u30e8\u30fc\u306f\u5de6\u53f3\u306e\u5411\u304d\u3067\u3001\u30d4\u30c3\u30c1\u306f\u4e0a\u4e0b\u306e\u5411\u304d\u3001\u30ed\u30fc\u30eb\u306f\u6a5f\u4f53\u306e\u50be\u304d\u3067\u3042\u308b\u3002<br>Spike\u30a2\u30d7\u30ea\u3067\u306f\u30cf\u30d6\u30a2\u30a4\u30b3\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001\u30e8\u30fc\u3001\u30d4\u30c3\u30c1\u3001\u30ed\u30fc\u30eb\u304c\u8868\u793a\u3067\u304d\u308b\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"702\" height=\"584\" src=\"https:\/\/robot.e-nat.org\/wp-content\/uploads\/2025\/02\/hub_display.png\" alt=\"\" class=\"wp-image-7404\" srcset=\"https:\/\/robot.e-nat.org\/wp-content\/uploads\/2025\/02\/hub_display.png 702w, https:\/\/robot.e-nat.org\/wp-content\/uploads\/2025\/02\/hub_display-300x250.png 300w, https:\/\/robot.e-nat.org\/wp-content\/uploads\/2025\/02\/hub_display-72x60.png 72w\" sizes=\"auto, (max-width: 702px) 100vw, 702px\" \/><\/figure>\n\n\n\n<p>\u307e\u305a\u306f\u30ef\u30fc\u30c9\u30d6\u30ed\u30c3\u30af\u3067\u30e8\u30fc\u89d2\u3092\u4f7f\u3063\u3066\u307f\u3088\u3046\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"350\" height=\"348\" src=\"https:\/\/robot.e-nat.org\/wp-content\/uploads\/2025\/02\/word_block_yaw.png\" alt=\"\" class=\"wp-image-7405\" srcset=\"https:\/\/robot.e-nat.org\/wp-content\/uploads\/2025\/02\/word_block_yaw.png 350w, https:\/\/robot.e-nat.org\/wp-content\/uploads\/2025\/02\/word_block_yaw-300x298.png 300w, https:\/\/robot.e-nat.org\/wp-content\/uploads\/2025\/02\/word_block_yaw-150x150.png 150w, https:\/\/robot.e-nat.org\/wp-content\/uploads\/2025\/02\/word_block_yaw-60x60.png 60w\" sizes=\"auto, (max-width: 350px) 100vw, 350px\" \/><\/figure>\n\n\n\n<p>\u30ef\u30fc\u30c9\u30d6\u30ed\u30c3\u30af\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u306f\u3001\u307e\u305a\u30ed\u30dc\u30c3\u30c8\u306e\u5de6\u53f3\u306e\u30e2\u30fc\u30bf\u30fc\u3092\u6307\u5b9a\u3057\u3066\u3001\u30e8\u30fc\u89d2\u30920\u306b\u8a2d\u5b9a\u3057\u3066\u3044\u308b\u3002\u3044\u308f\u3086\u308b\u521d\u671f\u5316\u51e6\u7406\u3067\u3042\u308b\u3002\u6b21\u306b\u79fb\u52d5\u30b9\u30d4\u30fc\u30c9\u3092\u901f\u304f\u3057\u904e\u304e\u308b\u3068\u3001\u66f2\u304c\u308a\u3059\u304e\u308b\u306e\u306730%\u306b\u8a2d\u5b9a\u3057\u3066\u3044\u308b\u3002\u53f390\u306e\u5411\u304d\u306b\u79fb\u52d5\u958b\u59cb\u3059\u308b\u3067\u92ed\u89d2\u306b\u52d5\u304b\u3059\u3002\u3053\u306e90\u3092\u30b9\u30c6\u30a2\u30ea\u30f3\u30b0\u5024\u3068\u547c\u3076\u3088\u3046\u3060\u304c\u3001\u3053\u306e\u6570\u5024\u304c\u5927\u304d\u3044\u3068\u8ecc\u8de1\u304c\u92ed\u304f\u306a\u308b\u3002\u305d\u3057\u3066\u3001\u30e8\u30fc\u89d2\u304c90\u5ea6\u3092\u8d85\u3048\u308b\u307e\u3067\u5f85\u3064\u3002\u3053\u308c\u3067\u3060\u3044\u305f\u304490\u5ea6\u306b\u66f2\u304c\u308b\u3002\u6b63\u78ba\u3092\u671f\u3059\u306b\u306f\u79fb\u52d5\u30b9\u30d4\u30fc\u30c9\u306b\u5408\u308f\u305b\u3066\u89d2\u5ea6\u3092\u82e5\u5e72\u8abf\u6574\u3059\u308b\u3068\u826f\u3044\u3068\u601d\u3046\u3002<\/p>\n\n\n\n<p>\u6b21\u306b\u3053\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092Python\u3067\u66f8\u3044\u3066\u307f\u308b\u3068\u3001\u3053\u308c\u304c\u7d50\u69cb\u96e3\u3057\u304f\u306a\u308b\u3002runloop()\u3092\u4f7f\u3063\u3066await\u3067\u5f85\u6a5f\u3092\u5165\u308c\u3066\u3044\u308b\u305b\u3044\u3082\u3042\u308b\u304b\u3082\u3057\u308c\u306a\u3044\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-cyan-bluish-gray-background-color has-background\"><code>import motor_pair\nimport runloop\nimport sys\nfrom hub import port , motion_sensor\n\ndef turn_done():\n    return abs(motion_sensor.tilt_angles()&#91;0] * -0.1) &gt; 90\n\nasync def main():\n    motor_pair.pair(motor_pair.PAIR_1, port.C, port.D)\n    motion_sensor.reset_yaw(0)\n    await runloop.until(motion_sensor.stable)\n    motor_pair.move(motor_pair.PAIR_1, 90, velocity=200)\n    await runloop.until(turn_done)\n    motor_pair.stop(motor_pair.PAIR_1)\n    sys.exit(0)\n\nrunloop.run(main())<\/code><\/pre>\n\n\n\n<p>\u6982\u7565\u3092\u8aac\u660e\u3059\u308b\u3068\u3001turn_done\u95a2\u6570\u306f\u53f3\u306b90\u5ea6\u66f2\u304c\u308b\u3068True\u3092\u8fd4\u3059\u3002tilt_angles()\u306f\u30e8\u30fc\u3001\u30d4\u30c3\u30c1\u3001\u30ed\u30fc\u30eb\u306e3\u3064\u3092\u8981\u7d20\u3068\u3059\u308b\u30bf\u30d7\u30eb\u3092\u8fd4\u3059\u304c\u3001\u53f3\u306b90\u5ea6\u66f2\u304c\u308b\u3068-900\u304c\u8fd4\u3063\u3066\u304f\u308b\u306e\u306790\u3068\u6bd4\u8f03\u3067\u304d\u308b\u3088\u3046\u306b\u9069\u5b9c\u5909\u63db\u3057\u3066\u3044\u308b\u3002main\u95a2\u6570\u5185\u306ereset_yaw(0)\u306f\u30e8\u30fc\u89d2\u306e\u521d\u671f\u5316\u3067\u3042\u308b\u3002await runloop.until(turn_done)\u3067\u53f3\u306b90\u5ea6\u56de\u308b\u306e\u3092\u5f85\u3063\u3066\u3044\u308b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u91d1\u5b8f\u548c\u5be6\u3067\u3059\u3002\u30b8\u30e3\u30a4\u30ed\u30bb\u30f3\u30b5\u30fc\u306e\u8fd4\u3059\u30e8\u30fc(yaw\uff09\u89d2\u3092\u4f7f\u3063\u3066\u3001\u30ed\u30dc\u30c3\u30c8\u309290\u5ea6\u53f3\u306b\u65cb\u56de\u3055\u305b\u3066\u307f\u307e\u3059\u3002\u30b8\u30e3\u30a4\u30ed\u30bb &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[41],"tags":[44],"class_list":["post-7403","post","type-post","status-publish","format-standard","hentry","category-python","tag--spike3-python","latest_post"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/robot.e-nat.org\/index.php?rest_route=\/wp\/v2\/posts\/7403","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/robot.e-nat.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/robot.e-nat.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/robot.e-nat.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/robot.e-nat.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7403"}],"version-history":[{"count":5,"href":"https:\/\/robot.e-nat.org\/index.php?rest_route=\/wp\/v2\/posts\/7403\/revisions"}],"predecessor-version":[{"id":7410,"href":"https:\/\/robot.e-nat.org\/index.php?rest_route=\/wp\/v2\/posts\/7403\/revisions\/7410"}],"wp:attachment":[{"href":"https:\/\/robot.e-nat.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7403"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/robot.e-nat.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7403"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/robot.e-nat.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7403"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}