Repository navigation
v0.7.0: /diagnostics, rclcpp topic statistics parity, per-endpoint counts
/diagnostics for diagnostic_aggregator, the rest of rclcpp's removed topic statistics (MINIMUM, STDDEV, message_age), graph-monitor messages, per-endpoint counts, and a package guide on docs.ros.org. pulse-top 0.6.0 reads the endpoint fields.
Changed
- The probe counts per publisher and per subscription, attributed to the owning node.
Counters used to be keyed by topic per process, so every endpoint of a topic in one process
shared one counter. Two subscriptions on one topic (a component container, or one node
subscribing twice) interleaved one inter-arrival stream, two subscriptions of one node summed
into one rate, and every node's/rosoutand/parameter_eventsendpoints shared one counter,
so one node's log line kept every node of the process in theNODElist (found in the #68 and
#70 reviews). Each rcl publisher handle and rcl subscription handle now has its own counter,
attributed to the node whose handle its init carried (including the/rosoutpublisher rcl
creates beforercl_node_init's tracepoint fires). The hot path is still one relaxed add, on
the handle's own counter; the per-topicTOPIC/PUB/RECV/LOANrates are summed at
flush time and are unchanged, and the per-topicJITTERgap keeps measuring the gap between
any two messages of the topic. With gap tracking on, each arrival also updates its handle's
own gap from the same clock read (one more atomic exchange). Node liveness now looks only at a
node's own endpoints. A publisher or subscription address reused after a destroy re-homes its
endpoint, which also stops a recycled publisher handle from counting into its previous topic. - Destroyed publishers, subscriptions and nodes are retired. There is no destroy tracepoint,
so the probe now also wrapsrcl_publisher_fini,rcl_subscription_finiandrcl_node_fini
by name (graph-rate calls, the per-message path is unchanged). A destroyed endpoint is written
once more if its last window carried traffic, then dropped; before, a subscription removed in a
lifecycleon_cleanup(or by unloading a component) stayed in every window as a stalled
inter=0.0endpoint of a live node, and a destroyed publisher's open gap grew without bound
with gap tracking on. A node address reused by the next node no longer hands that node the
destroyed node's endpoints: only the new node's own pre-init/rosoutpublisher is claimed.
A callback address reused by a re-created subscription is re-resolved (its endpoint is proven
again for KNOWN_ISSUES #12, and counts no longer go to the destroyed subscription), and the
thread-local cache is tagged by kind, so a publisher handle address reused as a subscription
handle (or the reverse) is never served the other one's endpoint (PR #72 review).
Added
pulse_bridgepublishes/diagnostics(diagnostics:=true). One
diagnostic_msgs/DiagnosticArrayper poll fordiagnostic_aggregator: a status per
expected-rate rule (ros2_pulse: /scan (recv),WARNwhile the probe warnstopic_rateor
topic_gapfor it, withhz, the rule's bounds and the measured gap as values), per spec node
(ERRORonnode_missing), and per log (ERRORstaleonce no window arrived for two
window periods plus a poll; a log whose latest window is the probe's exit window is dropped
instead, a clean exit is not a fault). The levels come from the probe'swarns; the bridge reads the
spec (expected_file, default$ROS_TOPIC_STATS_EXPECTED) only to know the rules, so a rule
that holds reportsOK. New parameters:diagnostics,diagnostics_topic,hardware_id,
diagnostics_all_topics(also report topics without a rule),expected_file.package.xml
now declaresdiagnostic_msgs. The jsonl reader (sLogWindow::warns) now parseswarns;
pulse-checkstill ignores them and judges the raw rates.- Per-endpoint breakdown in the output, additive. jsonl records gain an
endpointsarray
(always present in probe output): one entry per publisher / subscription withtopic,
side(pub/recv), a process-uniqueid,node(absent when unknown),inter_hz,
intra_hz, andmax_dt_ms/loaned_hzwhen measured. Text windows get the same asEP
lines with the newROS_TOPIC_STATS_ENDPOINTS=1; without it the text output is unchanged.
Same emit gates as the topic lines; filtered topics stay filtered.pulse-check's reader
(and sopulse_bridge) parses both intosLogWindow::endpoints; pulse-top parses them into
Window.endpointsand treatsEPas a known line kind. One malformedendpointselement
costs pulse-top that element only, never the window. TextEPlines need pulse-top
0.6.0: pulse-top /pulse-export0.5.0 count eachEPline as a skipped line
(ros2_pulse_lines_skipped_total); jsonl works with 0.5.0, which ignores the key. pulse_bridgepublishes the rest of what rclcpp's built-in topic statistics did. Those
were removed from Rolling by rclcpp#3203. With
ROS_TOPIC_STATS_JITTER=1,message_periodmessages now carryMINIMUMandSTDDEVof the
received inter-arrival period next toAVERAGE,MAXIMUMandSAMPLE_COUNT, in
libstatistics_collector's order (AVERAGE,MAXIMUM,MINIMUM,SAMPLE_COUNT,STDDEV).
Withmetrics_source:=metricevery message carries all five points, NaN when unmeasured, as
upstream did; the default topic layout leaves an unmeasured point out. The probe keeps the
minimum and the running sums for these per subscription, next to that subscription's own gap
accumulator, and pools them per topic at flush time, so two subscriptions on one topic never
interleave their intervals: lock-free, about +3 ns per receive, and only while gap tracking is
on.message_age. Thermw_takehook now also reads the DDS source timestamp it already
received, and with gap tracking on records local wall clock minus that timestamp per
inter-process take, for rclcpp subscriptions too (their receive is still counted at
callback_start). The newmetrics_source:=metricbridge parameter publishes it as rclcpp
did:metrics_sourceismessage_age/message_period(in that order, one pair per
receive-side topic,message_ageempty withSAMPLE_COUNT0 when unmeasured; publisher-only
topics are left out),measurement_source_namethe node.
This matches rclcpp Jazzy+ (now - message_info.source_timestamp, negative ages from a
publisher whose clock runs ahead are kept); Humble / Iron rclcpp usedheader.stamp, which
needs the message type.
Intra-process deliveries never reachrmw_takeand carry no age, with one exception: with
intra-process comms on and a remote subscriber present, the DDS copy that rclcpp takes and
discards in the same-process subscription is still age-sampled atrmw_take(counts and the
receive period are unaffected). Cost: one wall-clock read per take with a source timestamp,
about +26 ns on x86-64.- jsonl topic entries gain
recv_min_dt_ms,recv_stddev_dt_msandrecv_age_avg_ms/
recv_age_min_ms/recv_age_max_ms/recv_age_stddev_ms/recv_age_count, each group
only when measured. The text format is unchanged.recv_age_stddev_ms(and the ageSTDDEV
point) is dropped for a window whose ages spread over more than ~71 min rather than reported
wrapped; a constant cross-host clock skew does not affect it. - jsonl
endpointsentries of a subscription gain its own receive distributions, the
per-subscription twins of the topic keys above:avg_dt_ms/min_dt_ms/stddev_dt_ms/
dt_countandage_avg_ms/age_min_ms/age_max_ms/age_stddev_ms/age_count, each
group only when measured (gap tracking on). Drained from the accumulators the topic already
pools, at flush time; the hot path is unchanged. TextEPlines are unchanged. - jsonl windows gain
"partial":trueon the probe's first window after attach and its exit
window, the two it already grace-skips for alerts (absent otherwise, so existing records are
byte-identical).pulse-check's reader parses it intosLogWindow::partial; pulse-top
ignores it. The text format is unchanged. - pulse_bridge:
rosgraph_monitor_msgs/TopicStatisticsfor graph-monitor
(graph-monitor#14). With
graph_monitor:=truethe bridge also publishes each window on/topic_statistics
(graph_monitor_topic):PUBLISHED_PERIOD/RECEIVED_PERIODper (node, topic), with
window_count,mean= 1 / rate andmax= largest gap when jitter tracking is on. With
jitter tracking on,RECEIVED_PERIODtakesmean/minfrom the subscription's own
interval distribution andTAKE_AGEcarries its message age (mean / min / max, a negative
age sent as 0);PUBLISHED_PERIODminstays 0 (not tracked). Each endpoint is reported
under its owning node from the per-endpoint split, so a component container reports every
node; two handles of one node on one topic and side report the slower one, not the sum. A
partial window sends noPUBLISHED_PERIOD, andRECEIVED_PERIODonly from a measured
interval mean. Messages are stamped with the bridge's system clock at publish, like
graph-monitor's shim, and the bridge warns once per log whenwindow_s+poll_period_s
reaches graph-monitor's stale timeout (graph_monitor_stale_timeout_ms, 3000 by default);
the README example setsROS_TOPIC_STATISTICS_PUBLISH_PERIOD=1. A log without the split (an
older probe) falls back to per-process sums, and a process with several active nodes is then
skipped with a warning, repeated at most once a minute (PR #68 review). Off by default;
rosgraph_monitor_msgsis a new<depend>foundQUIET, so a source build without it still
builds the bridge. Mapping in the pure core (topic_statistic_mapper), 30 unit tests, 6
bridge integration tests. - A package guide on docs.ros.org.
doc/androsdoc2.yamlreplace the generated page of
internal C++ structs with a quickstart and reference pages, andpackage.xmldeclares the
ros2_documentation_areaexport so the ROS 2 docs can list the package on their
introspection pages (ros2_documentation#7240).