(訳注:最新の情報は原文を参照してください.)
シンプルな配信者と購読者の検査
Contents
配信者の起動
roscore が準備完了して起動していることを確認しましょう:
$ roscore
前のチュートリアルでは,配信者のことを "talker" と呼びました.前回のチュートリアルで起動したノードの名前を変更して,再起動しましょう:
$ rosrun beginner_tutorials talker __name:=talker (C++) $ rosrun beginner_tutorials talker.py __name:=talker (Python)
以下のように表示されます:
[ INFO] 1251943083.656415000: I published [Hello there! This is message [0]] [ INFO] 1251943083.856573000: I published [Hello there! This is message [1]] [ INFO] 1251943084.057049000: I published [Hello there! This is message [2]] [ INFO] 1251943084.257203000: I published [Hello there! This is message [3]] [ INFO] 1251943084.457355000: I published [Hello there! This is message [4]] [ INFO] 1251943084.657545000: I published [Hello there! This is message [5]] [ INFO] 1251943084.857690000: I published [Hello there! This is message [6]]
配信者ノードは準備完了して起動しています.それでは配信者からメッセージを受け取る購読者を起動しましょう.
購読者の起動
前のチュートリアルでは購読者のことを"listener"と呼びました.前回のチュートリアルで使用したノードの名前を変更して,再起動しましょう:
$ rosrun beginner_tutorials listener __name:=listener (C++) $ rosrun beginner_tutorials listener.py __name:=listener (Python)
以下のように表示されます:
[ INFO] 1251943144.400553000: Received [Hello there! This is message [1]] [ INFO] 1251943144.600712000: Received [Hello there! This is message [2]] [ INFO] 1251943144.801003000: Received [Hello there! This is message [3]] [ INFO] 1251943145.001407000: Received [Hello there! This is message [4]] [ INFO] 1251943145.201229000: Received [Hello there! This is message [5]] [ INFO] 1251943145.401417000: Received [Hello there! This is message [6]]
ここでは,シンプルな配信者と購読者について検査しました.次はシンプルなサービスとクライアントを作りましょう.(python) (c++).






