Robot Operating System 2 (ROS 2), the de facto standard middleware framework for robots, runs each robot as a graph of nodes communicating over the Data Distribution Service (DDS), a publish/subscribe substrate. Observing this inter-node communication in real time is essential to robot development, yet it has a price. A tool can receive data only by joining the DDS domain as a subscriber that discovery has matched to the publisher, so observing folds the tool into the system it measures and perturbs it. We define this protocol-inherent perturbation as the observer's probe effect. It inflates the discovery plane, adds deserialization cost on the observer, makes the loss it reports diverge from what the subscriber actually received, and near saturation displaces the subscriber's messages. The only escape, capturing all wire traffic passively, discards ROS 2 message semantics and scales with total traffic, not what is observed. We present ros2probe, a non-intrusive observation framework that removes the probe effect. It reconstructs the full ROS 2 communication state from the domain's discovery packets at no bandwidth cost, then drives an in-kernel filter restricted to the topics the user asks for, lifting only those packets at minimal cost and observing what the real subscriber receives. Its interfaces and recordings match the standard ROS 2 tools. Across three hardware platforms (laptop, Jetson, and Raspberry Pi), two DDS implementations, and seven robot-operation workloads, ros2probe holds the discovery graph within 0.5% of an unobserved system, whereas domain-joining tools inflate discovery up to 2.6$\times$ and drop 38.5% of the subscriber's messages at saturation while ros2probe drops none. It reports loss with a recall of 1.0, cuts observer CPU and memory by up to 7$\times$ and 28$\times$, and stays practical on the embedded robots where existing tools overload the system.
翻译:机器人操作系统2(ROS 2)作为机器人领域的事实标准中间件框架,通过数据分发服务(DDS,一种发布/订阅机制)将每个机器人构建为节点通信图。实时观测节点间通信对机器人开发至关重要,但这一过程需要付出代价。任何工具必须以订阅者身份加入DDS域,通过发现机制与发布者匹配后才能接收数据,因此观测行为会将工具嵌入其所测量的系统并对其产生扰动。我们将这种协议固有的扰动定义为观测者的探针效应。该效应会膨胀发现平面,增加观测器上的反序列化开销,导致其报告的丢包率与订阅者实际接收情况产生偏差,并在接近饱和时取代订阅者的消息。唯一规避方式是被动捕获所有线缆流量,但这会丢失ROS 2消息语义,且扩展成本取决于总流量而非观测对象。本文提出ros2probe——一种消除探针效应的非侵入式观测框架。它通过域发现数据包以零带宽成本重构完整的ROS 2通信状态,驱动内核级过滤器仅保留用户指定的主题,以最小开销提取这些数据包并观测真实订阅者接收的内容。其接口和记录格式与标准ROS 2工具完全兼容。在三种硬件平台(笔记本电脑、Jetson和树莓派)、两种DDS实现及七种机器人运行负载的测试中,ros2probe将发现图波动控制在未观测系统的0.5%以内,而加入域的工具会导致发现图膨胀高达2.6倍,并在饱和时丢弃38.5%的订阅者消息,但ros2probe无任何丢包。其丢包报告召回率为1.0,将观测器CPU和内存开销分别降低7倍和28倍,且能在现有工具已导致系统过载的嵌入式机器人上保持实用性。