Generic DDS subscriber¶
Overview¶
A troubleshooting generic tool to subscribe to DDS Agnostic DDS topic(s). It can be used for verifying if DDS agnostic topic data is being published for example, if it can be received on a particular machine, and the frequency of receiving the data. When used with MUDPI Publisher and the setting to produce pattern data (ramp), it is possible to check for consistency of the received data. It can be run instead of (or in parallel with) other DDS subscribers like Telemetry Subscriber. 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, also the generic DDS subscriber uses FastDDS. Its DDS QoS is configured using an XML file, which needs to be provided by setting the FASTRTPS_DEFAULT_PROFILES_FILE environment variable to point on it. For example, the RTC Tk provided (default) QoS file can be used as follows:
export FASTRTPS_DEFAULT_PROFILES_FILE=$INTROOT/resource/config/rtctk/RTCTK_DEFAULT_FASTDDS_QOS_PROFILES.xml
Running¶
The generic DDS subscriber is run by simply executing: rtctkGenDdsSub with proper command line arguments. For command line options please run with option -h.
E.g. run the subscriber that subscribes to three topics: TestTopic0 TestTopic1 TestTopic2
rtctkGenDdsSub -t TestTopic0 TestTopic1 TestTopic2
Messages are logged once every 1500 samples to output for each subscribed topic, with the number of received samples, the average time between sample receiving, and the estimated (receiving) frequency. E.g. for TestTopic0:
[TestTopic0][0] 1500 Avg: 0.00113551 Freq: 880.659
[TestTopic0][0] 3000 Avg: 0.00114717 Freq: 871.71
[TestTopic0][0] 4500 Avg: 0.00115725 Freq: 864.118
...
Messages are also logged that indicate that a particular topic (e.g. TestTopic0) is there for a DDS publisher and that the process is subscribed to it. This messages should be there before any data will be received. For example:
GenSubReaderListener(TestTopic0)::on_subscription_match
GenSubReaderListener(TestTopic0)::on_liveliness_changed: alive_count: 1 not_alive_count: 0 alive_count_change: 1 not_alive_count_change: 0
The following message indicates that a DDS publisher for a particular topic (e.g. TestTopic0) is gone:
GenSubReaderListener(TestTopic00)::on_liveliness_changed: alive_count: 0 not_alive_count: 1 alive_count_change: -1 not_alive_count_change: 1