理解 ROS Topic 这个教程介绍 ROS topic 和 rostopic 和 rqt_plot 命令行工具. 1
1 建立 1
1roscore 先在一个新的终端中运行 roscore; $ roscore 注意:只能运行一个 roscore
2tuetlesim 在新的终端中运行 turtlesim; $ rosrun turtlesim turtlesim_node 1
3turtle 键盘遥控 我们需要用一些东西去控制 turtle,在新的终端运行: $ rosrun turtlesim turtle_teleop_key [ INFO] 1254264546
878445000: Started node [/teleop_turtle], pid [5528], bound on [aqy], xmlrpc port [43918], tcpros port [55936], logging to [~ /ros/ros/log/teleop_turtle_5528
log], using [real] time Reading from keyboard --------------------------- Use arrow keys to move the turtle
现在你可以用键盘上的方向键控制小乌龟了(保持键盘输入窗口在焦点).再看看窗口后面发生了什么. 1
2ROS Topic turtlesim_node 和 turtle_teleop_key node 之间用 topic 交流通信. turtle_teleop_key 在这个 topic 上发布按键敲击,而 turtlesim 订阅同样的topic 接受按键敲击.让我们用 rqt_graph 显示现在正在运行的 topic 和 nodes
如果你是用 ele