跳到正文
Open Robotics Blog· @TanayK07 Tanay Kedia·AI 评分15

ros2_pulse 更新:Grafana 面板统计话题频率,新增 rclpy 节点与 loaned message 计数

Ros2_pulse: topic rates on a Grafana dashboard, now counting rclpy nodes and loaned messages

AI 导读

ros2_pulse 通过 LD_PRELOAD 探针新增对 rclpy 和 rclc 接收端的计数,并单独输出每个话题的 loaned message 频率。pulse-export 在 :9464 端口以 Prometheus 指标提供探针窗口数据,并支持 OTLP/HTTP 推送。相关功能包含在 0.6.0 版本中,支持 Humble、Jazzy、Kilted。

正文 · 原文

ros2_pulse Grafana dashboard

Some updates on ros2_pulse since the first post (Ros2_pulse: per-topic rates and node liveness, including intra-process, on stock binaries), the LD_PRELOAD probe that counts per-topic rates and node liveness from the tracetools hooks instead of subscribing.

Python nodes are counted on both sides now. Before, a Python subscriber’s deliveries never showed up, because rclpy isn’t instrumented. The probe now also hooks the rmw_take tracepoint, so rclpy (and rclc) receives count too. rclcpp still counts at callback_start, so nothing is counted twice. Needs Cyclone or Fast DDS, or Connext from Jazzy.

Loaned messages. At the tracepoint level a loan looks like a normal publish, or on Humble like nothing at all. The probe now wraps rcl_publish_loaned_message / rcl_take_loaned_message and prints a separate loaned rate per topic. Worth knowing: from Jazzy, Fast DDS loans any plain type by default, so a Float64 publisher may be going through loans without you asking. Came out of a question by @armaho on rclcpp#3153.

Grafana. pulse-export serves the probe’s windows as Prometheus metrics on :9464 and can push OTLP/HTTP. The screenshot above is a live run on my laptop, one camera topic drops under its 25 Hz floor and the warn lights up. Docker compose with Prometheus, Grafana and the dashboard: ros2_pulse/examples/grafana at main · TanayK07/ros2_pulse · GitHub

Smaller things. The startup banner prints the tracetools version and warns on one CI doesn’t run (thanks @christophebedard for the stability answer). pulse-top reads the default text log and has --theme light, thanks to @peci1 trying it on Kilted. A process frozen with SIGSTOP now shows the real gap after it resumes.

30 s explainer on why ros2 topic hz costs CPU on intra-process topics: https://youtu.be/YH8w2bI2EjM

Install: sudo apt install ros-$ROS_DISTRO-ros2-pulse (Humble, Jazzy, Kilted). The rclpy and loan counting are in 0.6.0, which reaches apt with the next sync, until then build from main. Code: GitHub - TanayK07/ros2_pulse: Near-zero-overhead ROS 2 topic/node frequency probe (inter + intra process) via an LD_PRELOAD tracetools shim. · GitHub

Feedback welcome, especially if it breaks on your setup.

来源:Open Robotics Blog · discourse.openrobotics.org