Skip to content

Commit f897bff

Browse files
authored
Raspberry Pi MouseでROS 2 Humbleを動かすための情報を追加 (#33)
1 parent bcb0b12 commit f897bff

File tree

6 files changed

+135
-15
lines changed

6 files changed

+135
-15
lines changed
Loading
Loading

docs/raspimouse/driver/install.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ Raspberry Pi MouseのLEDやモータを駆動するためには、
2929

3030
Raspberry Pi Mouseのデバイスドライバは"Ubuntu"と"Raspberry Pi OS"(旧称"Raspbian")に対応しています。
3131

32-
ここではUbuntu(Ubuntu Server 20.04)と、Raspberry Pi OSのインストール手順を紹介します。
32+
ここではUbuntu(Ubuntu Server 22.04, Ubuntu Server 20.04)と、Raspberry Pi OSのインストール手順を紹介します。
3333

34-
後ほどRaspberry Pi Mouseで**ROSを扱う場合はUbuntu Server(64bit版)のインストールを推奨します**
34+
後ほどRaspberry Pi Mouseで**ROSを扱う場合はUbuntu Server 20.04(64bit版)を、ROS 2を扱う場合はUbuntu Server 22.04(64bit版)のインストールを推奨します**
3535

3636
!!! info
3737
出荷時に付属しているRaspberry Pi OSインストール済みのmicroSDカードを利用する場合は、OSインストール手順を飛ばしてそのまま[ソースファイルのダウンロードとインストール](#driver-installation)に進むことができます。
@@ -41,6 +41,20 @@ Raspberry Pi Mouseのデバイスドライバは"Ubuntu"と"Raspberry Pi OS"(
4141
Raspberry PiやRaspberry Pi Mouse本体を**故障させないように**注意してください。
4242
詳細はRaspberry Pi Mouseの**[製品マニュアル](https://rt-net.jp/products/raspberrypimousev3/#downloads)を参照してください**
4343

44+
=== "Ubuntu Server 22.04"
45+
1. [https://www.raspberrypi.org/software/](https://www.raspberrypi.org/software/){target=_blank rel=noopener} にアクセスします
46+
1. Raspberry Pi Imagerをダウンロードします
47+
![](../../img/raspimouse/driver/download_raspberry_pi_imager.png)
48+
1. SDカードをPCに接続します
49+
1. Raspberry Pi Imagerを起動します
50+
1. 書き込むOSを"Other general-purpose OS" -> "Ubuntu" -> "Ubuntu Server 22.04.* LTS"、書き込み先をSDカードに設定します __ROS 2を使う場合は64bit版__ を選択します
51+
![](../../img/raspimouse/driver/pi_imager_settings_ubuntu_22_64bit.png)
52+
1. "書き込む" を押して書き込みを開始します
53+
![](../../img/raspimouse/driver/pi_imager_settings_ubuntu_22.png)
54+
1. SDカードをRaspberry Piに取り付け、Raspberry Piの電源を入れます
55+
1. login:`ubuntu`、password:`ubuntu`でログインし、パスワードを変更します
56+
1. `$ sudo apt update && sudo apt upgrade`を実行します
57+
4458
=== "Ubuntu Server 20.04"
4559
1. [https://www.raspberrypi.org/software/](https://www.raspberrypi.org/software/){target=_blank rel=noopener} にアクセスします
4660
1. Raspberry Pi Imagerをダウンロードします

docs/raspimouse/ros/install.md

Lines changed: 80 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,19 @@ robot: Raspberry Pi Mouse
1818

1919
* 組み立て済みRaspberry Pi Mouse本体
2020
* [製品マニュアル](https://rt-net.jp/products/raspberrypimousev3/#downloads)を読んで組み立て済みの状態を前提としています
21-
* OS(**Ubuntu Server 20.04**)がインストール済みであることを前提としています
21+
* OS(**Ubuntu Server**)がインストール済みであることを前提としています
22+
* `ROS 2 Humble`を使用する場合: **Ubuntu Server 22.04**
23+
* `ROS Noetic`を使用する場合: **Ubuntu Server 20.04**
2224
* Raspberry Pi OSでのROSの動作は確認していません
2325
* Raspberry Pi Mouse用電源
2426
* バッテリでも電源変換ケーブルつきACアダプタでも可
2527
* ノートパソコン等のPC
26-
* OS(**Ubuntu Desktop 20.04**)がインストール済みであることを前提としています
28+
* OS(**Ubuntu Desktop**)がインストール済みであることを前提としています
29+
* `ROS 2 Humble`を使用する場合: **Ubuntu Desktop 22.04**
30+
* `ROS Noetic`を使用する場合: **Ubuntu Desktop 20.04**
31+
32+
!!! info
33+
`ROS 2 Foxy`は2023年6月にEOL(サポート終了)を迎えたため、`ROS 2 Humble`の使用を推奨しています。
2734

2835
## ROS / ROS 2のインストール(公式のドキュメントに沿って進める場合) {: #official-document}
2936

@@ -33,7 +40,16 @@ robot: Raspberry Pi Mouse
3340

3441
GUIを使用する場合は`Desktop-Full`を、 使用しない場合は`ROS-Base`パッケージをインストールします。
3542

36-
=== "ROS 2"
43+
=== "ROS 2 Humble(推奨)"
44+
[https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debians.html](https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debians.html){target=_blank rel=noopener}
45+
を参考に、`ROS 2 Humble`をインストールします。
46+
47+
GUIを使用する場合は`Desktop`を、 使用しない場合は`ROS-Base`パッケージをインストールします。
48+
49+
[https://docs.ros.org/en/humble/Tutorials/Colcon-Tutorial.html](https://docs.ros.org/en/humble/Tutorials/Colcon-Tutorial.html){target=_blank rel=noopener}
50+
を参考に、パッケージビルドツールの`colcon`をインストールします。
51+
52+
=== "ROS 2 Foxy(非推奨)"
3753
[https://docs.ros.org/en/foxy/Installation/Ubuntu-Install-Debians.html](https://docs.ros.org/en/foxy/Installation/Ubuntu-Install-Debians.html){target=_blank rel=noopener}
3854
を参考に、`ROS 2 Foxy`をインストールします。
3955

@@ -79,7 +95,36 @@ robot: Raspberry Pi Mouse
7995
```sh
8096
$ source ~/.bashrc
8197
```
82-
=== "ROS 2"
98+
=== "ROS 2 Humble(推奨)"
99+
このROS 2インストールスクリプトは`curl``git`を使用します。以下のコマンドでインストールします。
100+
101+
```sh
102+
$ sudo apt install -y curl git
103+
```
104+
105+
以下のコマンドでROS 2インストールスクリプトを実行します。
106+
環境にもよりますが完了までは10分以上かかる場合があります。
107+
108+
```sh
109+
$ git clone https://github.com/Tiryoh/ros2_setup_scripts_ubuntu.git
110+
$ cd ros2_setup_scripts_ubuntu
111+
$ ./ros2-humble-desktop-main.sh
112+
```
113+
114+
スクリプトが問題なく実行できれば以下のメッセージが表示されます。
115+
116+
```txt
117+
Success installing ROS humble
118+
Run 'source ~/.bashrc'
119+
```
120+
121+
以下のコマンドでインストールした設定を読み込みます。
122+
123+
```sh
124+
$ source ~/.bashrc
125+
```
126+
127+
=== "ROS 2 Foxy(非推奨)"
83128
このROS 2インストールスクリプトは`curl``git`を使用します。以下のコマンドでインストールします。
84129

85130
```sh
@@ -143,7 +188,37 @@ robot: Raspberry Pi Mouse
143188
```sh
144189
$ source ~/.bashrc
145190
```
146-
=== "ROS 2"
191+
192+
=== "ROS 2 Humble(推奨)"
193+
このROS 2インストールスクリプトは`curl``git`を使用します。以下のコマンドでインストールします。
194+
195+
```sh
196+
$ sudo apt install -y curl git
197+
```
198+
199+
以下のコマンドでROS 2インストールスクリプトを実行します。
200+
環境にもよりますが完了までは10分以上かかる場合があります。
201+
202+
```sh
203+
$ git clone https://github.com/Tiryoh/ros2_setup_scripts_ubuntu.git
204+
$ cd ros2_setup_scripts_ubuntu
205+
$ ./ros2-humble-ros-base-main.sh
206+
```
207+
208+
スクリプトが問題なく実行できれば以下のメッセージが表示されます。
209+
210+
```txt
211+
Success installing ROS humble
212+
Run 'source ~/.bashrc'
213+
```
214+
215+
以下のコマンドでインストールした設定を読み込みます。
216+
217+
```sh
218+
$ source ~/.bashrc
219+
```
220+
221+
=== "ROS 2 Foxy(非推奨)"
147222
このROS 2インストールスクリプトは`curl``git`を使用します。以下のコマンドでインストールします。
148223

149224
```sh

docs/raspimouse/ros/package-install.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ robot: Raspberry Pi Mouse
1111

1212
* 組み立て済みRaspberry Pi Mouse本体
1313
* [製品マニュアル](https://rt-net.jp/products/raspberrypimousev3/#downloads)を読んで組み立て済みの状態を前提としています
14-
* OS(**Ubuntu Server 20.04**)がインストール済みであることを前提としています
14+
* OS(**Ubuntu Server**)がインストール済みであることを前提としています
15+
* `ROS 2 Humble`を使用する場合: **Ubuntu Server 22.04**
16+
* `ROS Noetic`を使用する場合: **Ubuntu Server 20.04**
1517
* Raspberry Pi OSでのROSの動作は確認していません
1618
* **デバイスドライバ**がインストール済みであることを前提としています
1719
* [デバイスドライバのインストール手順](../driver/install.md)を参照してください
@@ -20,8 +22,9 @@ robot: Raspberry Pi Mouse
2022
* Raspberry Pi Mouse用電源
2123
* バッテリでも電源変換ケーブルつきACアダプタでも可
2224
* ノートパソコン等のPC
23-
* OS(**Ubuntu Desktop 20.04**)がインストール済みであることを前提としています
24-
25+
* OS(**Ubuntu Desktop**)がインストール済みであることを前提としています
26+
* `ROS 2 Humble`を使用する場合: **Ubuntu Desktop 22.04**
27+
* `ROS Noetic`を使用する場合: **Ubuntu Desktop 20.04**
2528

2629
## ROS / ROS 2パッケージのインストール {: #installation}
2730

@@ -54,7 +57,21 @@ robot: Raspberry Pi Mouse
5457
$ source ~/catkin_ws/devel/setup.bash
5558
```
5659

57-
=== "ROS 2"
60+
=== "ROS 2 Humble(推奨)"
61+
Raspberry Piとノートパソコン等のPCそれぞれで次のコマンドを実行します。
62+
63+
```sh
64+
$ sudo apt install ros-humble-raspimouse-slam-navigation
65+
```
66+
67+
これにより、以下のパッケージがインストールされます。
68+
69+
* [raspimouse2](https://github.com/rt-net/raspimouse2) : 制御パッケージ
70+
* [raspimouse_ros2_examples](https://github.com/rt-net/raspimouse_ros2_examples) : サンプル集パッケージ
71+
* [raspimouse_slam_navigation_ros2](https://github.com/rt-net/raspimouse_slam_navigation_ros2) : SLAMとナビゲーションのパッケージ
72+
* [raspimouse_description](https://github.com/rt-net/raspimouse_description) : ロボットモデルパッケージ
73+
74+
=== "ROS 2 Foxy(非推奨)"
5875
Raspberry Piとノートパソコン等のPCそれぞれで、
5976
サンプル集パッケージ
6077
[rt-net/raspimouse_ros2_examples](https://github.com/rt-net/raspimouse_ros2_examples){target=_blank rel=noopener}

docs/raspimouse/ros/samples.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,14 @@ robot: Raspberry Pi Mouse
1010
[ROSサンプル集(rt-net/raspimouse_ros_examples)](https://github.com/rt-net/raspimouse_ros_examples){target=_blank rel=noopener} /
1111
[ROS 2サンプル集(rt-net/raspimouse_ros2_examples)](https://github.com/rt-net/raspimouse_ros2_examples){target=_blank rel=noopener}
1212
のサンプル実行方法を説明します。
13+
1314
## 使用機材 {: #requirements}
1415

1516
* 組み立て済みRaspberry Pi Mouse本体
1617
* [製品マニュアル](https://rt-net.jp/products/raspberrypimousev3/#downloads)を読んで組み立て済みの状態を前提としています
17-
* OS(**Ubuntu Server 20.04**)がインストール済みであることを前提としています
18+
* OS(**Ubuntu Server**)がインストール済みであることを前提としています
19+
* `ROS 2 Humble`を使用する場合: **Ubuntu Server 22.04**
20+
* `ROS Noetic`を使用する場合: **Ubuntu Server 20.04**
1821
* Raspberry Pi OSでのROSの動作は確認していません
1922
* **デバイスドライバ**がインストール済みであることを前提としています
2023
* [デバイスドライバのインストール手順](../driver/install.md)を参照してください
@@ -25,11 +28,12 @@ robot: Raspberry Pi Mouse
2528
* Raspberry Pi Mouse用電源
2629
* バッテリでも電源変換ケーブルつきACアダプタでも可
2730
* ノートパソコン等のPC
28-
* OS(**Ubuntu Desktop 20.04**)がインストール済みであることを前提としています
31+
* OS(**Ubuntu Desktop**)がインストール済みであることを前提としています
32+
* `ROS 2 Humble`を使用する場合: **Ubuntu Desktop 22.04**
33+
* `ROS Noetic`を使用する場合: **Ubuntu Desktop 20.04**
2934

3035
## ROSパッケージ情報の読み込み {: #load-workspace}
3136

32-
3337
=== "ROS"
3438

3539
[ROSサンプル集(rt-net/raspimouse_ros_examples)](https://github.com/rt-net/raspimouse_ros_examples){target=_blank rel=noopener}
@@ -42,7 +46,17 @@ robot: Raspberry Pi Mouse
4246
```
4347

4448

45-
=== "ROS 2"
49+
=== "ROS 2 Humble(推奨)"
50+
[ROS 2サンプル集(rt-net/raspimouse_ros2_examples)](https://github.com/rt-net/raspimouse_ros2_examples){target=_blank rel=noopener}
51+
のサンプルを実行する場合は下記コマンドを実行し、
52+
ROS 2とパッケージを読み込んでください。
53+
54+
```sh
55+
$ source /opt/ros/humble/setup.bash
56+
$ source ~/ros2_ws/install/setup.bash
57+
```
58+
59+
=== "ROS 2 Foxy(非推奨)"
4660
[ROS 2サンプル集(rt-net/raspimouse_ros2_examples)](https://github.com/rt-net/raspimouse_ros2_examples){target=_blank rel=noopener}
4761
のサンプルを実行する場合は下記コマンドを実行し、
4862
ROS 2とパッケージを読み込んでください。

0 commit comments

Comments
 (0)