rmw icon indicating copy to clipboard operation
rmw copied to clipboard

Expose sequence number for received messages

Open paulbovbel opened this issue 5 years ago • 2 comments

Feature request

Feature description

The auto-populated seq field was dropped from Header in transition from ROS1 to ROS2 (https://github.com/ros2/common_interfaces/pull/2). This data was useful in measuring lost messages, and I imagine will be even more helpful with ROS2's focus on unreliable communication channels.

Implementation considerations

Some implementation hints were provided in https://discourse.ros.org/t/foxy-message-api-review/13105/17

paulbovbel avatar Mar 14 '20 23:03 paulbovbel

This issue has been mentioned on ROS Discourse. There might be relevant details there:

https://discourse.ros.org/t/foxy-message-api-review/13105/19

ros-discourse avatar Mar 14 '20 23:03 ros-discourse

I would like to add to this that the ordering of messages documentation is unclear. There are a couple of threads on this that seem to definitively answer the question: https://answers.ros.org/question/280144/are-ros2-messages-guaranteed-to-be-received-by-a-subscriber-in-the-same-order-they-were-published/ https://robotics.stackexchange.com/questions/87494/can-we-ensure-subscribing-order-same-as-publishing-order-in-ros-given-multiple-p

However this seems to conflict with the design docs. In https://design.ros2.org/articles/qos.html - it states under the "Integration with non DDS RMW Implementations" section that:

an RMW implementation must implement the same behavior as DDS. Once a subscriber takes a message from the RMW implementation it must not be allowed to take an earlier message from the same publisher."

Finally, it seems like there are QoS options that can solve this (possibly with a performance hit), but these don't seem to be exposed for ROS, even though it seems most DDSes have some option for it, e.g DDS_DESTINATIONORDER.

Some documentation or characterization of what ROS2 does under different DDSes with respect to this topic would be helpful, otherwise it seems that users must manually handle a feature that DDSes can already do.

RMichaelSwan avatar Jul 03 '24 15:07 RMichaelSwan