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

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.

@christophebedard christophebedard self-assigned this Apr 21, 2024
@christophebedard
Copy link
Member Author

Thanks for the approval. I'm wary about merging this after a few months and just before leaving on vacation (away from any computer) for 1 week, so I'll merge this next Friday.

@christophebedard christophebedard force-pushed the christophebedard/ros-2-support-rmw-only-pub-sub-message-tracking branch from 01fa790 to 234564a Compare October 8, 2024 17:59
@christophebedard
Copy link
Member Author

I rebased this. Looks like the approval is still valid, so I'll go ahead and merge this.

@christophebedard christophebedard merged commit 628fd89 into eclipse-tracecompass-incubator:master Oct 8, 2024
2 checks passed
@christophebedard christophebedard deleted the christophebedard/ros-2-support-rmw-only-pub-sub-message-tracking branch October 8, 2024 18:19
adel-belkhiri pushed a commit to adel-belkhiri/org.eclipse.tracecompass.incubator that referenced this pull request Oct 15, 2024
bhufmann pushed a commit to bhufmann/org.eclipse.tracecompass.incubator that referenced this pull request Oct 16, 2024
bhufmann pushed a commit that referenced this pull request Oct 25, 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.

2 participants