@@ -5,9 +5,8 @@ robot: Raspberry Pi Mouse
5
5
6
6
# シミュレータのインストール
7
7
8
- Raspberry Pi Mouse SimulatorはメインボードにRaspberry Piを使った左右独立二輪方式の小型移動プラットフォームロボット、Raspberry Pi Mouseのシミュレータです。
8
+ Raspberry Pi Mouse Simulator( [ rt-net/raspimouse_sim ] ( https://github.com/rt-net/raspimouse_sim ) {target= _ blank rel=noopener})はメインボードにRaspberry Piを使った左右独立二輪方式の小型移動プラットフォームロボット、Raspberry Pi Mouseのシミュレータです。
9
9
10
- Gazebo上で動きます。ROSとGazeboがインストールされた環境で使用することができます。
11
10
12
11
このページでは、
13
12
[ rt-net/raspimouse_sim] ( https://github.com/rt-net/raspimouse_sim ) {target=_ blank rel=noopener}
@@ -16,44 +15,102 @@ Gazebo上で動きます。ROSとGazeboがインストールされた環境で
16
15
## 使用機材 {: #requirements}
17
16
18
17
* ノートパソコン等のPC
19
- * OS(** Ubuntu Desktop 20.04** )およびROS/ROS 2がインストール済みであることを前提としています
18
+ * OS(** Ubuntu Desktop** )がインストール済みであることを前提としています
19
+ * ` ROS 2 Humble ` を使用する場合: ** Ubuntu Desktop 22.04**
20
+ * ` ROS Noetic ` を使用する場合: ** Ubuntu Desktop 20.04**
21
+ * ROSまたはROS 2がインストール済みであることを前提としています
20
22
* インストール方法については[ ROS/ROS 2のインストール] ( ../ros/install.md ) を参照してください。
21
23
22
24
## パッケージのダウンロードとインストール {: #install}
23
25
24
26
=== "ROS"
25
27
次のコマンドを実行します。
26
28
29
+ シミュレータパッケージのダウンロード
30
+
31
+ ```sh
32
+ cd ~/catkin_ws/src
33
+ git clone https://github.com/rt-net/raspimouse_sim.git
34
+ ```
35
+
36
+ 依存パッケージをインストール
37
+
38
+ ```sh
39
+ git clone https://github.com/rt-net/raspimouse.git
40
+ git clone https://github.com/rt-net/raspimouse_description.git
41
+ rosdep install -r -y -i --from-paths raspimouse*
42
+ ```
43
+
44
+ パッケージをビルド
45
+
46
+ ```sh
47
+ cd ~/catkin_ws && catkin_make
48
+ source ~/catkin_ws/devel/setup.bash
49
+ ```
50
+
51
+ Gazeboで使用するハードウェアモデルデータをダウンロード
52
+
53
+ ```sh
54
+ rosrun raspimouse_gazebo download_gazebo_models.sh
55
+ ```
56
+
57
+ === "ROS 2"
58
+ 次のコマンドを実行します。
59
+
60
+ シミュレータパッケージのダウンロード
61
+
27
62
```sh
28
- # シミュレータパッケージのダウンロード
29
- $ cd ~/catkin_ws/src
30
- $ git clone https://github.com/rt-net/raspimouse_sim.git
63
+ cd ~/ros2_ws/src
64
+ git clone -b humble-devel https://github.com/rt-net/raspimouse_sim.git
65
+ ```
31
66
32
- # 依存パッケージをインストール
33
- $ git clone https://github.com/rt-net/raspimouse.git
34
- $ git clone https://github.com/rt-net/raspimouse_description.git
35
- $ rosdep install -r -y -i --from-paths raspimouse*
67
+ 依存パッケージをインストール
36
68
37
- # パッケージをビルド
38
- $ cd ~/catkin_ws && catkin_make
39
- $ source ~/catkin_ws/devel/setup.bash
69
+ ```sh
70
+ git clone -b humble-devel https://github.com/rt-net/raspimouse_ros2_examples.git
71
+ rosdep install -r -y -i --from-paths raspimouse*
72
+ ```
73
+
74
+ パッケージをビルド
40
75
41
- # Gazeboで使用するハードウェアモデルデータをダウンロード
42
- $ rosrun raspimouse_gazebo download_gazebo_models.sh
76
+ ```sh
77
+ cd ~/ros2_ws
78
+ colcon build --symlink-install
79
+ source ~/ros2_ws/install/setup.bash
43
80
```
44
81
45
82
## 動作確認(キーボードで操縦) {: #teleop}
46
83
47
84
=== "ROS"
48
85
次のコマンドを実行します。
49
86
50
- ```sh
51
- # シミュレータの起動
52
- $ roslaunch raspimouse_gazebo raspimouse_with_samplemaze.launch
87
+ シミュレータの起動
53
88
54
- # 別のターミナルでコマンドを実行
55
- $ rosrun teleop_twist_keyboard teleop_twist_keyboard.py _speed:=0.1 _turn:=1.57
89
+ ```sh
90
+ roslaunch raspimouse_gazebo raspimouse_with_samplemaze.launch
56
91
```
57
92
93
+ 別のターミナルでコマンドを実行
94
+
95
+ ```sh
96
+ rosrun teleop_twist_keyboard teleop_twist_keyboard.py _speed:=0.1 _turn:=1.57
97
+ ```
58
98
59
99

100
+
101
+ === "ROS 2"
102
+ 次のコマンドを実行します。
103
+
104
+ シミュレータの起動
105
+
106
+ ```sh
107
+ ros2 launch raspimouse_gazebo raspimouse_with_emptyworld.launch.py
108
+ ```
109
+
110
+ 別のターミナルでコマンドを実行
111
+
112
+ ```
113
+ ros2 run teleop_twist_keyboard teleop_twist_keyboard
114
+ ```
115
+
116
+ 
0 commit comments