Pakage create & run
// 패키지 생성
cd ~/xycar_ws/src
catkin_create_pkg <msg_send> [std_msgs] [rospy] # 패키기가 의존하고 있는 다른 패키지 나열
catkin_make
//src
cd src
vi student.py
vi teacher.py
// launch
mkdir launch
cd launch
vi m_send.launch
// build
cm
//launch
roslaunch msg_send m_send.launch
동일한 노드를 여러개 띄울 때 노드 이름이 겹치지 않도록 자동으로 할당하는 rospy option
<launch>
<node pkg="msg_send" type="teacher.py" name="teacher1"/>
<node pkg="msg_send" type="student.py" name="student1" output="screen"/>
<node pkg="msg_send" type="student.py" name="student2" output="screen"/>
<node pkg="msg_send" type="student.py" name="student3" output="screen"/>
</launch>
<launch>
<node pkg="msg_send" type="teacher.py" name="teacher1"/>
<node pkg="msg_send" type="teacher.py" name="teacher2"/>
<node pkg="msg_send" type="teacher.py" name="teacher3"/>
<node pkg="msg_send" type="student.py" name="student1" output="screen"/>
</launch>
<launch>
<node pkg="msg_send" type="teacher.py" name="teacher1"/>
<node pkg="msg_send" type="teacher.py" name="teacher2"/>
<node pkg="msg_send" type="teacher.py" name="teacher3"/>
<node pkg="msg_send" type="student.py" name="student1" output="screen"/>
<node pkg="msg_send" type="student.py" name="student2" output="screen"/>
<node pkg="msg_send" type="student.py" name="student3" output="screen"/>
</launch>