Skip to content

Commit 5e4db91

Browse files
authored
CRANE+ V2のチュートリアルにHumbleの情報を追加 (#34)
1 parent e74c9de commit 5e4db91

File tree

4 files changed

+382
-57
lines changed

4 files changed

+382
-57
lines changed

docs/cranev2/ros/install.md

Lines changed: 75 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -12,52 +12,98 @@ robot: CRANE+ V2
1212
* 設置済みCRANE+ V2本体
1313
* [製品マニュアル](https://rt-net.jp/products/cranev2/)を読んで設置済みの状態を前提としています
1414
* ノートパソコン等のPC
15-
* OS(**Ubuntu Desktop 20.04**)がインストール済みであることを前提としています
15+
* OS(**Ubuntu Desktop**)がインストール済みであることを前提としています
16+
* `ROS 2 Humble`を使用する場合(推奨): **Ubuntu Desktop 22.04**
17+
* `ROS 2 Foxy`を使用する場合(非推奨): **Ubuntu Desktop 20.04**
18+
19+
!!! info
20+
`ROS 2 Foxy`は2023年6月にEOL(サポート終了)を迎えたため、`ROS 2 Humble`の使用を推奨しています。
1621

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

19-
=== "ROS 2"
24+
=== "ROS 2 Humble(推奨)"
25+
26+
[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}
27+
を参考に、`ROS 2 Humble`をインストールします。
28+
29+
GUIを使用する場合は`Desktop`を、 使用しない場合は`ROS-Base`パッケージをインストールします。
30+
31+
[https://docs.ros.org/en/humble/Tutorials/Colcon-Tutorial.html](https://docs.ros.org/en/humble/Tutorials/Colcon-Tutorial.html){target=_blank rel=noopener}
32+
を参考に、パッケージビルドツールの`colcon`をインストールします。
2033

21-
[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}
22-
を参考に、`ROS 2 Foxy`をインストールします。
34+
=== "ROS 2 Foxy(非推奨)"
2335

24-
GUIを使用する場合は`Desktop`を、 使用しない場合は`ROS-Base`パッケージをインストールします。
36+
[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}
37+
を参考に、`ROS 2 Foxy`をインストールします。
2538

26-
[https://docs.ros.org/en/foxy/Tutorials/Colcon-Tutorial.html](https://docs.ros.org/en/foxy/Tutorials/Colcon-Tutorial.html){target=_blank rel=noopener}
27-
を参考に、パッケージビルドツールの`colcon`をインストールします。
39+
GUIを使用する場合は`Desktop`を、 使用しない場合は`ROS-Base`パッケージをインストールします。
40+
41+
[https://docs.ros.org/en/foxy/Tutorials/Colcon-Tutorial.html](https://docs.ros.org/en/foxy/Tutorials/Colcon-Tutorial.html){target=_blank rel=noopener}
42+
を参考に、パッケージビルドツールの`colcon`をインストールします。
2843

2944
## ROS 2のインストール(インストールスクリプトを使う場合) {: #install-script}
3045

3146
非公式のインストールスクリプトを使うことで簡単にROS 2をインストールできます。
3247

33-
=== "ROS 2"
48+
=== "ROS 2 Humble(推奨)"
49+
50+
このROS 2インストールスクリプトは`curl`と`git`を使用します。以下のコマンドで
51+
インストールします。
52+
53+
```sh
54+
sudo apt install -y curl git
55+
```
56+
57+
以下のコマンドでROS 2インストールスクリプトを実行します。
58+
環境にもよりますが完了までは10分以上かかる場合があります。
59+
60+
```sh
61+
git clone https://github.com/Tiryoh/ros2_setup_scripts_ubuntu.git
62+
cd ros2_setup_scripts_ubuntu
63+
./ros2-humble-desktop-main.sh
64+
```
65+
66+
スクリプトが問題なく実行できれば以下のメッセージが表示されます。
67+
68+
```txt
69+
Success installing ROS humble
70+
Run 'source ~/.bashrc'
71+
```
72+
73+
以下のコマンドでインストールした設定を読み込みます。
74+
75+
```sh
76+
source ~/.bashrc
77+
```
78+
79+
=== "ROS 2 Foxy(非推奨)"
3480

35-
このROS 2インストールスクリプトは`curl``git`を使用します。以下のコマンドで
36-
インストールします。
81+
このROS 2インストールスクリプトは`curl`と`git`を使用します。以下のコマンドで
82+
インストールします。
3783

38-
```sh
39-
sudo apt install -y curl git
40-
```
84+
```sh
85+
sudo apt install -y curl git
86+
```
4187

42-
以下のコマンドでROS 2インストールスクリプトを実行します。
43-
環境にもよりますが完了までは10分以上かかる場合があります。
88+
以下のコマンドでROS 2インストールスクリプトを実行します。
89+
環境にもよりますが完了までは10分以上かかる場合があります。
4490

45-
```sh
46-
git clone https://github.com/Tiryoh/ros2_setup_scripts_ubuntu.git
47-
cd ros2_setup_scripts_ubuntu
48-
./ros2-foxy-desktop-main.sh
49-
```
91+
```sh
92+
git clone https://github.com/Tiryoh/ros2_setup_scripts_ubuntu.git
93+
cd ros2_setup_scripts_ubuntu
94+
./ros2-foxy-desktop-main.sh
95+
```
5096

51-
スクリプトが問題なく実行できれば以下のメッセージが表示されます。
97+
スクリプトが問題なく実行できれば以下のメッセージが表示されます。
5298

53-
```txt
54-
Success installing ROS foxy
55-
Run 'source ~/.bashrc'
56-
```
99+
```txt
100+
Success installing ROS foxy
101+
Run 'source ~/.bashrc'
102+
```
57103

58-
以下のコマンドでインストールした設定を読み込みます。
104+
以下のコマンドでインストールした設定を読み込みます。
59105

60-
```sh
61-
source ~/.bashrc
62-
```
106+
```sh
107+
source ~/.bashrc
108+
```
63109

docs/cranev2/ros/package-install.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,30 @@ robot: CRANE+ V2
1212
* 設置済みCRANE+ V2本体
1313
* [製品マニュアル](https://rt-net.jp/products/cranev2/)を読んで設置済みの状態を前提としています
1414
* ノートパソコン等のPC
15-
* OS(**Ubuntu Desktop 20.04**)がインストール済みであることを前提としています
15+
* OS(**Ubuntu Desktop**)がインストール済みであることを前提としています
16+
* `ROS 2 Humble`を使用する場合(推奨): **Ubuntu Desktop 22.04**
17+
* `ROS 2 Foxy`を使用する場合(非推奨): **Ubuntu Desktop 20.04**
1618
* ROS 2がインストール済みであることを前提としています
1719
* [ROS 2のインストール手順](./install.md)を参照してください
1820

1921
## ROS 2パッケージのインストール {: #installation-binary}
2022

21-
=== "ROS 2"
23+
=== "ROS 2 Humble(推奨)"
2224

23-
ノートパソコン等のPCに、
24-
ROS 2パッケージ[rt-net/crane_plus](https://github.com/rt-net/crane_plus){target=_blank rel=noopener}
25-
をインストールします。
25+
ノートパソコン等のPCに、
26+
ROS 2パッケージ[rt-net/crane_plus](https://github.com/rt-net/crane_plus){target=_blank rel=noopener}
27+
をインストールします。
2628

27-
```sh
28-
sudo apt install ros-foxy-crane-plus
29-
```
29+
```sh
30+
sudo apt install ros-humble-crane-plus
31+
```
32+
33+
=== "ROS 2 Foxy(非推奨)"
34+
35+
ノートパソコン等のPCに、
36+
ROS 2パッケージ[rt-net/crane_plus](https://github.com/rt-net/crane_plus){target=_blank rel=noopener}
37+
をインストールします。
38+
39+
```sh
40+
sudo apt install ros-foxy-crane-plus
41+
```

docs/cranev2/ros/samples.md

Lines changed: 125 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ robot: CRANE+ V2
1414
* 設置済みCRANE+ V2本体
1515
* [製品マニュアル](https://rt-net.jp/products/cranev2/)を読んで設置済みの状態を前提としています
1616
* ノートパソコン等のPC
17-
* OS(**Ubuntu Desktop 20.04**)がインストール済みであることを前提としています
17+
* OS(**Ubuntu Desktop**)がインストール済みであることを前提としています
18+
* `ROS 2 Humble`を使用する場合(推奨): **Ubuntu Desktop 22.04**
19+
* `ROS 2 Foxy`を使用する場合(非推奨): **Ubuntu Desktop 20.04**
1820
* ROS 2がインストール済みであることを前提としています
1921
* [ROS 2のインストール手順](./install.md)を参照してください
2022
* ROS 2用のパッケージがインストール済みであることを前提としています
@@ -36,16 +38,130 @@ sudo chmod 666 /dev/ttyUSB0
3638

3739
## ROS 2サンプルの実行 {: examples}
3840

41+
### gripper_control
42+
3943
=== "ROS 2"
4044

41-
次のコマンドでmove_group(`crane_plus_moveit_config`)とcontroller(`crane_plus_control`)を起動します。
45+
詳しい実行手順は[サンプル集のgripper_control](https://github.com/rt-net/crane_plus/tree/master/crane_plus_examples#gripper_control){target=_blank rel=noopener}
46+
を参照してください。
4247

43-
```sh
44-
ros2 launch crane_plus_examples demo.launch.py port_name:=/dev/ttyUSB0
45-
```
48+
次のコマンドでmove_group(`crane_plus_moveit_config`)とcontroller(`crane_plus_control`)を起動します。
49+
50+
```sh
51+
ros2 launch crane_plus_examples demo.launch.py port_name:=/dev/ttyUSB0
52+
```
53+
54+
別のターミナルで次のコマンドを実行すると、CRANE+ V2のグリッパが開閉します。
55+
56+
```sh
57+
ros2 launch crane_plus_examples example.launch.py example:='gripper_control'
58+
```
4659

47-
別のターミナルで次のコマンドを実行すると、CRANE+ V2のグリッパが開閉します。
60+
<img src="https://rt-net.github.io/images/crane-plus/gripper_control.gif" width="500">
4861

49-
```sh
50-
ros2 launch crane_plus_examples example.launch.py example:='gripper_control'
51-
```
62+
### pose_groupstate
63+
64+
=== "ROS 2"
65+
66+
詳しい実行手順は[サンプル集のpose_groupstate](https://github.com/rt-net/crane_plus/blob/master/crane_plus_examples/README.md#pose_groupstate){target=_blank rel=noopener}
67+
を参照してください。
68+
69+
次のコマンドでmove_group(`crane_plus_moveit_config`)とcontroller(`crane_plus_control`)を起動します。
70+
71+
```sh
72+
ros2 launch crane_plus_examples demo.launch.py port_name:=/dev/ttyUSB0
73+
```
74+
75+
別のターミナルで次のコマンドを実行すると、CRANE+ V2が`home`と`vertical`の姿勢へ移行します。
76+
77+
```sh
78+
ros2 launch crane_plus_examples example.launch.py example:='pose_groupstate'
79+
```
80+
81+
<img src="https://rt-net.github.io/images/crane-plus/pose_groupstate.gif" width="500">
82+
83+
### joint_values
84+
85+
=== "ROS 2"
86+
87+
詳しい実行手順は[サンプル集のjoint_values](https://github.com/rt-net/crane_plus/blob/master/crane_plus_examples/README.md#joint_values){target=_blank rel=noopener}
88+
を参照してください。
89+
90+
次のコマンドでmove_group(`crane_plus_moveit_config`)とcontroller(`crane_plus_control`)を起動します。
91+
92+
```sh
93+
ros2 launch crane_plus_examples demo.launch.py port_name:=/dev/ttyUSB0
94+
```
95+
96+
別のターミナルで次のコマンドを実行すると、CRANE+ V2の各関節が一つずつ変化します。
97+
98+
```sh
99+
ros2 launch crane_plus_examples example.launch.py example:='joint_values'
100+
```
101+
102+
<img src="https://rt-net.github.io/images/crane-plus/joint_values.gif" width="500">
103+
104+
### pick_and_place
105+
106+
=== "ROS 2"
107+
108+
詳しい実行手順は[サンプル集のpick_and_place](https://github.com/rt-net/crane_plus/blob/master/crane_plus_examples/README.md#pick_and_place){target=_blank rel=noopener}
109+
を参照してください。
110+
111+
次のコマンドでmove_group(`crane_plus_moveit_config`)とcontroller(`crane_plus_control`)を起動します。
112+
113+
```sh
114+
ros2 launch crane_plus_examples demo.launch.py port_name:=/dev/ttyUSB0
115+
```
116+
117+
別のターミナルで次のコマンドを実行すると、CRANE+ V2がピックアンドプレース動作を行います。
118+
119+
```sh
120+
ros2 launch crane_plus_examples example.launch.py example:='pick_and_place'
121+
```
122+
123+
<img src="https://rt-net.github.io/images/crane-plus/pick_and_place.gif" width="500">
124+
125+
## ROS 2カメラサンプルの実行 {: camera_examples}
126+
127+
### aruco_detection
128+
129+
=== "ROS 2"
130+
131+
詳しい実行手順は[サンプル集のaruco_detection](https://github.com/rt-net/crane_plus/blob/master/crane_plus_examples/README.md#aruco_detection){target=_blank rel=noopener}
132+
を参照してください。
133+
134+
次のコマンドでmove_group(`crane_plus_moveit_config`)とcontroller(`crane_plus_control`)、カメラノードを起動します。
135+
136+
```sh
137+
ros2 launch crane_plus_examples demo.launch.py port_name:=/dev/ttyUSB0 use_camera:=true video_device:=/dev/video0
138+
```
139+
140+
別のターミナルで次のコマンドを実行すると、カメラ画像から物体に取り付けたマーカを検出し、CRANE+ V2がピックアンドプレースを行います。
141+
142+
```sh
143+
ros2 launch crane_plus_examples example.launch.py example:='aruco_detection'
144+
```
145+
146+
<img src="https://rt-net.github.io/images/crane-plus/aruco_detection.gif" width="500">
147+
148+
### color_detection
149+
150+
=== "ROS 2"
151+
152+
詳しい実行手順は[サンプル集のcolor_detection](https://github.com/rt-net/crane_plus/blob/master/crane_plus_examples/README.md#color_detection){target=_blank rel=noopener}
153+
を参照してください。
154+
155+
次のコマンドでmove_group(`crane_plus_moveit_config`)とcontroller(`crane_plus_control`)、カメラノードを起動します。
156+
157+
```sh
158+
ros2 launch crane_plus_examples demo.launch.py port_name:=/dev/ttyUSB0 use_camera:=true video_device:=/dev/video0
159+
```
160+
161+
別のターミナルで次のコマンドを実行すると、カメラ画像から特定の色の物体を検出し、CRANE+ V2がピックアンドプレースを行います。
162+
163+
```sh
164+
ros2 launch crane_plus_examples example.launch.py example:='color_detection'
165+
```
166+
167+
<img src="https://rt-net.github.io/images/crane-plus/color_detection.gif" width="500">

0 commit comments

Comments
 (0)