Skip to content

tutorial teleop keyboard raspimousesim

Tiryoh edited this page Jan 31, 2017 · 1 revision

キーボードでTeleop

キーボードを使ってGazebo上のロボットを動かします。

raspimouse_controlscripts ディレクトリの中にある controller_vel_publisher.py を使用します。

こちらがPythonで記述されているRaspberry Pi Mouseのキーボード用コントローラです。

ベースシステムが起動されている状態でベースシステムとは別のTerminalウィンドウでコントローラを起動します。

rosrun raspimouse_control controller_vel_publisher.py

すると次のようにキー入力待機状態になります。

w: forward, s: backward, a: left, d: right > 

よくあるゲームの移動方法と同じで w で前進、 s で後退、 a で左へ超信地旋回、 d で右へ超信地旋回できます。

次は迷路の改造です。

Trubleshooting

vel_publisherが起動しない

Unable to register with master node [http://127.0.0.1:11311]: master may not be running yet. Will keep trying.

上記のようなメッセージが出て、コマンド入力状態にならないことがあります。

ROSトラブルシューティング#master-may-not-be-running-yetをご覧ください。