Header header
string child_frame_id
geometry_msgs/PoseWithCovariance pose
geometry_msgs/TwistWithCovariance twist
int64 A
int64 B
---
int64 Sum
roscd beginner_tutorials
$ mkdir msg
$ echo "int64 num" > msg/Num.msg
补充
package.xml
<build_depend>message_generationbuild_depend>
<exec_depend>message_runtimeexec_depend>
CMakeList.txt
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
message_generation
)
catkin_package(
...
CATKIN_DEPENDS message_runtime ...
...)
add_message_files(
FILES
Num.msg
)
generate_messages(
DEPENDENCIES
std_msgs
)
rosmsg show beginner_tutorials/Num
rosmsg show Num
roscd beginner_tutorials
mkdir srv
roscp rospy_tutorials AddTwoInts.srv srv/AddTwoInts.srv
补充
package.xml
<build_depend>message_generationbuild_depend>
<exec_depend>message_runtimeexec_depend>
CMakeList.txt
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
message_generation
)
add_service_files(
FILES
AddTwoInts.srv
)
rossrv show beginner_tutorials/AddTwoInts
catkin_make