question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ros2 topic info -v prints incorrect QoS info for macOS + CycloneDDS

See original GitHub issue

Bug report

Required Info:

  • Operating System:
    • macOS 10.14 Mojave
  • Installation type:
  • Version or commit hash:
    • Foxy prerelease
  • DDS implementation:
    • CycloneDDS
  • Client library (if applicable):
    • N/A

Steps to reproduce issue

ros2 topic info -v does not print correct QoS information for a topic.

➜  ~ ros2 topic pub /talker --qos-durability volatile std_msgs/String "data: Hello World volatile"

➜  ~ ros2 topic info -v /talker
Type: std_msgs/msg/String

Publisher count: 1

Node name: _CREATED_BY_BARE_DDS_APP_
Node namespace: _CREATED_BY_BARE_DDS_APP_
Topic type: std_msgs/msg/String
Endpoint type: PUBLISHER
GID: a3.6b.10.01.32.8a.d9.a4.bb.0c.3b.46.00.00.08.03.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: RMW_QOS_POLICY_RELIABILITY_RELIABLE
  Durability: RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL
  Lifespan: 2147483651294967295 nanoseconds
  Deadline: 2147483651294967295 nanoseconds
  Liveliness: RMW_QOS_POLICY_LIVELINESS_AUTOMATIC
  Liveliness lease duration: 2147483651294967295 nanoseconds

Subscription count: 0

Expected behavior

Durability value printed should be: Durability: RMW_QOS_POLICY_DURABILITY_VOLATILE

Actual behavior

Durability value printed is: Durability: RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL

Additional information

These commands appear to work as expected on Linux and Windows for CycloneDDS.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:38 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
iuhilnehc-ynoscommented, Sep 10, 2020

@clalancette

If @eboasson agrees, then I think we’ll want to open up an issue there. Thanks.

Anyway, I think it’s time to pull eProsima in. I have created an issue on Fast-DDS.

2reactions
eboassoncommented, Sep 8, 2020

@iuhilnehc-ynos perhaps you need not do what I asked just now: after I published the comment, I realised that I could try this particular experiment of mixing a Cyclone DDS-based publisher with a Fast-RTPS-based ros2 cli. I get exactly the same result. That’s good news.

I’ve checked with Wireshark: image

Cyclone only publishes QoS settings that are different from the default. In section 9.6.2.2.1 the DDSI-RTPS specification states that for parameters (e.g., durability QoS, a.k.a. PID_DURABILITY) missing from a discovery message, the default should be applied, and then references the DDS specification for the default

image

which is volatile per section 2.1.3 of the DCPS spec, so Cyclone DDS is entirely correct:

image

and Fast-RTPS or its RMW layer is misinterpreting the discovery data.

I suspect that when @fujitatomoya reproduced it, the ros2 daemon was running using Fast-RTPS. That one then stores the incorrect discovery data and regurgitates it to “ros2 topic info” even if that one is running Cyclone. Restarting the machine/container could easily have resulted in using Cyclone DDS for the daemon.

And if instead you use Cyclone DDS for the daemon, even Fast-RTPS gets it right:

$ RMW_IMPLEMENTATION=rmw_cyclonedds_cpp ros2 topic pub /talker1234 --qos-durability volatile  std_msgs/String "data: Hello World volatile" > /dev/null 2>&1 &

$ ros2 daemon stop
$ RMW_IMPLEMENTATION=rmw_cyclonedds_cpp ros2 topic info -v /talker1234

Type: std_msgs/msg/String

Publisher count: 1

Node name: _ros2cli_28883
Node namespace: /
Topic type: std_msgs/msg/String
Endpoint type: PUBLISHER
GID: 5c.18.10.01.85.70.a9.07.7d.e5.91.87.00.00.08.03.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: RMW_QOS_POLICY_RELIABILITY_RELIABLE
  Durability: RMW_QOS_POLICY_DURABILITY_VOLATILE               # good
  Lifespan: 9223372036854775807 nanoseconds
  Deadline: 9223372036854775807 nanoseconds
  Liveliness: RMW_QOS_POLICY_LIVELINESS_AUTOMATIC
  Liveliness lease duration: 9223372036854775807 nanoseconds

