msg : ROS message의 field를 설명하는 단순 text file

srv : request와 response로 이뤄져 있는 service file


1. msg 생성하기

$ roscd beginner_tutorials $ mkdir msg $ echo "int64 num" > msg/Num.msg
$ rosmake beginner_tutorials
빌드하기 전 CMakefile에서 # rosbuild_genmsg()이부분의 주석을 제거해주자


2. msg 확인하기( rosmsg show [message type] )

$ rosmsg show beginner_tutorials/Num
$ rosmsg show Num

3. srv 생성하기( roscp [package_name] [file_to_copy_path] [copy_path]$ roscd beginner_tutorials ) $ mkdir srv
$ roscp rospy_tutorials AddTwoInts.srv srv/AddTwoInts.srv
$ rosmake beginner_tutorials

마찬가지로 빌드하기전 # rosbuild_gensrv() 이부분의 주석을 제거해주자

4. srv 확인하기(rossrv show <service type>)

$ rossrv show beginner_tutorials/AddTwoInts

참고 : 도움말확인하기
$ rosmsg -h
$ rosmsg show -h


'ROS electric' 카테고리의 다른 글

Simple publisher와 subscriber 실행  (0) 2014.01.08
Simple publisher와 subscriber 작성(C++)  (0) 2014.01.08
ROS editor (rosed)  (0) 2014.01.08
roslaunch 사용하기  (0) 2014.01.08
ROS Service와 Parameter의 이해  (0) 2014.01.08
Posted by 신영식
,