0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ルンバをROS2を使ってキーボードで動かすまでのメモ

Last updated at Posted at 2025-09-08

弊社にはルンバがいるのですが、私の足元でずっと寝ております。
ROS2を使って操作できるようにしたので、そのメモを置いておきます。

tshell_blogさんのこちらの記事を大変参考にさせていただきました。

あくまでメモなので、もし試す場合は自己責任でお願いします

使用機材

  • iRobot Roomba 550
  • Jetson Nano
  • モバイルバッテリー
  • Wi-Fiドングル

インストール

Jetson NanoにJetPackでインストールされるOSはUbuntu 18.04 LTSですが、理由があってUbuntu 20.04にアップデートしていたので、ROS2はfoxyをインストールしました。

冒頭の記事を参考に依存パッケージなどをインストールしていきます。

あと、キーボードで操作するためにteleop_twist_keyboardもインストールしておきます。

$ sudo apt install ros-foxy-teleop-twist-keyboard

Jetson NanoとRoombaを接続する

Jetson NanoのGPIO、6(GND)、8(UART1_TXD)、10(UART1_RXD)とRoombaのシリアルポートを接続します。
image.png
Jetson Nano 2GB Developer Kit User Guideより
image.png
謎ケーブルの紹介画像より

設定を書き換える

冒頭の記事より、

ルンバと接続するシリアルポートを変更するには create_ws/install/create_bringup/share/create_bringup/config/default.yamlのdev:行を変更します。

とのことで、Jetson Nanoの場合は/dev/ttyTHS1に変更し、

$ chmod 666 /dev/ttyTHS1

でパーミッションを変更しておきます。

動かしていく

ルンバと繋いだ状態で

$ ros2 launch create_bringup create_2.launch

するとピコッと音が鳴りバッテリ残量などが表示されます。

別ターミナルで

$ ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args

を叩くと、めでたくルンバがキーボード操作で動いてくれるようになります。

良かった良かった。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?