Skip to content

Commit 7071c3d

Browse files
committed
intra process available
Signed-off-by: CursedRock17 <mtglucas1@gmail.com>
1 parent 16d27a8 commit 7071c3d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

rclcpp/include/rclcpp/subscription.hpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,12 @@ class Subscription : public SubscriptionBase
326326
const std::shared_ptr<rclcpp::SerializedMessage> & serialized_message,
327327
const rclcpp::MessageInfo & message_info) override
328328
{
329-
// TODO(wjwwood): enable topic statistics for serialized messages
329+
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+
330335
std::chrono::time_point<std::chrono::system_clock> now;
331336
if (subscription_topic_statistics_) {
332337
// get current time before executing callback to

0 commit comments

Comments
 (0)