LoginSignup
0
2

More than 5 years have passed since last update.

ROS_21:Roomba Driver Install

Last updated at Posted at 2016-05-29

ルンバを622をROSで使用する。
roomba_500_ROS_driversはルンバ500用みたいなので、create_autonomyを使ってみます。

参考

Install

関連パッケージのインストール

$ sudo apt-get install python-rosdep python-catkin-tools

コンパイル

catkin workspaceを作る

$ mkdir -p create_ws/src
$ cd create_ws
$ catkin init  

Clone this repo

$ cd ~/create_ws/src
$ git clone https://github.com/AutonomyLab/create_autonomy.git  

※Githubのsrcに移る指示がないけど、srcの下に展開しないとパッケージが作成されない。

Install dependencies

$ cd ~/create_ws
$ rosdep update  
$ rosdep install --from-paths src -i  

$ sudo -H apt-get install-ros-jade-joy-teleopを実行するのでパスワードを入れろってメッセージが表示された。

Build

$ catkin build

USB Permissions

ユーザをdialoutグループに入れるらしい。

$ sudo usermod -a -G dialout $USER

実行したら、有効にするためにログアウトして再ログイン

設定・実行

環境設定

$ source ~/create_ws/devel/setup.bash

接続

ハードはこれを見て
http://qiita.com/NextWorld/items/e5f5173ff45365c1e1a5

ノードの実行

$ roslaunch ca_driver create_2.launch

試し

topicの/set_asciiを実行してみる。
まずは、topicが登録されているか、rostopic listを実行
次、型を見るrostopic info /set_asciiを実行 std_msg/Uint8MultiArrayとの事
次 型の詳細を見るrosmesg show std_msg/Uint8MultiArrayを実行
rostopic pub -1 /set_ascii std_msgs/Uint8MultiArray '{data:[34,35]}'を実行したけど、やっぱりこれは動かない。(LEDは基板上にあったけど、紙で遮ってあった)

同様に/power_ledを実行してみた。
rostopic pub -1 /set_ascii std_msgs/Uint8MultiArray '{data:[0]}'で電源が緑
rostopic pub -1 /set_ascii std_msgs/Uint8MultiArray '{data:[255]}'で電源が赤
途中の数値で赤と緑のLEDの強さ配分が変わるみたい。

0
2
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
2