ROS系统包括多个独立的节点,每个节点通过一个发布/订阅的消息范式与其他节点联系
!如下图中,publisher和subscriber都可以是节点(node)
(https://img-blog.csdn.net/20150726220005225)
举个具体例子:
ROS starts with the ROS Master. Let’s say we have a camera on our Robot. We want to be able to see the images from the camera, both on the Robot itself, and on another laptop.
ROS开始于一个Master,一如我们的机器人上有个摄像头,然后我们想在机器人和笔记本上看到照片,笔记本就有一个Image display(IDN)节点,同时机器人上也有节点,一个是Image Processing Node(IRN), 另一个是Camera Node(CN)。
首先,所有的节点都要到Master登记(register),这样Master才能知道信息要传到哪个节点
比如,CN会说他会发布XX信息(这里是image_data),其他两节点则说要订阅这个信息。
接着他收到信息后就把信息发给其他两节点了。
也可以订阅特殊服务。
•rospy = python 客户端库