{"id":5096,"date":"2022-11-06T10:19:28","date_gmt":"2022-11-06T01:19:28","guid":{"rendered":"http:\/\/shinku.ddo.jp\/wordpress\/?page_id=5096"},"modified":"2024-03-24T13:38:19","modified_gmt":"2024-03-24T04:38:19","slug":"ros2raspberrypirpi%e3%81%abubuntu%e3%82%92%e5%b0%8e%e5%85%a5%e3%81%99%e3%82%8b","status":"publish","type":"page","link":"http:\/\/shinku.ddo.jp\/wordpress\/?page_id=5096","title":{"rendered":"ROS2:\u30e9\u30ba\u30d1\u30a4\u74b0\u5883\u69cb\u7bc9"},"content":{"rendered":"\n<p>\uff11\uff09ubuntu20.04\u306e\u5c0e\u5165\u3002<\/p>\n\n\n\n<p>\u3000\u57fa\u672c\u7684\u306b\u306fRaspberrypi\u516c\u5f0f\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002\u4ee5\u4e0b\u306e\u524d\u534a\u3092\u53c2\u7167\u3002<\/p>\n\n\n\n<p>\u3000<a href=\"http:\/\/shinku.ddo.jp\/wordpress\/?page_id=5559\">\u30e9\u30ba\u30d1\u30a4\u306bLubuntu20.04\u3092\u5165\u308c\u308b(&amp;web\u9bd6)<\/a><\/p>\n\n\n\n<p>\u3000\uff08Ubuntu\u3067\u3082Lubuntu\u5316\u3057\u3066\u3082\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u306e\u8868\u793a\u304c\u7570\u306a\u308b\u3060\u3051\u3067\u540c\u3058\u3002\uff09<\/p>\n\n\n\n<p>\uff12\uff09eth0\u306e\u8a2d\u5b9a<\/p>\n\n\n\n<p>\u3000PC\u3068\u306e\u63a5\u7d9a\u3084\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u3078\u306e\u63a5\u7d9a\u306fwifi(wran)\u3067\u884c\u3044\u3001eth0\u306fNUCLEO\u3068\u306e\u63a5\u7d9a\u306b\u4f7f\u7528\u3059\u308b\u3002<\/p>\n\n\n\n<p>    wifi\u306emetric\u3092\u9ad8\u304f\u3057\u3066\u512a\u5148\u9806\u4f4d\u3092\u4e0a\u3052\u3066\u304a\u304f\u3002<\/p>\n\n\n\n<p>\u3000\u3068\u308a\u3042\u3048\u305a\u3053\u308c\u306fROS\uff12\u3067\u306f\u306a\u304fubuntu\u306e\u4f7f\u3044\u65b9\u7684\u306a\u90e8\u5206\u3060\u304b\u3089\u8a73\u7d30\u89e3\u8aac\u4f5c\u308b\u306e\u306f\u5f8c\u56de\u3057\u3002<\/p>\n\n\n\n<p>\u3000\u53c2\u8003\uff1a\u3000<a href=\"https:\/\/www.komee.org\/entry\/2018\/06\/12\/181400\">NetworkManager\u306b\u3088\u308b\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u7ba1\u7406<\/a><\/p>\n\n\n\n<p>\uff13\uff09ROS2\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n\n\n\n<p>\u30ea\u30dd\u30b8\u30c8\u30ea\u3084\u3089\u306a\u3093\u3084\u3089\u5909\u308f\u3063\u305f\u308a\u3059\u308b\u306e\u3067\u57fa\u672c\u7684\u306b\u306f\u516c\u5f0f\u2192\uff08<a href=\"https:\/\/docs.ros.org\/en\/foxy\/Installation\/Alternatives\/Ubuntu-Install-Binary.html#\">ROS2Foxy\u306einstallManual<\/a>\uff09\u306e\uff08<a href=\"https:\/\/docs.ros.org\/en\/foxy\/Installation\/Ubuntu-Install-Debians.html\">Debian\u7528\u9805\u76ee<\/a>\uff09\u3092\u898b\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p>\u304c\u3001\u4e00\u5fdc\u73fe\u72b6\u306f\u4e0b\u306b\u5f15\u7528\u3057\u3066\u304a\u304d\u307e\u3059<\/p>\n\n\n\n<p>\u30fb\u30ed\u30b1\u30fc\u30eb\u306e\u8a2d\u5b9a<\/p>\n\n\n\n<p>\u3000\u307e\u3041\u3001\u4e0d\u8981\u3060\u3068\u601d\u3046\u306e\u3067\u7701\u7565\u3002\u53b3\u5bc6\u306b\u74b0\u5883\u3092\u5408\u308f\u305b\u305f\u3044\u4eba\u306f\u3069\u3046\u305e\u3002<\/p>\n\n\n\n<p>\u30fbapt\u306bROS2 \u306eGPG\u30ad\u30fc\u306e\u8ffd\u52a0<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$sudo apt install software-properties-common\n$sudo add-apt-repository universe\n$sudo apt update &amp;&amp; sudo apt install curl -y\n$sudo curl -sSL https:\/\/raw.githubusercontent.com\/ros\/rosdistro\/master\/ros.key -o \/usr\/share\/keyrings\/ros-archive-keyring.gpg\n$echo \"deb &#91;arch=$(dpkg --print-architecture) signed-by=\/usr\/share\/keyrings\/ros-archive-keyring.gpg] http:\/\/packages.ros.org\/ros2\/ubuntu $(. \/etc\/os-release &amp;&amp; echo $UBUNTU_CODENAME) main\" | sudo tee \/etc\/apt\/sources.list.d\/ros2.list > \/dev\/null<\/code><\/pre>\n\n\n\n<p>\u30fbROS2\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo apt update\n$ sudo apt upgrade\n$ sudo apt install ros-foxy-desktop python3-argcomplete\n$ sudo apt install ros-dev-tools\n<\/code><\/pre>\n\n\n\n<p>ROS2\u74b0\u5883\u652f\u63f4\u306e\u30bd\u30d5\u30c8(colcon)\u306b\u30d1\u30c3\u30b1\u30fc\u30b8\u72b6\u6cc1\u3092\u6559\u3048\u308b\u30de\u30b8\u30c3\u30af\u30ef\u30fc\u30c9\u3092.bashrc\u306b\u8ffd\u52a0<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$sudo nano ~\/.bashrc<\/code><\/pre>\n\n\n\n<p>\u672b\u5c3e\u306b\u4ee5\u4e0b\u8ffd\u52a0<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#--------------ROS2-------------\nsource \/opt\/ros\/foxy\/setup.bash\nsource ~\/colcon_ws\/install\/setup.bash<\/code><\/pre>\n\n\n\n<p>\u30fbROS2\u52d5\u4f5c\u8a66\u9a13<\/p>\n\n\n\n<p>\u30bf\u30fc\u30df\u30ca\u30eb\u30922\u3064\u958b\u3044\u3066\u4ee5\u4e0b\u3092\u5b9f\u884c\u3057\u3066\u307f\u308b<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><p>$ source \/opt\/ros\/foxy\/setup.bash\n$ ros2 run demo_nodes_cpp talker<\/p><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code><p>$ source \/opt\/ros\/foxy\/setup.bash\n$ ros2 run demo_nodes_py listener<\/p><\/code><\/pre>\n\n\n\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001\u306a\u3093\u304b\u7247\u65b9\u304c\u3057\u3083\u3079\u3063\u305f(\u767a\u884c\u3057\u305f\u30c8\u30d4\u30c3\u30af\u304c\uff09\u306e\u304c\u3001\u3082\u3046\u7247\u65b9\u306b\u5230\u9054\u3057\u3066\u3044\u308c\u3070(\u8cfc\u8aad\u3067\u304d\u3066\u3044\u308c\u3070\uff09\u6210\u529f\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"http:\/\/shinku.ddo.jp\/wordpress\/wp-content\/uploads\/2024\/03\/talkerlistener.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/shinku.ddo.jp\/wordpress\/wp-content\/uploads\/2024\/03\/talkerlistener.png\" alt=\"\" class=\"wp-image-5584\" width=\"816\" height=\"413\"\/><\/a><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>\u3053\u308c\u3067ROS2\u306e\u30a4\u30f3\u30b9\u30b3\u306f\u7d42\u308f\u308a\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<p class=\"has-text-align-center\">\u4ee5\u4e0b\u3001\u65e7\u30da\u30fc\u30b8<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<p>ubuntu 20.04\u5c0e\u5165<br \/>\uff11\uff09raspberry pi imager\u3067SD\u306bubuntu 20.04 lte\u3092\u66f8\u304d\u8fbc\u3080\u3002<br \/>\u3000\u3000\u305d\u306e\u969b\u3001imager\u306e\u8a2d\u5b9a\u3092\u3044\u3058\u3063\u3066\uff53\uff53\uff48\u3092\u6709\u52b9\u306b\u3057\u3001<br \/>\u3000\u3000\u30de\u30b7\u30f3\u540d\u3092\u5909\u66f4\u3057\u3001WRAN\u306e\u8a2d\u5b9a\u3092\u3057\u3001<br \/>\u3000\u3000\u30c7\u30d5\u30a9\u30eb\u30c8\u30e6\u30fc\u30b6\u30fc\u306e\uff29\uff24\u3068\u30d1\u30b9\u30ef\u30fc\u30c9\u306f\u8a2d\u5b9a\u3057\u3066\u304a\u304f\u3002<\/p>\n\n\n\n<p>\u3068\u308a\u3042\u3048\u305a\u3001Ubuntu\u30e9\u30ba\u30d1\u30a4\u7528\u306e\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u306f\u7d50\u69cb\u4e71\u66b4\u3067\u3001raspberrypi OS\u307f\u305f\u3044\u306b\u3044\u304d\u306a\u308a\u30ab\u30e9\u30d5\u30eb\u306aXWindow\u304c\u7acb\u3061\u4e0a\u304c\u308b\u3068\u304b\u671b\u3080\u3079\u304f\u3082\u7121\u3044\u306e\u3067\u305c\u30fc\u3093\u3076\u3001Windows\uff13\uff0e\uff11\u6642\u4ee3\u306ePC\u306e\u3088\u3046\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u3057\u3066\u3044\u304f\u5fc5\u8981\u304c\u3042\u308b\u3002<\/p>\n\n\n\n<p>\u30de\u30b8\u7cde\u3002<\/p>\n\n\n\n<p>\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc<\/p>\n\n\n\n<p>sudo apt update<br \/>sudo apt upgrade<br \/>sudo apt net-tools<\/p>\n\n\n\n<p>ifconfig<\/p>\n\n\n\n<p>\u3067\u3001IP\u78ba\u8a8d<br \/>\uff53\uff53\uff48\u3067\u5165\u308c\u308b\u304b\u3069\u3046\u304b\u78ba\u8a8d\u3002<br \/>\uff08\u5165\u308c\u305f\u3089\u3053\u308c\u4ee5\u964d\uff53\uff53\uff48\u3067\u4f5c\u696d\uff09<\/p>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n\n\n\n<p>lubuntu\u306e\u5c0e\u5165<\/p>\n\n\n\n<p>\uff1a20.04\u30fc\u30fc\u30fc\u30fc\u30fchttps:\/\/qiita.com\/naomori\/items\/e45d5dc77ecda860f41a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>git clone https:\/\/github.com\/wimpysworld\/desktopify.git<br \/>cd desktopify\/<br \/>sudo .\/desktopify --de lubuntu<br \/>sudo apt install -y xrdp<br \/>sudo apt install -y chromium-browser<\/code><\/pre>\n\n\n\n<p>\uff1a22.04 LTE\uff0d\uff0d\uff0d\uff0d<a href=\"https:\/\/qiita.com\/harutin_99\/items\/a09c41c581cd92b6371b\">https:\/\/qiita.com\/harutin_99\/items\/a09c41c581cd92b6371b<\/a><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt -y install lubuntu-desktop<\/code><\/pre>\n\n\n\n<p>\uff1a\u30fc\u30fc\u30fc\u30fc\u30fc\u30fchttps:\/\/gihyo.jp\/admin\/serial\/01\/ubuntu-recipe\/0624\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc\u30fc<\/p>\n\n\n\n<p>\u300c\u30b7\u30b9\u30c6\u30e0\u8a2d\u5b9a\uff08System Settings?\uff09?\u300d\u304b\u3089\u300c\u5730\u57df\u3068\u8a00\u8a9e\uff08Region &amp; Language?\uff09?\u300d\u3092\u9078\u629e\u3057\u3001\u300c?\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u8a00\u8a9e\u306e\u7ba1\u7406\uff08Manage Installed Languages?\uff09?\u300d\u3092\u8d77\u52d5\u3059\u308b<br \/>\u300c\u8a00\u8a9e\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068\u524a\u9664\uff08Intall\/Remove Languages?\uff09?\u300d\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u3066\u3001Japanese\u306b\u30c1\u30a7\u30c3\u30af\u3092\u5165\u308c\u3001\u300c?\u9069\u7528\uff08Apply?\uff09?\u300d\u30dc\u30bf\u30f3\u3092\u62bc\u3059<br \/>\u8ffd\u52a0\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u554f\u308f\u308c\u308b\u306e\u3067\u3001\u6307\u793a\u306b\u5f93\u3063\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<br \/>\u300c\u30e1\u30cb\u30e5\u30fc\u3068\u30a6\u30a3\u30f3\u30c9\u30a6\u306e\u8a00\u8a9e\uff08Language for menus and windows?\uff09?\u300d\u306b\u3042\u308b\u300c\u65e5\u672c\u8a9e\u300d\u3092\u30c9\u30e9\u30c3\u30b0\u30a2\u30f3\u30c9\u30c9\u30ed\u30c3\u30d7\u3067\u5148\u982d\u306b\u79fb\u52d5\u3059\u308b<br \/>\u4e00\u5ea6\u30ed\u30b0\u30a2\u30a6\u30c8\u3057\u305f\u4e0a\u3067\u3001\u518d\u5ea6\u30ed\u30b0\u30a4\u30f3\u3057\u3001\u300c?\u30b7\u30b9\u30c6\u30e0\u8a2d\u5b9a\uff08System Settings?\uff09?\u300d\u304b\u3089\u300c\u5730\u57df\u3068\u8a00\u8a9e\uff08Region &amp; Language?\uff09?\u300d\u3092\u9078\u629e\u3059\u308b<br \/>\u300c\u8a00\u8a9e\u300d\u3068\u300c\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u300d\u304c\u305d\u308c\u305e\u308c\u65e5\u672c\u8a9e\u306b\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3001\u306a\u3063\u3066\u3044\u306a\u3051\u308c\u3070\u5909\u66f4\u3059\u308b<br \/>\u65e5\u672c\u8a9e\u30ad\u30fc\u30dc\u30fc\u30c9\u306a\u3089\u5165\u529b\u30bd\u30fc\u30b9\u304b\u3089\u300c\u82f1\u8a9e\u300d\u3092\u524a\u9664\u3057\u300c\u65e5\u672c\u8a9e\u300d\u3092\u8ffd\u52a0\u3059\u308b<br \/>\u3055\u3089\u306b\u5165\u529b\u30bd\u30fc\u30b9\u306b\u300c\u65e5\u672c\u8a9e\uff08Mozc?\uff09?\u300d\u3092\u8ffd\u52a0\u3059\u308b<br \/>\u300cSuper + Space\u300d\u3067\u300c\u65e5\u672c\u8a9e\uff08Mozc?\uff09?\u300d\u3092\u9078\u629e\u3057\u3066\u65e5\u672c\u8a9e\u5165\u529b\u3067\u304d\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3059\u308b<br \/>\u300c\u65e5\u4ed8\u3068\u6642\u523b\u300d\u304b\u3089\u30bf\u30a4\u30e0\u30be\u30fc\u30f3\u3092\u65e5\u672c\uff08JST\uff09\u306b\u5909\u66f4\u3059\u308b<\/p>\n\n\n\n<h6>\u65e5\u672c\u8a9e\u5316<\/h6>\n\n\n\n<h6>\u5de6\u4e0b\u30e1\u30cb\u30e5\u30fc\u30dc\u30bf\u30f3 \u2192 Preferences \u2192 LXQt Settings \u2192 Locale<\/h6>\n\n\n\n<h6>https:\/\/gihyo.jp\/admin\/serial\/01\/ubuntu-recipe\/0624<\/h6>\n\n\n\n<h6>GUI\u306e\u7121\u52b9\u5316=CUI\u306e\u6709\u52b9\u5316\u306b\u306f\uff0c\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3002<\/h6>\n\n\n\n<p>sudo systemctl set-default multi-user.target<\/p>\n\n\n\n<h6>GUI\u306e\u6709\u52b9\u5316=CUI\u306e\u7121\u52b9\u5316\u306b\u306f\uff0c\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3002<\/h6>\n\n\n\n<p>sudo systemctl set-default graphical.target<\/p>\n\n\n\n<h1>\u65e5\u672c\u8a9e\u5165\u529b<\/h1>\n\n\n\n<p>sudo apt-get install fcitx-mozc<\/p>\n\n\n\n<p>sudo apt-get install fdclone<br \/>sudo apt-get install tightvncserver<br \/>sudo apt-get install xrdp<br \/>sudo apt-get install gddrescue<br \/>sudo apt-get install parted gparted<br \/>sudo apt-get install ksnapshot<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\/\/\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u95a2\u4fc2\u306e\u30c4\u30fc\u30eb\u3002<\/p>\n\n\n\n<p>sudo apt-get install netcat<\/p>\n\n\n\n<p><br \/>\/\/\u30af\u30ed\u30c3\u30af\u72b6\u6cc1\u3092\u898b\u308c\u308b\u3088\u3046\u306b\u3057\u3066\u304a\u304f\u3002<\/p>\n\n\n\n<p>\/\/\u305f\u3068\u3048\u3070udp\u306a\u3089 nc -4lu \u81ea\u6a5fIP \u76e3\u8996\u30dd\u30fc\u30c8\u3000\u3067\u3001\u4fe1\u53f7\u5f85\u3061\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b\u306e\u3067\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u8d8a\u3057\u306e\u30a2\u30d7\u30ea\u958b\u767a\u306b\u4fbf\u5229<\/p>\n\n\n\n<p>sudo apt-get install cpufrequtils<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\/\/sudo vcgencmd measure_temp\u3067CPU\u6e29\u5ea6\u3092\u898b\u308c\u308b\u3088\u3046\u306b\u3057\u3066\u304a\u304f\u3002<\/p>\n\n\n\n<p>\/\/Raspberrypi\u3060\u3068\u30b9\u30ed\u30c3\u30c8\u30eb\u306b\u304b\u304b\u3089\u306a\u3044\u3088\u3046\u306b\u3059\u308b\u306e\u306b\u5fc5\u8981\u3067\u3057\u3087\u3002<\/p>\n\n\n\n<p>sudo-apt-get install libraspberrypi-bin <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\/\/sudo rpi-eeprom-update\u3067eep\u306e\u72b6\u614b\u3092\u898b\u308c\u308b\u3088\u3046\u306b\u3057\u3066\u304a\u304f\uff08\u3042\u307e\u308a\u4f7f\u308f\u306a\u3044\u3068\u601d\u3046\u3051\u3069\u304a\u307e\u3051\u3002rpi\u306e\u30c4\u30fc\u30eb\u3092\u5165\u308c\u3066\u304a\u304f\u3068\u3044\u3046\u610f\u5473\u3067\uff09<\/p>\n\n\n\n<p>sudo apt-get install rpi-eeprom<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2>\u5206\u304b\u308a\u3084\u3059\u3044ROS2 Foxy\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806<\/h2>\n\n\n\n<h6>https:\/\/kurukuruway.com\/kaihatsu\/raspberry-pi-4%E3%81%ABubuntu-20-04%E3%81%A8ros2%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB\/<\/h6>\n\n\n\n<h6>\u30ed\u30b1\u30fc\u30eb\u306e\u78ba\u8a8d\u3068\u8a2d\u5b9a<\/h6>\n\n\n\n<h6>\u4e0d\u8981\u306a\u6c17\u304c\u3057\u307e\u3059\u304c\u3001\u516c\u5f0f\u306b\u5f93\u3044\u307e\u3059<\/h6>\n\n\n\n<p>$ locale #\u307e\u305a\u81ea\u5206\u306e\u30ed\u30b1\u30fc\u30eb\u3092\u78ba\u8a8d<br \/>$ sudo apt update &amp;&amp; sudo apt install locales<br \/>$ sudo locale-gen en_US en_US.UTF-8<br \/>$ sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8<br \/>$ export LANG=en_US.UTF-8<br \/>$ locale #\u53cd\u6620\u3055\u308c\u305f\u3053\u3068\u3092\u78ba\u8a8d<\/p>\n\n\n\n<h6>apt\u304c\u30d1\u30c3\u30b1\u30fc\u30b8\u8a8d\u8a3c\u306b\u4f7f\u7528\u3059\u308b\u30ad\u30fc\u306e\u4e00\u89a7\u306b\u3001GPG\uff08GNU Privacy Guard\uff09\u30ad\u30fc\u3092\u3001\u4e0b\u8a18\u306e\u30b3\u30de\u30f3\u30c9\u3067\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/h6>\n\n\n\n<p>$ sudo apt update &amp;&amp; sudo apt install curl gnupg2 lsb-release<br \/>$ curl -s https:\/\/raw.githubusercontent.com\/ros\/rosdistro\/master\/ros.asc | sudo apt-key add &#8211;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$sudo sh -c 'echo \"deb [arch=$(dpkg --print-architecture)] http:\/\/packages.ros.org\/ros2\/ubuntu $(lsb_release -cs) main\" &gt; \/etc\/apt\/sources.list.d\/ros2-latest.list'<\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h1>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h1>\n\n\n\n<p>$ sudo apt update<br \/>$ sudo apt install ros-foxy-desktop<br \/>$ sudo apt install ros-foxy-ros-base<br \/>$ source \/opt\/ros\/foxy\/setup.bash<\/p>\n\n\n\n<h1>\u30c7\u30d5\u30a9\u30eb\u30c8\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u306fPOP<\/h1>\n\n\n\n<p>$ sudo apt install -y python3-pip<br \/>$ pip3 install -U argcomplete<\/p>\n\n\n\n<h1>\u30c7\u30e2\u30f3\u30b9\u30c8\u30ec\u30fc\u30b7\u30e7\u30f3<\/h1>\n\n\n\n<p>\u306e\u307e\u307e\u3001\u305d\u306e\u4e0b\u306eTry some examples\u9805\u76ee\u3092\u884c\u3063\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30bf\u30fc\u30df\u30ca\u30eb\u3092\u30011\u3064\u8d77\u52d5\u3057\u3001\u4e0b\u8a18\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>$ source \/opt\/ros\/foxy\/setup.bash<br \/>$ ros2 run demo_nodes_cpp talker<br \/>\u305d\u3046\u3057\u305f\u3089\u3001\u3082\u30461\u3064\u30bf\u30fc\u30df\u30ca\u30eb\u3092\u8d77\u52d5\u3057\u3001\u4e0b\u8a18\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>$ source \/opt\/ros\/foxy\/setup.bash<br \/>$ ros2 run demo_nodes_py listener<br \/>\u5b9f\u884c\u304c\u6210\u529f\u3059\u308b\u3068\u3001<\/p>\n\n\n\n<p>\u4e0b\u8a18\u306e\u3088\u3046\u306b\u30011\u3064\u76ee\u306e\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u300cPublishing\u300d\u30012\u3064\u76ee\u306e\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u300cI heard\u300d\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p>Publishing\u5074\u304b\u3089\u9001\u3089\u308c\u305f\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u3001I heard\u5074\u3067\u53d7\u3051\u53d6\u308c\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h6>&#8212;source\uff5e\u3092\u6bce\u56de\u5165\u308c\u305a\u306b\u6e08\u307e\u3059<\/h6>\n\n\n\n<p>echo &#8220;source \/opt\/ros\/foxy\/setup.bash&#8221; &gt;&gt; ~\/.bashrc<\/p>\n\n\n\n<h6>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/h6>\n\n\n\n<h6>\u81ea\u5206\u306eGPIO\u3092\u52d5\u304b\u3059\u305f\u3081\u306e\u8a2d\u5b9a<\/h6>\n\n\n\n<h6>&#8212;&#8212;&#8212;&#8212;&#8212;pigpio\u3092\u4f7f\u3046\u5834\u5408<\/h6>\n\n\n\n<h6>https:\/\/www.circletek.jp\/index.php\/2020\/06\/08\/a-145\/<\/h6>\n\n\n\n<h6>https:\/\/qiita.com\/NeK\/items\/da429f8c001476ec4544<\/h6>\n\n\n\n<h6>&#8212;&#8212;&#8212;&#8212;-i2C\u3092\u4f7f\u3046\u5834\u5408<\/h6>\n\n\n\n<h6>https:\/\/qiita.com\/myasu\/items\/5b122c782c5a616d8b60<\/h6>\n\n\n\n<h6>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h6>\n\n\n\n<p>ubuntu@ubuntu:~$ sudo apt install i2c-tools -y<br \/>ubuntu@ubuntu:~$ sudo apt install python3-smbus -y<\/p>\n\n\n\n<h1>\u81ea\u5206\u3092i2c\u30b0\u30eb\u30fc\u30d7\u306b\u8ffd\u52a0<\/h1>\n\n\n\n<p>ubuntu@ubuntu:~$ sudo adduser ubuntu i2c<\/p>\n\n\n\n<h1>\u52d5\u4f5c\u78ba\u8a8d<\/h1>\n\n\n\n<p>ubuntu@raspi3u:~$ i2cdetect -r -y 1<br \/>0 1 2 3 4 5 6 7 8 9 a b c d e f<br \/>00: &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212;<br \/>10: &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212;<br \/>20: 20 &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212;<br \/>30: &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212;<br \/>40: &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212;<br \/>50: &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212;<br \/>60: &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; 68 &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212;<br \/>70: &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212; &#8212;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uff11\uff09ubuntu20.04\u306e\u5c0e\u5165\u3002 \u3000\u57fa\u672c\u7684\u306b\u306fRaspberrypi\u516c\u5f0f\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002\u4ee5\u4e0b\u306e\u524d\u534a\u3092\u53c2\u7167\u3002 \u3000\u30e9\u30ba\u30d1\u30a4\u306bLubuntu20.04\u3092\u5165\u308c\u308b(&amp;web\u9bd6) \u3000\uff08Ubuntu\u3067\u3082Lubuntu\u5316\u3057\u3066 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"http:\/\/shinku.ddo.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/pages\/5096"}],"collection":[{"href":"http:\/\/shinku.ddo.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/shinku.ddo.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/shinku.ddo.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/shinku.ddo.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5096"}],"version-history":[{"count":12,"href":"http:\/\/shinku.ddo.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/pages\/5096\/revisions"}],"predecessor-version":[{"id":5649,"href":"http:\/\/shinku.ddo.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/pages\/5096\/revisions\/5649"}],"wp:attachment":[{"href":"http:\/\/shinku.ddo.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5096"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}