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 pub creates two publishers

See original GitHub issue

As mentioned here the QOS event callback triggers a call to rmw_create_publisher twice for the same topic on the same node. Where this might be supported for DDS implementations, it might lead to UB for non-DDS RMWs, c.f. https://github.com/ros2/rmw_iceoryx/issues/28

Is there a way to create a create incompatible QoS with creating only one publisher?

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
ivanpaunocommented, Apr 29, 2020

Reverting #410 sounds good to me.

If the creation of the publisher failed, it should be automatically cleaned up, and the user shouldn’t need to do that manually. It’s worth investigating why it wasn’t cleaned up correctly and fixing it too.

1reaction
Karsten1987commented, May 1, 2020

@mm318 I can confirm that https://github.com/ros2/rclpy/pull/553 solves the problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Writing a simple publisher and subscriber (Python)
Goal: Create and run a publisher and subscriber node using Python ... You created two nodes to publish and subscribe to data over...
Read more >
Exchange Data with ROS 2 Publishers and Subscribers
Create a publisher that sends ROS 2 string messages to the /chatter topic. chatterPub = ros2publisher(node_1,"/chatter","std_msgs/String");.
Read more >
How to work with ros2 topics from the command line
String(data='Hello World!') publishing #2: std_msgs.msg. ... Basically, to publish to a topic, you do ros2 topic pub [topic_name] [message_type] ...
Read more >
How to Publish & Subscribe to a ROS2 Topic [UPDATED]
ROS2 Tutorials # 2 : How to Publish & Subscribe to a ROS2 Topic [UPDATED].
Read more >
3: Creating a ROS 2 Pub-Sub Subscription using TypeScript
Once node-publisher is running and publishing messages, you should see subscription messages begin dribbling to stdout as shown below. Using The ros2 topic...
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