ROS学习手记 - 4 理解ROS中的基本概念_ROS_Topics
ROS学习手记 - 4 理解ROS中的基本概念_ROS_Topics 参考步骤:http://wiki.ros.org/ROS/Tutorials/UnderstandingTopics Understanding ROS’s Topics This tutorial introduces ROS topics as well as using therostopic andrqt_plot commandline tools. 复习一下教程里关于Topic的解释: 1. 准备工作 确认运行roscore之后,开始我们的turtlesim之旅 2. 用rosrun开了两个node, 一个是显示turtlesim窗口的turtlesim turtlesim_node $ rosrun turtlesim turtlesim_node 一个是接收用户keyboard指令的turtlesim turtle_teleop_key $ rosrun turtlesim turtle_teleop_key 3. rqt_graph工具 turtle_teleop_key是publisher,turtlesim_node是listener,用rqt_graph来看当前运行的nodes&topics. 用rqt_graph工具图形化地查看当前的node和topic运行状态,主从关系等。 $ rosrun rqt_graph rqt_graph 4. 使用rostopic工具分析topic相关信息 $rostopic -h //查看说明 4.1 使用rostopic echo打印发送在topic上的数据 rostopic echo shows the data published on a topic. rostopic echo [topic] 4.2 使用rostopic list查看当前的topic是从属于谁,又领导谁 $ rostopic list -h //查看说明 4.3 使用rostopic hz 显示topic发布的频率 Usage: rostopic hz [topic]
…