Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ros2: support pub-sub message tracking using rmw layer only #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

christophebedard
Copy link
Member

@christophebedard christophebedard commented Apr 21, 2024

The current implementation of the ROS 2 plugin relies on events from the underlying DDS middleware in order to be able to track a message from publication to subscription: it needs to get a timestamp value from DDS when a message is published. This timestamp value is then matched to the same value when the message is received on the other end.

While the ROS 2 instrumentation is available by default on Linux (as of the ROS 2 Iron release in May 2023), instrumentation for the DDS implementation(s) is not available by default; the DDS implementation needs to be built from source. However, some recent changes to the ROS 2 instrumentation (to be available in the ROS 2 Jazzy release in May 2024) mean that DDS instrumentation is not needed anymore in order to track messages from publication to subscription. We just rely on events from the ROS 2 rmw layer (which is right above DDS in the ROS 2 architecture), specifically the ros2:rmw_publish events, to get the same timestamp. For more information about these changes, see: ros2/ros2_tracing#74.

Therefore, note the version of the instrumentation (aka the ROS 2 tracetools package) used to generate the trace. If the version is greater than or equal to the version that contains the new changes, rely on rmw for the timestamp value. Otherwise, if an older version is used, rely on DDS for the timestamp value.

Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>
@christophebedard christophebedard self-assigned this Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant