-
Notifications
You must be signed in to change notification settings - Fork 108
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
Bind to non default interface #24
Conversation
* Send to multicast address, not the interface address specified. * Set interface IP via rosparam or ROS_IP * Properly bind multicast send/receive to a specific interface * Add new unicast/send receive socket as multicast socket is multicast only. * Add extra receive thread for unicast socket to process. * Don't exit if we're on localhost
Thanks for the pull request, @garyservin. Your PR have some useful changes, like
But it also removes the discovery functionality specified by ~robot_hosts. These robots are pinged using unicast communication because in some network environments multicast does not work properly. Can you explain why you are unable to send unicast traffic with the same multicast socket? regards |
Thanks to @garyservin for pull request #24: * Don't exit if we're on localhost, just log a warning * Added support for different logging levels in master_monitor: currently all logs are marked as warnings, where some should be marked as errors. Other changes need to be verified
Hi @atiderko, While trying to use the A few use cases we found this helped address for us are:
Is there any documentation on the |
Hi @mikeodr, there is currently no documentation how ~robot_hosts/discovering internally works.
How it works:
I hope this helps to understand the discovery process with multicast and unicast messages. Did you tried to change the default multicast route to a non default interface (in combination with current implementation of I will also try to setup an environment with multiple interfaces and test the behavior again... regards, |
Hi @mikeodr, regards, |
Thanks for creating the PR to @garyservin and @mikeodr! The change lets you define an interface by `~interface`, `ROS_IP` envar or append the interface to multicast group like 226.0.0.0@192.168.101.10. The master_discovery then binds to the specified interface and creates also an unicast interface for active requests on communication problems or if `~robot_hosts` are defined. Now you can also disable the multicast communication by setting `~send_mcast` to false. In this case the requests are send to hosts defined in `~robot_hosts`.
Hi @mikeodr, @garyservin, I've integrated your solution with some changes to be able to use the unicast in the currently used manner. Can you test it in your environment, please? regards, |
@atiderko thanks for integrating the changes. I've tested and I can bind to a specific interface now. Also, would you be able to release new version with these changes? Thanks! |
@garyservin thanks for tests and good news! I will release the new version, but it will take a while before the public repositories are synchronized. Last sync was 7 days ago. |
@atiderko, if you wouldn't mind cutting a release, we can get it built and available on our public package server (packages.clearpathrobotics.com) for more immediate testing. |
@paulbovbel I have no problem to release it also on your repository as long as it does not conflicts with public ros repositories. What do I have to do? |
Nothing needs doing, other than creating the tag you made. The newest version is now available on packages.clearpathrobotics.com, and we'll work it into our testing pipeline (FYI @garyservin) |
@paulbovbel thanks, that was easy and works well : -) |
If you want to use something that isn't the default route ( e.g. Ethernet for internet, but WiFi for the multimaster network), you need to be able to specify the network to bind to. By default multimaster binds to the default interface and will not discover other masters in the case outlined above.
This PR addresses the previous use case and allows multimaster_fkie to bind to a non default interface by specifying the interface via a ROS param ('~interface') or by setting the ROS_IP envvar.
Some other changes introduced