Subscription count: 0

$ RMW_IMPLEMENTATION=rmw_fastrtps_cpp ros2 topic info -v /talker1234

Type: std_msgs/msg/String

Publisher count: 1

Node name: _ros2cli_28883
Node namespace: /
Topic type: std_msgs/msg/String
Endpoint type: PUBLISHER
GID: 5c.18.10.01.85.70.a9.07.7d.e5.91.87.00.00.08.03.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: RMW_QOS_POLICY_RELIABILITY_RELIABLE
  Durability: RMW_QOS_POLICY_DURABILITY_VOLATILE               # good
  Lifespan: 9223372036854775807 nanoseconds
  Deadline: 9223372036854775807 nanoseconds
  Liveliness: RMW_QOS_POLICY_LIVELINESS_AUTOMATIC
  Liveliness lease duration: 9223372036854775807 nanoseconds

Subscription count: 0

$ ros2 daemon stop
The daemon has been stopped
$ RMW_IMPLEMENTATION=rmw_fastrtps_cpp ros2 topic info -v /talker1234  

Type: std_msgs/msg/String

Publisher count: 1

Node name: _CREATED_BY_BARE_DDS_APP_
Node namespace: _CREATED_BY_BARE_DDS_APP_
Topic type: std_msgs/msg/String
Endpoint type: PUBLISHER
GID: 5c.18.10.01.85.70.a9.07.7d.e5.91.87.00.00.08.03.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: RMW_QOS_POLICY_RELIABILITY_RELIABLE
  Durability: RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL               # bad
  Lifespan: 2147483651294967295 nanoseconds
  Deadline: 2147483651294967295 nanoseconds
  Liveliness: RMW_QOS_POLICY_LIVELINESS_AUTOMATIC
  Liveliness lease duration: 2147483651294967295 nanoseconds

Subscription count: 0

$ RMW_IMPLEMENTATION=rmw_cyclonedds_cpp ros2 topic info -v /talker1234

Type: std_msgs/msg/String

Publisher count: 1

Node name: _CREATED_BY_BARE_DDS_APP_
Node namespace: _CREATED_BY_BARE_DDS_APP_
Topic type: std_msgs/msg/String
Endpoint type: PUBLISHER
GID: 5c.18.10.01.85.70.a9.07.7d.e5.91.87.00.00.08.03.00.00.00.00.00.00.00.00
QoS profile:
  Reliability: RMW_QOS_POLICY_RELIABILITY_RELIABLE
  Durability: RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL               # bad
  Lifespan: 2147483651294967295 nanoseconds
  Deadline: 2147483651294967295 nanoseconds
  Liveliness: RMW_QOS_POLICY_LIVELINESS_AUTOMATIC
  Liveliness lease duration: 2147483651294967295 nanoseconds

Subscription count: 0
Read more comments on GitHub >

github_iconTop Results From Across the Web

ROS2 interoperability with native DDS - ROS Answers
I'm using cyclonedds and ROS2 Galactic, but I am open to anyone ... but no messages are printed. ros2 topic info --verbose gives:...
Read more >
Understanding topics — ROS 2 Documentation
Goal: Use rqt_graph and command line tools to introspect ROS 2 topics. ... The previous tutorial provides some useful background information on nodes...
Read more >
Galactic Geochelone (galactic) — ROS 2 Documentation
Externally configure QoS at start-up. Python point_cloud2 utilities available. RViz2 Time Panel. ros2 topic echo can print serialized data.
Read more >
About Quality of Service settings — ROS 2 Documentation
QoS profiles can be specified for publishers, subscriptions, service servers and clients. A QoS profile can be applied independently to each instance of...
Read more >
Humble Hawksbill - ROS Documentation
For information on the latest version, please have a look at Humble. ... macOS: amd64 ... ros2 topic pub now allows to set...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found