Generic DDS publisher

Overview

rtctkGenDdsPub is a troubleshooting tool to publish DDS Agnostic samples to several DDS topic(s) in parallel. It can be used to publish samples to verifying if DDS agnostic topic data can be received on a particular machine. It can be run instead of Telemetry Republisher. For troubleshooting and diagnostic FastDDS related problems some additional tools like fastddsMonitor can be used. These additional tools are provided as part of FastDDS.

Prerequisites

Similar to other DDS based applications, the generic DDS publisher uses FastDDS as well. Its DDS QoS is configured using an XML file. Default provided telemDataPathDdsQos.xml is installed in $INTROOT/resource/config/rtctk/dds/ A different file can be specified using the --qos-file command line option. The file needs to be located under rtctk/dds/ in $CFGPATH.

Note

FASTRTPS_DEFAULT_PROFILES_FILE environment variable shall not be used (set). In particular if the file that the variable points to contains the same QoS profiles.

Running

The generic DDS publisher is run by executing: rtctkGenDdsPub with the proper command line arguments. For a list of command line options run the executable with option -h.

E.g. run the publisher that publishes samples to three topics in parallel: TestTopic0 TestTopic1 TestTopic2

$ rtctkGenDdsPub -t TestTopic0 TestTopic1 TestTopic2

At the beginning it waits for each topic for a specified number of subscribers to be available (command line option -w [ --wait-for-subs ], default value is 1). This is indicated with a message like:

[12:48:07:983][INFO ][rtctkGenDdsPub] [TestTopic0] Waiting for a minimum number of subscriber(s) 0 of 1 before publishing.
[12:48:07:984][INFO ][rtctkGenDdsPub] [TestTopic1] Waiting for a minimum number of subscriber(s) 0 of 1 before publishing.
[12:48:07:984][INFO ][rtctkGenDdsPub] [TestTopic2] Waiting for a minimum number of subscriber(s) 0 of 1 before publishing.

When the number of subscribers is reached, it starts publishing samples. If the debug option is specified in the commandline (-d) messages are logged once every 1000 samples to output for each published topic with the number of received samples, the average time between sample receiving, and the estimated (receiving) frequency. E.g. for TestTopic0:

[12:49:34:519][DEBUG][rtctkGenDdsPub] [TestTopic0] Published sample 3000.
[12:49:34:520][DEBUG][rtctkGenDdsPub] [TestTopic1] Published sample 3000.
[12:49:34:520][DEBUG][rtctkGenDdsPub] [TestTopic2] Published sample 3000.
...

Messages are also logged that indicate that a DDS subscriber has matched/subscribed for particular topic (e.g. TestTopic0), as well as the current total number of (matched) subscribers. E.g.:

[12:51:45:266][INFO ][rtctkGenDdsPub] [TestTopic0] on_publication_match
[12:51:45:266][INFO ][rtctkGenDdsPub] [TestTopic0] on_publication_match - matched. Current matched: 1
[12:51:45:267][INFO ][rtctkGenDdsPub] [TestTopic1] on_publication_match
[12:51:45:267][INFO ][rtctkGenDdsPub] [TestTopic1] on_publication_match - matched. Current matched: 1
[12:51:45:268][INFO ][rtctkGenDdsPub] [TestTopic2] on_publication_match
[12:51:45:268][INFO ][rtctkGenDdsPub] [TestTopic2] on_publication_match - matched. Current matched: 1

The following message indicates that a DDS subscriber for a particular topic (e.g. TestTopic0) has gone (unmatched):

[12:56:59:004][INFO ][rtctkGenDdsPub] [TestTopic0] on_publication_match
[12:56:59:004][INFO ][rtctkGenDdsPub] [TestTopic0] on_publication_match - unmatched. Current matched: 0
[12:56:59:005][INFO ][rtctkGenDdsPub] [TestTopic1] on_publication_match
[12:56:59:005][INFO ][rtctkGenDdsPub] [TestTopic1] on_publication_match - unmatched. Current matched: 0
[12:56:59:006][INFO ][rtctkGenDdsPub] [TestTopic2] on_publication_match
[12:56:59:006][INFO ][rtctkGenDdsPub] [TestTopic2] on_publication_match - unmatched. Current matched: 0

Stopping

The process can be stopped using Ctrl-C.