-
Notifications
You must be signed in to change notification settings - Fork 43
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
Don't block in rmw_init checking for the router. #308
Conversation
Not sure how I feel about this given that we call What do you think about
PS we should also rmb to update the README if we decide to remove this behavior https://github.com/ros2/rmw_zenoh?tab=readme-ov-file#checking-for-a-zenoh-router |
I'm going to answer this in the reverse order.
I thought about this as well, and the problem here is what we do in e.g.
So in my local testing, what I saw was that at startup, if the router is not running, then we do not receive any liveliness tokens from anything else in the network (even local nodes). However, we do receive liveliness token from ourself. Once the router starts, then all liveliness tokens seem to be propagated from all nodes to all other nodes in the network. In other words, as soon as the router starts up, |
That is good to know! How do you feel about having this PR update the default value of That would give us some time to play around with |
It is much cleaner to just have rmw_init return without looping, so we switch to only checking for the router without waiting. However, if we don't find a router, warn the user. It still works to start a publisher and subscription, then start the router; they'll connect at that point. Signed-off-by: Chris Lalancette <[email protected]>
This reverts commit 9b965b2.
Signed-off-by: Chris Lalancette <[email protected]>
b13f168
to
e4b97f2
Compare
All right, I ended up doing this in the latest commits. Note that I still had to make some changes here so that we end up only sleeping when we have to, but still print out every second when we don't. But I tested this out locally, and Please take another look when you get a chance! |
It is much cleaner to just have rmw_init return without looping, so we switch to only checking for the router without waiting. However, if we don't find a router, warn the user.
It still works to start a publisher and subscription, then start the router; they'll connect at that point.
This is potentially somewhat controversial, but I think this is a better experience for users.