We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 16d27a8 commit 7071c3dCopy full SHA for 7071c3d
rclcpp/include/rclcpp/subscription.hpp
@@ -326,7 +326,12 @@ class Subscription : public SubscriptionBase
326
const std::shared_ptr<rclcpp::SerializedMessage> & serialized_message,
327
const rclcpp::MessageInfo & message_info) override
328
{
329
- // TODO(wjwwood): enable topic statistics for serialized messages
+ if (matches_any_intra_process_publishers(&message_info.get_rmw_message_info().publisher_gid)) {
330
+ // In this case, the message will be delivered via intra process and
331
+ // we should ignore this copy of the message.
332
+ return;
333
+ }
334
+
335
std::chrono::time_point<std::chrono::system_clock> now;
336
if (subscription_topic_statistics_) {
337
// get current time before executing callback to
0 commit comments