以下の内容はhttps://shuzo-kino.hateblo.jp/entry/2024/01/08/135650より取得しました。


rclpyを活用しJoystickでロボットアームを動かす その1:Joyの環境をROS2 humbleに構築

実際のところ

導入

$ sudo apt install ros-$ROS_DISTRO-joy*

一緒に導入されるteleop_toolsはこれのこと
GitHub - ros-teleop/teleop_tools: A set of generic teleoperation tools for any robot.

つかう

バイス名の確認

$ lsusb
...
Bus 001 Device 004: ID 044f:b10a ThrustMaster, Inc. T.16000M Joystick
...

入力デバイスをみると、js0としても認識されていました。

$  ls /dev/input/
by-id    event1  event4  event7  js0
by-path  event2  event5  event8  mice
event0   event3  event6  event9
ノードを起動
$ ros2 run joy_linux joy_linux_node
コマンドの結果

topic echoで確認してもよいですし

$ ros2 topic echo /joy

rosboardでやっても、こんな感じで確認できます




以上の内容はhttps://shuzo-kino.hateblo.jp/entry/2024/01/08/135650より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14