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

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.

3 Likes

ros2_pulse 0.7.0 is out. the main bits:

  • /diagnostics. pulse_bridge can now publish a DiagnosticArray, so the expected-rate rules show up in diagnostic_aggregator and rqt_robot_monitor: WARN when /scan drops under its rate, ERROR when a node from the spec goes missing or a process stops writing.
    ros2 run ros2_pulse pulse_bridge --ros-args -p diagnostics:=true -p hardware_id:=robot1
  • the rest of rclcpp’s topic statistics. those got removed from rolling (rclcpp#3203). the bridge already published /statistics, now it also has MINIMUM, STDDEV and message_age, plus rosgraph_monitor_msgs/TopicStatistic for graph-monitor.
  • per endpoint counts. every publisher and subscription is counted on its own and tied to its node, so two subscriptions on one topic in a component container don’t blend into one rate anymore.
  • docs on docs.ros.org. proper package guide instead of the doxygen dump: Making sure you're not a bot!
  • pulse-top 0.6.1 works on ubuntu 24.04 again (thanks @peci1 for the report). pipx install ros2-pulse-top

humble, jazzy, kilted and lyrical are in the rosdistro queue, rolling is coming after.

also, thanks @Bernd_Pfrommer for trying it on event cameras and saying so here.

1 Like