xycar_ws
├ src
│ └ msg_send
│ ├ src
│ │ ├ teacher.py
│ │ └ student.py
│ └ launch
│ └ m_send.launch
├ build
└ devel
chmod +x *my_topicteacher - publisher : 토픽에 'call me please' 담아서 전송student - subscriber : 토픽 받아서 message 꺼내서 화면에 출력Rate(2)rate.sleep()에서 작동rospy.spin()roslaunch msg_send m_send.launch
rqt_graph
xycar_ws
├ src
│ └ msg_send
│ ├ src
│ │ ├ teacher_int.py
│ │ └ student_int.py
│ └ launch
│ └ m_send_1n.launch
├ build
└ devel
anonymous=True 노드를 여러 개 사용 시 이름을 달리해야 함
rqt_graph
### N:1 통신
topic 변수 선언이라고 보면 됨
xycar_ws
├ src
│ └ msg_send
│ ├ src
│ ├ msg
│ │ └ my_msg.msg
│ ├ CMakeList.txt
│ └ package.xml
├ build
└ devel
<build_depend>message_generation</build_depend>
<exec_depend>message_runtime</exec_depend>
vim -d CMakeList.txt CMakeList_copy.txt
~/xycar_ws/devel/lib/python2.7/dist-packages/msg_send/msg 생성 확인
roslaunch msg_send m_send_r.launch
std_msgs 있는걸로 봐선 여기가 표준 함수 import 위치인 것 같고..
파이썬 경로가 ~/xycar_ws/devel/lib/python2.7/dist-packages를 가지고 있지 않음
3시간 헤매다 우연히 새로운 터미널 오픈
가끔 이런 어이없는 에러나면 엄한데서 서칭하지 말고 챗지피티한테 묻지도 말고 욕하지도 말고 그냥 터미널 한번 껐다 켜보기
roscore
rosrun msg_send msg_sender.py
rosrun msg_send msg_receiver.py
roslaunch msg_send m_send_r.launch