<?xml version="1.0"?> <packageformat="2"> <name>beginner_tutorials</name> <version>0.0.0</version> <description>my first ros package</description>
<!-- One maintainer tag required, multiple allowed, one person per tag --> <!-- Example: --> <!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> --> <maintaineremail="guofan@ustc.edu">root</maintainer>
<!-- One license tag required, multiple allowed, one license per tag --> <!-- Commonly used license strings: --> <!-- BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 --> <license>MULAN2</license>
<!-- Url tags are optional, but multiple are allowed, one per tag --> <!-- Optional attribute type can be: website, bugtracker, or repository --> <!-- Example: --> <!-- <url type="website">http://wiki.ros.org/beginner_tutorials</url> -->
<!-- Author tags are optional, multiple are allowed, one per tag --> <!-- Authors do not have to be maintainers, but could be --> <!-- Example: --> <!-- <author email="jane.doe@example.com">Jane Doe</author> -->
<!-- The *depend tags are used to specify dependencies --> <!-- Dependencies can be catkin packages or system dependencies --> <!-- Examples: --> <!-- Use depend as a shortcut for packages that are both build and exec dependencies --> <!-- <depend>roscpp</depend> --> <!-- Note that this is equivalent to the following: --> <!-- <build_depend>roscpp</build_depend> --> <!-- <exec_depend>roscpp</exec_depend> --> <!-- Use build_depend for packages you need at compile time: --> <!-- <build_depend>message_generation</build_depend> --> <!-- Use build_export_depend for packages you need in order to build against this package: --> <!-- <build_export_depend>message_generation</build_export_depend> --> <!-- Use buildtool_depend for build tool packages: --> <!-- <buildtool_depend>catkin</buildtool_depend> --> <!-- Use exec_depend for packages you need at runtime: --> <!-- <exec_depend>message_runtime</exec_depend> --> <!-- Use test_depend for packages you need only for testing: --> <!-- <test_depend>gtest</test_depend> --> <!-- Use doc_depend for packages you need only for building documentation: --> <!-- <doc_depend>doxygen</doc_depend> --> <buildtool_depend>catkin</buildtool_depend> <build_depend>roscpp</build_depend> <build_depend>std_msgs</build_depend> <build_depend>rospy</build_depend> <build_export_depend>roscpp</build_export_depend> <build_export_depend>std_msgs</build_export_depend> <build_export_depend>rospy</build_export_depend> <exec_depend>roscpp</exec_depend> <exec_depend>std_msgs</exec_depend> <exec_depend>rospy</exec_depend>
<!-- The export tag contains other, unspecified, tags --> <export> <!-- Other tools can request additional information be placed here -->
root@workspace:~/catkin_ws# rosnode ping /turtlesim rosnode: node is [/turtlesim] pinging /turtlesim with a timeout of 3.0s xmlrpc reply from http://workspace:40521/ time=0.950575ms xmlrpc reply from http://workspace:40521/ time=1.490116ms xmlrpc reply from http://workspace:40521/ time=0.718355ms xmlrpc reply from http://workspace:40521/ time=1.216412ms xmlrpc reply from http://workspace:40521/ time=1.176596ms xmlrpc reply from http://workspace:40521/ time=1.249313ms ^Cping average: 1.133561ms
root@workspace:~# rostopic -h rostopic is a command-line tool for printing information about ROS Topics.
Commands: rostopic bw display bandwidth used by topic rostopic delay display delay of topic from timestamp in header rostopic echo print messages to screen rostopic find find topics by type rostopic hz display publishing rate of topic rostopic info print information about active topic rostopic list list active topics rostopic pub publish data to topic rostopic type print topic or field type
Type rostopic <command> -h for more detailed usage, e.g. 'rostopic echo -h'
使用rostopic type [topic]命令可以查看发布在话题上的消息的类型;使用rosmsg show [message]可以看到消息的详细信息。
1 2 3 4 5 6 7 8 9 10 11 12
root@workspace:~/catkin_ws# rostopic type /turtle1/cmd_vel geometry_msgs/Twist root@workspace:~/catkin_ws# rosmsg show geometry_msgs/Twist geometry_msgs/Vector3 linear float64 x float64 y float64 z geometry_msgs/Vector3 angular float64 x float64 y float64 z