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] Unable to work with two bridges on different namespace #305

Open
iamkashish opened this issue Oct 21, 2024 · 5 comments
Open

[Bug] Unable to work with two bridges on different namespace #305

iamkashish opened this issue Oct 21, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@iamkashish
Copy link

Describe the bug

If I start one bridge with a namespace "/left" and then the other with namespace "/right", the topics from left to right or vice-versa are created. But the publisher get lost, meaning: ros2 topic echo /right/ doesn't show anything.
But if I use one bridge with a namespace "/left" and then other with no namespace. It works fine.
Maybe there is some silly mistake, but I tried various ways.

To reproduce

  1. Start zenoh-bridge-ros2dds --namespace left -e tcp/<left-ip-address>:7447 in one machine.
  2. Start zenoh-bridge-ros2dds --namespace right -e tcp/<right-ip-address>:7447 in another machine.
  3. Start ros2 run demo_nodes_cpp talker in left machine
  4. Do ros2 echo /left/chatter in right machine

System info

  • Platform Ubuntu 24.04
@iamkashish iamkashish added the bug Something isn't working label Oct 21, 2024
@gabrik
Copy link
Contributor

gabrik commented Oct 22, 2024

Hi @iamkashish, can you please share the logs of the two bridges when setting RUST_LOG=z=debug as environment variable?

@iamkashish
Copy link
Author

iamkashish commented Oct 22, 2024

Hi @gabrik ,
I did two testing, one with router mode and the logs are left_log and right_log. I saw there is some looping going on (but i have set local host and different domain ids). And when I publish the topic, I publish with cyclonedds config as suggested.

So I tried with peer mode with deny in config file, the config file of left machine will have "^/right.*" in deny and vice-versa. The logs are left_log_2 and right_log_2.

left_log.txt
left_log_2.txt
right_log.txt
right_log_2.txt

@iamkashish
Copy link
Author

Hey @gabrik ,
I hope you are doing amazing. I'll glad if I can get some insights from you, whether I'm doing something wrong while deploying the bridge or is it really a bug?

@iamkashish
Copy link
Author

Hey @gabrik ,
I hope you are doing well. Looking forward to your reply.

@evshary
Copy link
Contributor

evshary commented Nov 19, 2024

Hi @iamkashish
I think the behavior can be expected. Now zenoh-bridge-ros2dds doesn't support two hosts having different namespaces communicate with each other.
While you try ros2 echo /left/chatter on your right machine, the bridge is actually trying to subscribe /right/left/chatter in Zenoh network, which is not correct.

The only way to exchange the data now is to have both sides using same namespace or one side without namespace.
This is the limitation for the current implementation.

I think your requirement is indeed useful, but we need to think of a better way for bridge to identify whether /left is the namespace instead of part of topic.

@evshary evshary added enhancement New feature or request and removed bug Something isn't working labels Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants