Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] subscription impossible while peer subscribes its own topic #404

Open
rayferric opened this issue Feb 14, 2025 · 2 comments
Open

[Bug] subscription impossible while peer subscribes its own topic #404

rayferric opened this issue Feb 14, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@rayferric
Copy link

rayferric commented Feb 14, 2025

Describe the bug

As per the title. The issue makes it impossible to RViz internal topics used by the robot.

To reproduce

Setup Cyclone DDS with ROS_LOCALHOST_ONLY=1.

Terminal 1:

ROS_DOMAIN_ID=1 zenoh_bridge_ros2dds-1.2.1 -l tcp/localhost:7000

Terminal 2:

ROS_DOMAIN_ID=2 zenoh_bridge_ros2dds-1.2.1 -e tcp/localhost:7000

Terminal 3:

ROS_DOMAIN_ID=1 ros2 topic pub /foobar std_msgs/msg/Bool "{data: true}"

Terminal 4:

ROS_DOMAIN_ID=2 ros2 topic echo /foobar

Messages will start flowing...
Terminal 5:

ROS_DOMAIN_ID=1 ros2 topic echo /foobar

Messages will start flowing...
Terminal 4:

CTRL+C
ROS_DOMAIN_ID=2 ros2 topic echo /foobar

The messages will not flow until Terminal 4 resubscribes while Terminal 5 is unsubscribed.

Details

Bug does not occur if Terminal 5 is the first subscriber since Zenoh Bridges were restarted. Then the first subscription after that from the opposite domain (Terminal 4) will succeed, but further re-subscriptions will be impossible.

Zenoh bridge node on the publisher side does not subscribe to the topic, which is visible on ros2 topic info -v.

Zenoh nodes do not show any errors in the logs.

When peer 1 subscribes to its own topic, Zenoh Bridge on peer 2 creates a subscriber for this topic which of course does not receive any messages since peer 1 is the publisher.
Then when peer 2 wants to subscribe, it is possible that Zenoh Bridge does not create the subscriber on peer 1 since the bridge on peer 2 is already subscribed.

System info

  • Platform: Ubuntu Jammy/Humble (distrobox on Arch Linux x86_64 host)
  • CPU: AMD Ryzen 7 5800H (16) @ 3.0GHz
  • Zenoh Version: Release 1.2.1
@rayferric rayferric added the bug Something isn't working label Feb 14, 2025
@rayferric rayferric changed the title [Bug] re-subscription impossible while peer subscribes its own topic [Bug] subscription impossible while peer subscribes its own topic Feb 14, 2025
@rayferric
Copy link
Author

Might be related to #368

@rayferric
Copy link
Author

I can't believe that more people aren't reporting this problem. It is really easy to encounter which makes it important to be resolved ASAP. It is straightforward to reproduce, so can anybody confirm that they see it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant