【ROS】launchファイルの作成
$ roscd ros_start $ mkdir launch $ vi launch/chat.launch
<launch> <node pkg="ros_start" name="talker" type="talker.py"/> <node pkg="ros_start" name="listener" type="listener.py"/> </launch>
launchファイルはxmlで記述。
nodeタグは左から
・パッケージ名
・ノード名
・実行ファイル名
ROSの管理上は実行ファイル名ではなく、ノード名で管理される。
$ roslaunch ros_start chat.launch
$ rostopic list /chatter /rosout /rosout_agg
$ rostopic echo /chatter data: "hello world 1557123241.65" --- data: "hello world 1557123241.75" --- data: "hello world 1557123241.85" --- data: "hello world 1557123241.95" --- data: "hello world 1557123242.05" ---
rqt_graphでも確認できる
$ rqt_graph