Closed garyservin closed 8 years ago
Thanks for the pull request, @garyservin. The possibility to specify an interface by ~interface parameter or by ROS_IP is already available since https://github.com/fkie/multimaster_fkie/commit/0c7302dfaa57557039423360378bf41043e790ea (XMLRPCServer listen on all address if it binds to 0.0.0.0) Unfortunately it is neither documented in ROS wiki nor by launch file :-(
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 atiderko
Hi @atiderko,
While trying to use the ~interface
or ROS_IP
parameters for attempting to bind to a specific interface I found that it wasn't working. After some deep diving with wireshark I had to fix how it actually bound to the interface here
A few use cases we found this helped address for us are:
Is there any documentation on the ~robot_hosts
param, this may be of some use to us in the near future also if I am understanding it's functionality properly.
Hi @mikeodr,
there is currently no documentation how ~robot_hosts/discovering internally works. When ~robot_hosts should be used:
How it works:
This hostname should be resolved to the same IP (on local machine and on remote host)!
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 ~interface
)?
Perhaps this document contain some hints for network configuration: http://www.iri.upc.edu/files/scidoc/1607-Multi-master-ROS-systems.pdf
I will also try to setup an environment with multiple interfaces and test the behavior again...
regards, atiderko
Hi @mikeodr, I reproduced the problem with non default interface. I try to integrate your solution.
regards, atiderko
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
@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