-
Notifications
You must be signed in to change notification settings - Fork 30
how_to_control_raspimouse_on_sim_3
yuki edited this page May 31, 2018
·
3 revisions
part3ではキーボードを用いてシミュレータ上のラズパイマウスを動かす方法を紹介します。
キーボードを用いることで、ゲームのように操作できます。
まず、前回と同様にRaspberry Pi Mouse Simulatorの起動に従い、Gazeboを起動します。
raspimouse_control
の scripts
ディレクトリの中にある controller_vel_publisher.py
を使用します。
別のターミナルで以下のコマンドを実行します。
rosrun raspimouse_control controller_vel_publisher.py
すると次のようにキー入力待機状態になります。
w: forward, s: backward, a: left, d: right >
よくあるゲームの移動方法と同じで w
で前進、 s
で後退、 a
で左へ超信地旋回、 d
で右へ超信地旋回できます。
Unable to register with master node [http://127.0.0.1:11311]: master may not be running yet. Will keep trying.
上記のようなメッセージが出て、コマンド入力状態にならないことがあります。