Skip to content

use_intra_process_comms bypasses topic statistics computation #2911

@norakon

Description

@norakon

Generated by Generative AI

No response

Operating System:

Ubuntu 22

ROS version or commit hash:

humble

RMW implementation (if applicable):

cyclone

RMW Configuration (if applicable):

No response

Client library (if applicable):

rclcpp

'ros2 doctor --report' output

No response

Steps to reproduce issue

  1. Create a publisher of any kind and load its node into a component container
  2. Create a rclcpp subscriber to that msg, enable the rclcpp::TopicStatisticsOptions, and use a ConstSharedPtr for the msg-type
  3. Enable use_intra_process_comms when loading this node into the same component container
  4. Run this publisher-subscriber-setup and review the topic statistics published on /statistics

Expected behavior

The topic statistics should be filled with valid values for both, message_age and message period.

Since the topic_statistics are configured on the subscriber's end only, and technically only need a valid stamped header to be calculated, I expected the topic statistics to work for intra-process communication, as well.

Actual behavior

When setting use_intra_process_comms to True, the topic statistics show only .nan for both, message_age and message period.

When setting use_intra_process_comms to False, the topic statistics are filled with valid values for both, message_age and message period.

Additional information

I want to use the topic statistics as a measure of network health in my ros2 system. Naturally, I want to load large msg types, such as point clouds, into composable nodes, but with the topic statistics not working for intra-process communications, I loose my introspection for these crucial topics.

Before, I was using the topic statistics' .nan values to raise an error because I could be sure that nothing was published. However, with the behavior described above, the topics in the composable nodes will also all show .nan, even though the subscriber's callbacks were executed correctly.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions