[Bug] Unable to work with two bridges on different namespace
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/
To reproduce
- Start
zenoh-bridge-ros2dds --namespace left -e tcp/<left-ip-address>:7447in one machine. - Start
zenoh-bridge-ros2dds --namespace right -e tcp/<right-ip-address>:7447in another machine. - Start
ros2 run demo_nodes_cpp talkerin left machine - Do
ros2 echo /left/chatterin right machine
System info
- Platform Ubuntu 24.04
Hi @iamkashish, can you please share the logs of the two bridges when setting RUST_LOG=z=debug as environment variable?
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.
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?
Hey @gabrik , I hope you are doing well. Looking forward to your reply.
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.
Can we expect this feature anytime soon?
Can we expect this feature anytime soon?
As far as I know, this will not happen in the near future. However, the priority might change if the community makes more requests.
had the same problem, spent hours on it before finding this, i think this would be hella helpful, how come is not a default behavior to be able to have different entities with different namespaces ? how complex would it be to change this? maybe if you point me in the right direction i can take some time to contribute for this.
Hope this gets introduced soon, i was relying on the possibility to have different nodes have their namespace kinda like /drone/
I've been hoping for this feature too — ran into the same limitation while setting up multiple AMRs in a warehouse scenario. Each robot ideally operates in its own namespace like /amr1/, /amr2/, etc., on separate networks. It works fine for centralized coordination, but things get tricky when robots need to talk directly to nearby peers.
That peer-to-peer use case — like when one robot wants to hand off a task or share a local map with a neighbor — is still something that's missing with Zenoh in this setup. Without proper namespace isolation and bridging, it becomes a tangled mess of remapping and workarounds.
It would be amazing if this were a default or at least an optional behavior.