Skip to content

Update documentation for Zenoh timestamping configuration#889

Open
jordanburklund wants to merge 1 commit into
ros2:rollingfrom
jordanburklund:fix/zenoh_timestamping_doc
Open

Update documentation for Zenoh timestamping configuration#889
jordanburklund wants to merge 1 commit into
ros2:rollingfrom
jordanburklund:fix/zenoh_timestamping_doc

Conversation

@jordanburklund

Copy link
Copy Markdown
Contributor

Description

Update documentation for Zenoh timstamping configurations for server and router configs. When testing locally with a simple "transient local" publisher and subscriber, the comment in the default configurations seems to be outdated. "transient local" topics were still working even when setting timestamping: { enabled: false } for both sending topics locally on the same machine and sending topics between two different machines over the network.

Is this user-facing behavior change?

No

Did you use Generative AI?

No

Additional Information

/// Whether data messages should be timestamped if not already.
/// Accepts a single boolean value or different values for router, peer and client.
///
/// ROS setting: PublicationCache which is required for transient_local durability

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure what to replace this with, so I left it as a WIP and will update it based on feedback from the maintainers.

@JEnoch

JEnoch commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

I agree that the original comment is outdated. The PublicationCache has been replaced by the AdvancedPublisher for TRANSIENT_LOCAL support.

However timestamping is still required, but only for TRANSIENT_LOCAL+BEST_EFFORT publishers. Let me explain:
At startup a Zenoh AdvancedSubscriber receives both historical data and live publications at the same time. It needs to reorder those data before to provide them to the callback API. He can do it, but only if one of the two conditions applies:

  • Either a timestamp is attached with each data - that requires timestamping config to be enabled
  • Either a sequence number and a source id are attached with each data - that's the case with RELIABLE Publishers that set a miss_sample_detection option for the AdvancedPublisher. See here

If timestamping is disabled and a TRANSIENT_LOCAL+BEST_EFFORT Publisher is created, Zenoh will exit with this error log:

2026-06-01T15:58:54.671250Z ERROR ThreadId(10) zenohc::advanced_publisher: Cannot create AdvancedPublisher 0/chatter/std_msgs::msg::dds_::String_/RIHS01_df668c740482bbd48fb39d76a70dfd4bd59db1288021743503259e948f6b1a18 with Sequencing::Timestamp: the 'timestamping' setting must be enabled in the Zenoh configuration. at /root/.cargo/git/checkouts/zenoh-cc237f2570fab813/2687c51/zenoh-ext/src/advanced_publisher.rs:368.
[ERROR 1780329534.671329133] [rmw_zenoh_cpp]: Unable to make PublisherData. (Data() at /home/ubuntu/rmw_zenoh/src/rmw_zenoh/rmw_zenoh_cpp/src/detail/rmw_context_impl_s.cpp:265)

You can see this running ros2 topic pub /chatter std_msgs/String "data: Hello World" --qos-durability transient_local --qos-reliability best_effort

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.

3 participants