카테고리 없음
roslaunch
sunlab
2019. 9. 6. 21:40
728x90
패키지 안에 launch 폴더를 만들어서 .launch 파일을 만든다.
노드파일들은 src 폴더에 넣는다.
.launch 파일 내에 node tag 안의 type 속성에
type="talker.py" 와 같이 노드파일의 확장자까지 표시해준다.
launch 파일 실행전에 launch 파일에 명시된 노드 파일들은
chmod +x [파일이름] 해서 실행가능한 상태로 만들어 주어야한다.
roslaunch [패키지 이름] [launch 파일]
ex) roslaunch ros_tutorials_topic union.launch
rqt_graph 로 현재 실행중인 노드들 그래프를 볼 수 있다.
--screen 옵션을 사용하면 로그들을 볼 수 있다.
ex) roslaunch ros_tutorials_topic union.launch --screen
참고)
publisher and subscriber
http://wiki.ros.org/rospy_tutorials/Tutorials/WritingPublisherSubscriber
[ROS In 5 Minutes] 006 - What is a ROS launch file?
https://www.youtube.com/watch?v=pCBwos89fI0