Giter Club home page Giter Club logo

multimaster_fkie's Introduction

This is a new version with daemon instance!

Whats new:

  • Remote access and control of launch and configuration files.
  • Easy remote editing of launch files.
  • Monitoring for ROS nodes and system resources on remote hosts.

Old version is available on branch: old_master and is no longer supported!

FKIE multimaster for ROS

The ROS stack of fkie_multimaster offers a complete solution for using ROS with multicores. In addition, Node Manager with a daemon provide a GUI-based management environment that is very useful to manage ROS-launch configurations and control running nodes, also in a single-core system.

multimaster overview

Packages have been renamed

The FKIE multimaster packages used to have an _fkie suffix. In conformance with REP-144, all packages have been renamed with an fkie_ prefix, starting from version 1.0.0. If you have built an older version from source, make sure to remove the build artifacts of the old versions from your build space.

Install

The communication between the Node Manager GUI and the Daemon is based on Python gRPC. If you are using Ubuntu 18.10 or later, you can simply run sudo apt install python-grpcio python-grpc-tools. For Ubuntu 18.04 LTS, we provide a PPA backport of the gRPC libraries. If your Ubuntu version is older than that, you need to install grpcio-tools from PyPI.

You can run the following commands to setup a build from source:

cd catkin_ws/src
git clone https://github.com/fkie/multimaster_fkie.git multimaster
rosdep update
rosdep install -i --as-root pip:false --reinstall --from-paths multimaster

Then build all packages:

catkin build fkie_multimaster

Documentation

For ROS interfaces and parameterization see the ROS Wiki. For configuration details you can find example launch files in each package.

multimaster_fkie's People

Contributors

acschaefer avatar adamantivm avatar ahoarau avatar alexistm avatar antoan-flox avatar arne48 avatar atiderko avatar awesomebytes avatar deng02 avatar faizansid77 avatar francisc0garcia avatar garyservin avatar gstavrinos avatar incebellipipo avatar jasonimercer avatar mikepurvis avatar mjschuster avatar paulls20 avatar roehling avatar sr4l avatar stertingen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

multimaster_fkie's Issues

Node naming limitations

We are using the multimaster package in a system with two machines. One machine is a Turtlebot and the other one is a Raspberry Pi 3.

For our application, we use, among many others, two nodes that are called "radio_node_manager" and "radio_node_manager_main_controller". While using rosnode list we could only detect the second node from the remote machine. After a lot of hours of frustration, it turns out that the problem lies here.

I would suggest either removing this limitation and finding another way to exclude the multimaster-specific node_manager, or at the very least, mention this limitation on github and the ROS wiki.

If you are interested in the nodes, you can check the RADIO project github page.

Thanks for this great package and your time.

Synchronization of remote nodes?

Hi,
it seems that only nodes running on the same machine as the roscore on are synchronized. Am I correct in that interpretation of the lines

def _getNodeUri(self, node, nodes):
    for (nodename, uri, masteruri, pid, local) in nodes:
    if (nodename == node) and local == 'local':
    [...]

in

def _getNodeUri(self, node, nodes):
for (nodename, uri, masteruri, pid, local) in nodes:
if (nodename == node) and local == 'local':
?
Would there be an easy way to synchronize remote nodes, too (i.e. keeping two ros masters, each with a distributed system, in sync)? (or am I misinterpreting the name 'local' here, not having digged through all of the code yet...)

Thank you!
Cheers, M.
(currently working with revision 11a4e85)

sync_hosts not working?

Hi! I am using ROS Kinetic (Ubuntu 16.04) and I am doing some tests with ROS Multimaster.

According to the documentation (ROS Wiki):
~sync_hosts (array, default: [])
This list with names of ROS master to synchronize. Only this ROS master in this list will be synchronized. The ~ignore_hosts list is processed first.

I have two PC running separate roscores:

  1. "ing3", IP: 172.16.1.112
  2. "robot-0", IP: 172.16.1.155

This is how I am roslaunching multimaster on both PCs:

<launch>
    <node pkg="master_discovery_fkie" type="master_discovery" name="master_discovery"/>
       
    <node pkg="master_sync_fkie" type="master_sync" name="master_sync">
        <rosparam file="$(find utils)/multimaster_config.yaml" command="load" />
    </node>    
</launch>

This is my "multimaster_config.yaml":

sync_hosts: ['whatever']
sync_topics: ['/results']   

I would expect the machines not to sync with each other. However, I still get the topic "/results" synched in the two different masters.

Is it a bug, or am I doing something wrong?
My idea is to be able to selectively sync only a few topics, and between specific ROS machines (while excluding others).

Open node connected Terminal fails

First off thank you for this great tool. With the current version there appears to be a bug when I want to view the connected terminal of a running node. When I press the terminal button it opens one but it only shows the introduction of the tool 'screen'. I resolved this by changing the method terminal_cmd in settings.py. I changed the last line to
return '%s -T %s -e "%s"'%(self._terminal_emulator, title, ' '.join(cmd))
This way all the commands for the terminal get enclosed in quotation marks. I would suggest this for the terminal window title as well. For now the calling functions (e,g, openScreenTerminal) enclose the title manually.

master monitor throws errors when services disappear

Hello!

We have a setup with two masters running and communicating fine until one service disappear from one of the masters and we get the following error:


[ERROR] [/move_base] [1447105026.919308544, 46.419000000]: received a tcpros connection for a nonexistent service [/test_service].
[WARN] [WallTime: 1447105026.935162] [46.429000] MasterMonitor[/test_service]: can't get service type: Traceback (most recent call last):
  File "/home/gary/multimsater_ws/install/lib/python2.7/dist-packages/master_discovery_fkie/master_monitor.py", line 346, in _getServiceInfo
    self.__new_master_state.getService(service).type = stype['type']
KeyError: 'type'

We get the same error with multimaster debs and when buildt from source.

Any ideas on this?
Thanks

Resync duration check?

Was wondering if there might be plans to add a duration check in the resync feature? So preivously this feature was causing problems for us when the masters were bouncing online/offline very quickly. That's since been fixed (thank you!) and our tests have stabalized but as additional protection, we would really like to have a configurable period that controls how long the offline-online period is before the resync kicks in. Especially since this is supposed to address long connection timeout periods.

Echo window not working in 0.7.6

Clicking "echo" next to a topic fails to open the "echo" window and log the following message:
[Errno 2] No such file or directory: 'path/to/catkin_ws/install/lib/python2.7/dist-packages/node_manager_fkie/EchoDialog.ui'

This is caused by a missing install line for "EchoDialog.ui" in "multimaster_fkie/node_manager_fkie/CMakeLists.txt"

Dynamic Reconfigure

Hello @atiderko ,

Thank you for the great effort to develop and maintain this package. What I want to ask that, do you have dynamic reconfigure feature in future plans? Especially for master_sync to configure parameters like ignore_hosts, sync_hosts in runtime.

Best

bash: rosrun: command not found issue

hi,

i know this is already covered in the troubleshooting section but the proposed solution sadly does not work in my case (both machines run ubuntu 14.04, indigo)

To run a node on remote host, an SSH connection will be established without setting any enviroment variables. Try to comment out in .bashrc: 

#[ -z "$PS1" ] && return

i do not have such an entry on my machine or on our robot. also adding this line does not make a difference. is there something else i can try?

thx in advance

Progress Job Error

Hello !

When I try to launch some node in an other machine (connected and syncronised), I have a "Progress Job Error":

Traceback (most recent call last):
File "/opt/ros/indigo/lib/python2.7/dist-packages/node_manager_fkie/progress_queue.py", line 276, in run
self._target(*self._args)
TypeError: runNode() takes exactly 2 arguments (4 given)

Do you have an idea ?

node_manager on Ubuntu 16.04 and ROS Kinetic

Hi,
I checked out the kinetic-devel branch and built it successfully within my catkin workspace.

On startup the node_manager crashes. Maybe due to the change from qt4 to qt5 in ROS kinetic? Here is the error message I get:

Traceback (most recent call last):
File "/home/rikba/catkin_ws/devel/bin/node_manager", line 6, in
exec(fh.read())
File "", line 4, in
File "/home/rikba/catkin_ws/devel/lib/python2.7/dist-packages/node_manager_fkie/init.py", line 35, in
exec(__fh.read())
File "", line 46, in
File "/home/rikba/catkin_ws/src/node_manager/node_manager_fkie/src/node_manager_fkie/master_view_proxy.py", line 54, in
from node_manager_fkie.detailed_msg_box import WarningMessageBox, DetailedError
File "/home/rikba/catkin_ws/src/node_manager/node_manager_fkie/src/node_manager_fkie/detailed_msg_box.py", line 48, in
class WarningMessageBox(QtGui.QMessageBox):
AttributeError: 'module' object has no attribute 'QMessageBox'

Is there any update to be expected soon?

Thanks.

"Hub clients" can discover Hub but not vice versa

Hi,

So we're attempting to setup a hub toplogy using the new listen_mcast and send_mcast settings. Our hub clients have listen_mcast set to True and send_mcast set to False. The hub itself has listen_mcast and send_mcast set to True.

When we run in this type of configuration our clients can see the hub just fine (and not each other which is great!) but unfortunately the hub can't see the clients since the client never sends out anything as part of its heartbeat. We actually need them to see each other as there is topics and services that must be synchronized between the two.

A simple change that would allow a client to see a hub and vice versa would be to modify the send_heartbeat() to send the master discovery current state to each address in self._address if listen_mcast is True but send_mcast is False:

# New method for sending out current state just to addresses that have been detected
 def _send_current_state2addresses(self):
        try:
            if not self._send_mcast and self._listen_mcast:
                msg = self._create_current_state_msg()
                if msg is not None:
                    for addr in self._address:
                      rospy.logdebug('Send current state to address %s' % addr)
                      self.socket.send2addr(msg, addr)
        except Exception as e:
            rospy.logwarn('Send current state to addresses failed: %s\n' % e)
            self._init_socket()

 def send_heartbeat(self):
      with self.__lock:
            try:
                self._timer_heartbeat.cancel()
            except:
                pass
            invalid_uri = (self.master_monitor.getMasteruri() is None)
            invalid_state = (self.master_monitor.getCurrentState() is None)
            if not (invalid_uri or invalid_state or rospy.is_shutdown() or self.do_finish):
              if self._send_mcast:
                self._send_current_state2group()
             elif self._listen_mcast:
               # So in the case where send_mcast is disabled but not listen_mcast, we allow sending
               # of our state to known addresses (the hubs basically)
               self._send_current_state2addresses()

I'm not sure what you think of this.

Thanks.

master discovery: protocol not available error on odroid U3

I'm trying to get a multimaster setup working on an Odroid U3 and get and error when running master_discovery. Here is the screen dump, any help would be appreciated:

rosrun master_discovery_fkie master_discovery
[DEBUG] [WallTime: 1421188855.609521] init_node, name[/master_discovery], pid[2550]
[DEBUG] [WallTime: 1421188855.610482] binding to 0.0.0.0 0
[DEBUG] [WallTime: 1421188855.611127] bound to 0.0.0.0 51241
[DEBUG] [WallTime: 1421188855.612483] ... service URL is rosrpc://odroid:51241
[DEBUG] [WallTime: 1421188855.613140] [/master_discovery/get_loggers]: new Service instance
[DEBUG] [WallTime: 1421188855.617563] ... service URL is rosrpc://odroid:51241
[DEBUG] [WallTime: 1421188855.618277] [/master_discovery/set_logger_level]: new Service instance
[INFO] [WallTime: 1421188855.636224] ROS Master URI: http://odroid:11311
[INFO] [WallTime: 1421188855.667103] Check the ROS Master[Hz]: 1
[INFO] [WallTime: 1421188855.667809] Heart beat [Hz]: 2
[INFO] [WallTime: 1421188855.668324] Static hosts: []
[INFO] [WallTime: 1421188855.668809] Approx. network load: 136 bytes/s
/opt/ros/indigo/lib/python2.7/dist-packages/master_discovery_fkie/master_discovery.py:353: SyntaxWarning: The publisher should be created with an explicit keyword argument 'queue_size'. Please see http://wiki.ros.org/rospy/Overview/Publishers%20and%20Subscribers for more information.
self.pubstats = rospy.Publisher("~linkstats", LinkStatesStamped)
[INFO] [WallTime: 1421188855.710610] Start broadcasting at ('226.0.0.0', 11511)
[INFO] [WallTime: 1421188855.711547] Init multicast socket
[ERROR] [WallTime: 1421188855.712425] Error while start master_discovery: [Errno 92] Protocol not available
Killed

ROS Parameter Server Sync

I saw on the github page that the parameter server is not synced with the current version of the software. What was the reason for this? Is there a blocking issue on this?

using multimaster on machine with lan and wifi

there is robot with board A and B
roscore running on A
multimaster runs on B
A and B connected via Lan
B has a wifi
even running core on B doesn't solve a problem.
is there a setting to choose which connection multimaster use?
there is also possibility that multicast is disabled on the network. How can I test it?

node manager warning

Hello,

I am trying to connect two roscores, one running on an Ubuntu laptop and another running on an Ubuntu Odroid XU3, both with ROS Indigo.

I have successfully followed all the steps for the single network configuration from here: http://www.iri.upc.edu/files/scidoc/1607-Multi-master-ROS-systems.pdf

I am able to publish a topic from the laptop and read it on the Odroid.

However, when I try to open the node_manager to get a better idea of my network, I get the following warning, regarding the quality of the link and the time slip.

screenshot from 2016-03-30 23 17 58

Is there something I need to worry about or something I can do about it?

Thanks

Why ROS package still missing?

Hey,

I am not familiar with the packing / approval process of ROS so my question: Why is the package of multimasters / node_manger (ros-kinetic-node-manager-fkie) for kinetic still missing?

Can I help somehow?

Dependency on python-qt

Hi,
When we start to discover the master on remote host we get python error stating that the python-qt-buinding module is not existing. However we have limited storage on the robot and we want to avoid installing python-qt. Is the dependency on python-qt necessary even on the robot?
We tried to start only master-discovery on the robot and the node_manager discovered the robot, but same issue happens when we start a node for instance.

Thank you

zeroconf separate network problem

Hey,

I am using Ubuntu 14.04 and Indigo ROS on Intel based pc (hostname atbeetz5). I run separately roscore and node_manager. Faculty IT department updated firmware on the network switches and master_discovery is not working anymore. With zeroconf discovery I also have problems, because I can not have separate network for my project.

I establish connection like this:
zeroconf1

But I can immediately see other nodes and topics which should be in the network 0.
zeroconf2

Any idea what I am doing wrong or this could be a bug?

Unable to detect other ROS Multimaster Network

Hi, I am currently having trouble detecting the other ROS network via 224.0.0.1, even though I can ping and ssh each other. The output of my master_discovery node:

Computer 1 code : ~$ rosrun master_discovery_fkie master_discovery _mcast_group:224.0.0.1
[INFO] [WallTime: 1484214084.989779] ROS Master URI: http://172.22.58.242:11311
[INFO] [WallTime: 1484214085.000409] Check the ROS Master[Hz]: 1
[INFO] [WallTime: 1484214085.000930] Heart beat [Hz]: 0.02
[INFO] [WallTime: 1484214085.001756] Active request after [sec]: 60
[INFO] [WallTime: 1484214085.001945] Remove after [sec]: 300
[INFO] [WallTime: 1484214085.002111] Robot hosts: []
[INFO] [WallTime: 1484214085.002260] Approx. mininum avg. network load: 1.36 bytes/s
[WARN] [WallTime: 1484214085.011642] Error while start RPC-XML server on port 11611: [Errno 98] Address already in use
Try again...
[INFO] [WallTime: 1484214086.013270] Start RPC-XML Server at ('0.0.0.0', 11611)
[INFO] [WallTime: 1484214086.014247] Subscribe to parameter /roslaunch/uris
[INFO] [WallTime: 1484214086.020829] Listen for multicast at ('226.0.0.0', 11511)
[INFO] [WallTime: 1484214086.144409] Detected master discovery: http://172.22.58.242:11611
[INFO] [WallTime: 1484214086.246949] Added master with ROS_MASTER_URI=http://UX302LG:11311/

Computer 2 code:
~$ rosrun master_discovery_fkie master_discovery _mcast_group:=224.0.0.1[INFO] [WallTime: 1484214037.136613] ROS Master URI: http://tay:11311
[INFO] [WallTime: 1484214037.154114] Check the ROS Master[Hz]: 1
[INFO] [WallTime: 1484214037.154360] Heart beat [Hz]: 0.02
[INFO] [WallTime: 1484214037.154531] Active request after [sec]: 60
[INFO] [WallTime: 1484214037.154684] Remove after [sec]: 300
[INFO] [WallTime: 1484214037.154829] Robot hosts: []
[INFO] [WallTime: 1484214037.154976] Approx. mininum avg. network load: 1.36 bytes/s
[INFO] [WallTime: 1484214037.238761] Start RPC-XML Server at ('0.0.0.0', 11611)
[INFO] [WallTime: 1484214037.239193] Subscribe to parameter /roslaunch/uris
[INFO] [WallTime: 1484214037.243465] Listen for multicast at ('224.0.0.1', 11511)
[INFO] [WallTime: 1484214037.369855] Detected master discovery: http://172.22.22.86:11611
[INFO] [WallTime: 1484214037.475341] Added master with ROS_MASTER_URI=http://tay:11311/

I checked the multicast feature and both computers code shows this:
~$ cat /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
0

Hope you'll reply soon, thanks!

multicast not enabled

Hi , i am currently trying to enable a multicast on odroid UX4 but the multicast is disabled

$ rosrun master_discovery_fkie master_discovery _send_mcast:=False
[INFO] [WallTime: 1484135078.357509] ROS Master URI: http://flytpod:11311
[WARN] [WallTime: 1484135078.384945] This master_discovery is invisible because it send no heart beat messages! Set ~send_mcast to true or add hosts to ~robot_hosts.
[WARN] [WallTime: 1484135078.385453] Multicast is disabled. Use ~active_request_after(60.00) ot set ~heartbeat_hz to new value: 0.0167
[INFO] [WallTime: 1484135078.385826] Check the ROS Master[Hz]: 1
[INFO] [WallTime: 1484135078.386175] Heart beat [Hz]: 0.0166666666667
[INFO] [WallTime: 1484135078.386513] Active request after [sec]: 60
[INFO] [WallTime: 1484135078.386849] Remove after [sec]: 300
[INFO] [WallTime: 1484135078.387184] Robot hosts: []
[INFO] [WallTime: 1484135078.387519] Approx. mininum avg. network load: 0.00 bytes/s
[WARN] [WallTime: 1484135078.420415] Error while start RPC-XML server on port 11611: [Errno 98] Address already in use
Try again...
[INFO] [WallTime: 1484135079.422955] Start RPC-XML Server at ('0.0.0.0', 11611)
[INFO] [WallTime: 1484135079.433599] Subscribe to parameter /roslaunch/uris
[WARN] [WallTime: 1484135079.497026] Multicast disabled!
[INFO] [WallTime: 1484135079.500755] + Bind to unicast socket @(172.22.23.25:11511)
[INFO] [WallTime: 1484135079.721993] Detected master discovery: http://172.22.23.25:11611
[INFO] [WallTime: 1484135079.846462] Added master with ROS_MASTER_URI=http://flytpod:11311/
shutdown request: new node registered with same name
[INFO] [WallTime: 1484135330.886013] Unsubscribe from parameter /roslaunch/uris
[INFO] [WallTime: 1484135330.913508] shutdown own RPC server

$ rosrun master_discovery_fkie master_discovery _send_mcast:=False

Error while set the log level: [Errno 111] Connection refused
->INFO level will be used!
Traceback (most recent call last):
File "/opt/ros/indigo/lib/master_discovery_fkie/master_discovery", line 4, in
master_discovery_fkie.main()
File "/opt/ros/indigo/lib/python2.7/dist-packages/master_discovery_fkie/init.py", line 97, in main
rospy.init_node(PROCESS_NAME, log_level=log_level)
File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/client.py", line 323, in init_node
_init_node_params(argv, name)
File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/client.py", line 186, in _init_node_params
set_param(rosgraph.names.PRIV_NAME + param_name, param_value)
File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/client.py", line 504, in set_param
_param_server[param_name] = param_value #MasterProxy does all the magic for us
File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/msproxy.py", line 148, in setitem
self.target.setParam(rospy.names.get_caller_id(), rospy.names.resolve_name(key), val)
File "/usr/lib/python2.7/xmlrpclib.py", line 1233, in call
return self.__send(self.__name, args)
File "/usr/lib/python2.7/xmlrpclib.py", line 1587, in __request
verbose=self.__verbose
File "/usr/lib/python2.7/xmlrpclib.py", line 1273, in request
return self.single_request(host, handler, request_body, verbose)
File "/usr/lib/python2.7/xmlrpclib.py", line 1301, in single_request
self.send_content(h, request_body)
File "/usr/lib/python2.7/xmlrpclib.py", line 1448, in send_content
connection.endheaders(request_body)
File "/usr/lib/python2.7/httplib.py", line 1013, in endheaders
self._send_output(message_body)
File "/usr/lib/python2.7/httplib.py", line 864, in _send_output
self.send(msg)
File "/usr/lib/python2.7/httplib.py", line 826, in send
self.connect()
File "/usr/lib/python2.7/httplib.py", line 807, in connect
self.timeout, self.source_address)
File "/usr/lib/python2.7/socket.py", line 571, in create_connection
raise err

unable to detect the other master using master_discovery in one computer while the other computer can detect my master

##There is no errors

the first copmuter with ip 192.168.1.6

badra@badra-VirtualBox:~$ rosrun master_discovery_fkie master_discovery _mcast_group:=224.0.0.1
[INFO] [1519305154.375028]: ROS Master URI: http://192.168.1.6:11311/
[INFO] [1519305154.413346]: Check the ROS Master[Hz]: 1
[INFO] [1519305154.413815]: Heart beat [Hz]: 0.02
[INFO] [1519305154.418971]: Active request after [sec]: 60
[INFO] [1519305154.419649]: Remove after [sec]: 300
[INFO] [1519305154.420142]: Robot hosts: []
[INFO] [1519305154.420636]: Approx. mininum avg. network load: 1.36 bytes/s
[INFO] [1519305154.552176]: Start RPC-XML Server at ('0.0.0.0', 11611)
[INFO] [1519305154.554323]: Subscribe to parameter /roslaunch/uris
[INFO] [1519305154.571384]: Create multicast socket at ('224.0.0.1', 11511)
[INFO] [1519305154.790963]: Detected master discovery: http://localhost:11611
[INFO] [1519305154.898284]: Added master with ROS_MASTER_URI=http://badra-VirtualBox:11311/

The second computer with ip 192.168.1.8

nasr@nasr-VirtualBox:~$ rosrun master_discovery_fkie master_discovery _mcast_group:=224.0.0.1
[INFO] [1519305169.413408]: ROS Master URI: http://192.168.1.8:11311/
[INFO] [1519305169.437923]: Check the ROS Master[Hz]: 1
[INFO] [1519305169.438593]: Heart beat [Hz]: 0.02
[INFO] [1519305169.444326]: Active request after [sec]: 60
[INFO] [1519305169.445029]: Remove after [sec]: 300
[INFO] [1519305169.445306]: Robot hosts: []
[INFO] [1519305169.447084]: Approx. mininum avg. network load: 1.36 bytes/s
[INFO] [1519305169.495208]: Start RPC-XML Server at ('0.0.0.0', 11611)
[INFO] [1519305169.501487]: Subscribe to parameter /roslaunch/uris
[INFO] [1519305169.530136]: Create multicast socket at ('224.0.0.1', 11511)
[INFO] [1519305169.754659]: Detected master discovery: http://localhost:11611
[INFO] [1519305169.858051]: Added master with ROS_MASTER_URI=http://nasr-VirtualBox:11311/
[INFO] [1519305205.267947]: Detected master discovery: http://192.168.1.6:11611
[INFO] [1519305205.872249]: Added master with ROS_MASTER_URI=http://badra-VirtualBox:11311/

i have add the ip on the etc/hosts and the export ROS_Master_URI on the bashrc
and the two computers can ping each other with no errors

master discovery is not working on os x

When I start master discovery on os x I get the following error:

[WARN] 06.02.2015 17:54:53.423242 (master_monitor.py:_limited_log:651):
MasterMonitor[/master_discovery]: can't get PID: [Errno 61] Connection refused

Detected master does not get added or synchronized

We are running into an issue where a ROS master will get detected by another master but does not get added (or synchronized).

For example, sometimes we get the following in our master discovery logs (for example purposes, we'll say this is robot19):
`
[rosout][INFO] 2016-10-14 14:10:44,147: Detected master discovery: http://192.168.66.20:11611

[rosout][INFO] 2016-10-14 14:10:44,159: Detected master discovery: http://192.168.66.21:11611

[rosout][INFO] 2016-10-14 14:10:44,161: Detected master discovery: http://192.168.66.22:11611

[rosout][INFO] 2016-10-14 14:10:44,162: Detected master discovery: http://192.168.66.23:11611

[rosout][INFO] 2016-10-14 14:10:44,433: Added master with ROS_MASTER_URI=http://robot21.local:11311/

[rosout][INFO] 2016-10-14 14:10:44,439: Added master with ROS_MASTER_URI=http://robot22.local:11311/

[rosout][INFO] 2016-10-14 14:10:44,439: Added master with ROS_MASTER_URI=http://robot23.local:11311/
`
As you can see robot20 (192.168.66.20) was detected but never added. Its topics are never pulled in and it doesn't shows up in the /master_discovery/list_masters output.

I believe I know what the issue is but this is just a theory based on code analysis.

When a remote ROS master is detected and a new DiscoveredMaster object is created, it will run DiscoveredMaster::__retrieve_masterinfo() which in turns will execute the monitor URI XML RPC call masterContacts, which in turn calls MasterMonitor::getMasterContacts(). If this happens to be run after the master monitor has started but before it has actually set it's state (self.__master_state), the master URI, name, discoverer name and monitor URI will be returned with a timestamp of 0. As a result, the code that sets the DiscoveredMaster mastername and masteruri isn't executed and they remain None (master_discovery.py:341-370). It also doesn't cause the "Added" message to be logged which explains why we see "Detected" but not "Added". Furthermore, since neither the mastername nor the masteruri is set, it is never included in the /master_discovery/list_masters output (master_discovery.py:1045), and when a heartbeat is added for that remote ROS master it never generates a state change (master_discovery.py:174), which also means it never gets synchronized. The end result is the remote ROS master is invisible.

Unfortunately we haven't been running logging at DEBUG level, so I don't have the output of that XML RPC call to confirm this theory. I will look at changing that but in the meantime, would like to get your feedback on whether this seems like the likely culprit.

If it is then I believe the solution is very simple: retry the __retrieve_master_info() function when the timestamp is 0 on the assumption that on the next go, the remote master monitor will have completed it's state update.

Name or service not known with zeroconf and multiple networks

I'm trying to use the zeroconf master discovery and I'm getting the error you see below on one of the two masters. I have the ROS_MASTER_URI on both masters set to http://localhost:11311. zac-nuc-2 (where the error is occurring) is connected to multiple networks. Ethernet in the office (192.168.1.x) and a separate wifi network that's private to the robot (192.168.0.x). When I unplug from the office network I do not get this error.

The only way I've been able to get multimaster_fkie working with my setup is to manually specify the ROS_MASTER_URI and ROS_IP so they use the IP addresses of the adapters on the same network. Is there any way to make master_discovery node smarter about this? It's a less robust solution because the IP addresses of the computers may change.

zac@zac-nuc-2:~$ roslaunch mbot_bringup multimaster.launch 
... logging to /home/zac/.ros/log/6db37f2e-2ce5-11e6-9e94-b8aeed747bfd/roslaunch-zac-nuc-2-32361.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://zac-nuc-2:46305/

SUMMARY
========

PARAMETERS
 * /master_discovery/mcast_group: 224.0.0.1
 * /rosdistro: indigo
 * /rosversion: 1.11.19

NODES
  /
    master_discovery (master_discovery_fkie/zeroconf)
    master_sync (master_sync_fkie/master_sync)

auto-starting new master
process[master]: started with pid [32373]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 6db37f2e-2ce5-11e6-9e94-b8aeed747bfd
process[rosout-1]: started with pid [32386]
started core service [/rosout]
process[master_discovery-2]: started with pid [32389]
process[master_sync-3]: started with pid [32397]
[INFO] [WallTime: 1465327458.935863] ignore_hosts: []
[INFO] [WallTime: 1465327458.936477] ROS Master URI: http://localhost:11311
[INFO] [WallTime: 1465327458.936834] sync_hosts: []
[INFO] [WallTime: 1465327458.937800] sync_topics_on_demand: False
[WARN] [WallTime: 1465327458.940387] Master_discovery node appear not to running. Wait for topic with type 'MasterState.
[INFO] [WallTime: 1465327458.940863] Start RPC-XML Server at ('0.0.0.0', 11911)
[INFO] [WallTime: 1465327458.941151] Subscribe to parameter `/roslaunch/uris`
[INFO] [WallTime: 1465327458.950919] Zeroconf server now running.
[INFO] [WallTime: 1465327459.805123] zac-nuc-2 is now online
[INFO] [WallTime: 1465327459.945732] listen for updates on /master_discovery/changes
[INFO] [WallTime: 1465327459.948507] Update ROS master list...
[INFO] [WallTime: 1465327459.950773] service 'list_masters' found on /master_discovery/list_masters
[INFO] [WallTime: 1465327463.576900] marble-nuc-5 is now online
[INFO] [WallTime: 1465327463.579243] ignore_nodes: ['/*node_manager', '/*master_sync*', '/rosout', '/*zeroconf', '/*master_discovery*']
[INFO] [WallTime: 1465327463.581518] sync_nodes: []
[INFO] [WallTime: 1465327463.583131] ignore_topics: ['/rosout', '/rosout_agg']
[INFO] [WallTime: 1465327463.584923] sync_topics: []
[INFO] [WallTime: 1465327463.586602] ignore_services: ['/*get_loggers', '/*set_logger_level']
[INFO] [WallTime: 1465327463.588909] sync_services: []
[INFO] [WallTime: 1465327463.592739] ignore_type: ['bond/Status']
[INFO] [WallTime: 1465327463.596651] ignore_publishers: []
[INFO] [WallTime: 1465327463.598533] ignore_subscribers: []
[INFO] [WallTime: 1465327463.599912] do_not_sync: []
[ERROR] [WallTime: 1465327464.524674] SyncThread[marble-nuc-5] ERROR: Traceback (most recent call last):
  File "/opt/ros/indigo/lib/python2.7/dist-packages/master_sync_fkie/sync_thread.py", line 237, in _request_remote_state
    remote_state = remote_monitor.masterInfoFiltered(self._filter.to_list())
  File "/usr/lib/python2.7/xmlrpclib.py", line 1233, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1587, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.7/xmlrpclib.py", line 1273, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1301, in single_request
    self.send_content(h, request_body)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1448, in send_content
    connection.endheaders(request_body)
  File "/usr/lib/python2.7/httplib.py", line 975, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 835, in _send_output
    self.send(msg)
  File "/usr/lib/python2.7/httplib.py", line 797, in send
    self.connect()
  File "/usr/lib/python2.7/httplib.py", line 778, in connect
    self.timeout, self.source_address)
  File "/usr/lib/python2.7/socket.py", line 553, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
gaierror: [Errno -2] Name or service not known
marble@marble-nuc-5:~$ roslaunch mbot_bringup multimaster.launch 
... logging to /home/marble/.ros/log/753e1a06-2ce5-11e6-97ef-b8aeed7d7c01/roslaunch-marble-nuc-5-26259.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
WARNING: disk usage in log directory [/home/marble/.ros/log] is over 1GB.
It's recommended that you use the 'rosclean' command.

started roslaunch server http://marble-nuc-5:34820/

SUMMARY
PARAMETERS
 * /master_discovery/mcast_group: 224.0.0.1
 * /rosdistro: indigo
 * /rosversion: 1.11.19

NODES
  /
    master_discovery (master_discovery_fkie/zeroconf)
    master_sync (master_sync_fkie/master_sync)

auto-starting new master
process[master]: started with pid [26271]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 753e1a06-2ce5-11e6-97ef-b8aeed7d7c01
process[rosout-1]: started with pid [26284]
started core service [/rosout]
process[master_discovery-2]: started with pid [26288]
process[master_sync-3]: started with pid [26293]
[INFO] [WallTime: 1465327471.380536] ROS Master URI: http://localhost:11311
[INFO] [WallTime: 1465327471.382693] ignore_hosts: []
[INFO] [WallTime: 1465327471.384258] sync_hosts: []
[INFO] [WallTime: 1465327471.385789] sync_topics_on_demand: False
[INFO] [WallTime: 1465327471.387859] Start RPC-XML Server at ('0.0.0.0', 11911)
[INFO] [WallTime: 1465327471.388208] Subscribe to parameter `/roslaunch/uris`
[WARN] [WallTime: 1465327471.388624] Master_discovery node appear not to running. Wait for topic with type 'MasterState.
[INFO] [WallTime: 1465327471.396428] Zeroconf server now running.
[INFO] [WallTime: 1465327471.397530] zac-nuc-2 is now online
[INFO] [WallTime: 1465327472.278244] marble-nuc-5 is now online
[INFO] [WallTime: 1465327472.393340] listen for updates on /master_discovery/changes
[INFO] [WallTime: 1465327472.397299] Update ROS master list...
[INFO] [WallTime: 1465327472.406435] service 'list_masters' found on /master_discovery/list_masters
[INFO] [WallTime: 1465327472.412642] ignore_nodes: ['/*node_manager', '/*master_sync*', '/rosout', '/*zeroconf', '/*master_discovery*']
[INFO] [WallTime: 1465327472.414675] sync_nodes: []
[INFO] [WallTime: 1465327472.416285] ignore_topics: ['/rosout', '/rosout_agg']
[INFO] [WallTime: 1465327472.417981] sync_topics: []
[INFO] [WallTime: 1465327472.419486] ignore_services: ['/*get_loggers', '/*set_logger_level']
[INFO] [WallTime: 1465327472.421269] sync_services: []
[INFO] [WallTime: 1465327472.422929] ignore_type: ['bond/Status']
[INFO] [WallTime: 1465327472.424495] ignore_publishers: []
[INFO] [WallTime: 1465327472.426071] ignore_subscribers: []
[INFO] [WallTime: 1465327472.427660] do_not_sync: []

Start multimaster-fkie using a remote master (ROS_MASTER_URI)

Hi,

We are trying to start the master-discovery and master-sync nodes on a device with a remote ROS_MASTER_URI.
But when we try this, the master-sync node tells us:
"Master_discovery node appear not to running. Wait for topic with type 'MasterState."

When we take a look at the node manager we see we get another kind of error where it's complaining about the fact that the ROS_MASTER_URI is different than the origin IP address.

How can we start the discovery and sync nodes using a remote master?

"cannot import name QApplication" on ROS kinetic & Ubuntu 16.04

I can't run node_manager on Ubuntu 16.04 with ROS kinetic. I'm getting:

kistner@mrt-pc123:~$ rosrun node_manager_fkie node_manager
cannot import name QApplication

I have installed all PySide1 and all PyQt5 packages, and due too some dependency's some PySide2 and most PyQt4 packages.

In a normal shell this works fine:

kistner@mrt-pc123:~$ python
Python 2.7.12 (default, Jul  1 2016, 15:12:24) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from python_qt_binding.QtWidgets import QApplication

also all of these imports work:
from PyQt4.QtGui import QApplication
from PySide.QtGui import QApplication
from PyQt5.QtWidgets import QApplication
from PySide2.QtWidgets import QApplication

python_qt_binding uses PyQt5 bindings maybe this is a problem?

Request for a release tag

We've been testing the latest version and would like to include the current set of commits in our next release. In particular we are interested in the fix that addresses the case where the masteruriaddr is None as this has shown up in our logs. If possible we're like to tag a release for indigo-devel so we can get that in. Thanks.

[Indigo] Explicit queue_size for publishers

Starting the master_discovery produces some warnings in ROS Indigo:

/opt/ros/indigo/lib/python2.7/dist-packages/master_discovery_fkie/master_discovery.py:353: SyntaxWarning: The publisher should be created with an explicit keyword argument 'queue_size'. Please see http://wiki.ros.org/rospy/Overview/Publishers%20and%20Subscribers for more information.
  self.pubstats = rospy.Publisher("~linkstats", LinkStatesStamped)
/opt/ros/indigo/lib/python2.7/dist-packages/master_discovery_fkie/master_discovery.py:372: SyntaxWarning: The publisher should be created with an explicit keyword argument 'queue_size'. Please see http://wiki.ros.org/rospy/Overview/Publishers%20and%20Subscribers for more information.
  self.pubchanges = rospy.Publisher("~changes", MasterState)

Quoting from the ROS wiki:

As of Indigo not passing the keyword argument queue_size will result in a warning being printed to the console.

Masters bouncing offline/online & resync on reconnect

We've been doing some stress testing using the most recent version of multimaster and have identified an issue that is causing some of our masters to bounce between offline and online (which in turn is triggering the resync on reconnect feature). After some investigation we believe we understand the cause and want to get some feedback on what we are seeing.

  1. The bouncing behavior appears to be related to the code that removes offline masters. When a master has an unanswered heartbeat request, another request is then sent to that master plus all of the others. This has the affect of incrementing all the other masters "unanswered count" by +1. Because the callback code that would set that count to 0 uses the same lock as the removal code, the unanswered count can keep increasing by +1 on each iteration. In the case where there are at least 5 more masters after the one that had the unanswered count, this can increase the count to 5 unanswered requests for a master by the time we reach it in the loop and it is set offline. When the removal code exits the callback runs and sets the master back online (since it wasn't really offline). We see this occur repeatedly. The problem seems to be the request being sent to all other masters, not just the one with an unanswered request. Is there a particular reason this is done? Would you be open to having the request sent only to the master in question and not to the entire group in this case?

  2. Because the master bonces offline/online we see the resync on reconnect code running frequently, which we believe has caused some of the drop of messages we've been seeing. We addressed the problem by setting the 'resync_on_reconnect' param to False and everything is running fine. However we'd like to understand what we are losing by doing that. What particular problem does that feature address?

Thanks.

Incompatible ssh peer

I try to connect on a raspberry zero with indigo and "Raspbian GNU/Linux 8.0 (jessie)"

but :

failed : Incompatible ssh peer (no acceptable kex algorithm)

Synchonizing multiple robots crashes capability_server

I'm trying to run multiple turtlebots as a multimaster system. When I sync a single turtlebot with my control computer it works.

However, when I bring a second robot into the mix, the capability_server crashes when the system syncs.

I'm trying to only sync two topics. When not running the turtlebot packages, this appears to work. However, because the capablity_server crashes when I am running the turtlebot stack, I must conclude more information is being synced between the masters.

Can you please provide me with more information, or point me to a mistake?

Attached you can find my launchfile for the multimaster_sync.

<launch>

  <node name="master_sync" pkg="master_sync_fkie" type="master_sync" output="screen">
    <!-- Performs resync after the host was offline: unregister and register again to avoid connection losses to python topic. These does not suppot reconnection! -->
    <param name="resync_on_reconnect" value="True" />
    <!-- A configurable period that controls how long the offline-online period [sec] is before the resync kicks in.
     (Since version 0.5.9)-->
    <param name="resync_on_reconnect_timeout" value="0" />
    <!-- A filter list with patterns. If this pattern merges to a node, topic or service it will not be synchronized.
     (Since version 0.5.4)-->
    <rosparam param="do_not_sync">[]</rosparam>

    <!-- This list with names of ROS master to ignore -->
    <rosparam param="ignore_hosts">[]</rosparam>

    <!-- This list with names of ROS master to synchronize. Only this ROS master in this list will be synchronized. The ~ignore_hosts list is processed first. -->
    <rosparam param="sync_hosts">[]</rosparam>

    <!-- The list of nodes, which are to be ignored while a synchroniation. All their topics and services are ignored!
    These are defaults and cannot be removed: [/rosout, "/*master_sync* node", "remote /*master_discovery* node", "/*node_manager", /*zeroconf] -->
    <rosparam param="ignore_nodes">[]</rosparam>

    <!-- The list of nodes to synchronize. Only topics of this nodes are synchronized. The ~ignore_nodes, ~ignore_topics and ~ignore_services lists are processed first. -->
    <rosparam param="sync_nodes">[]</rosparam>

    <!-- The list of topics, which are to be ignored while a synchroniation. The ~ignore_nodes list is processed first.
    These are defaults and cannot be removed: ['/rosout', '/rosout_agg'] -->
<!--    <rosparam param="ignore_topics">["/*einstein*", "/*newton*", "/*tesla*", "/*pythagoras*", "/tf", "/tf_static", "/*move_base*", "/*camera*", "/*navigation*", "/odom", "/*mobile_base*", "/*amcl*", "/*capability_server*", "/*cmd_vel_mux*", "/*depthimage_to_laserscan*", "/*diagnostics*", "/*gateway*", "/*info*", "/*initialpose*", "/*interactions*", "/*joint_states*", "/*kobuki_safety_controller*", "/*map*", "/*map_metadata*", "/*navigation_velocity_smoother*", "/particlecloud", "/rosout", "/rosout_agg", "/scan", "/*zeroconf*"]</rosparam> -->
    <rosparam param="ignore_topics">[]</rosparam>
    <rosparam param="ignore_publishers">[]</rosparam>
    <rosparam param="ignore_subscribers">[]</rosparam>

    <!-- The list of topics to synchronize. The ~ignore_nodes and ~ignore_topics lists are processed first. -->
    <rosparam param="sync_topics">['/pickup_command',  '/pickup_response']</rosparam>

    <!-- The list of services, which are to be ignored while a synchroniation. The ~ignore_nodes list is processed first.
    These are defaults and cannot be removed: ['/*get_loggers', '/*set_logger_level'] -->
    <rosparam param="ignore_services">[]</rosparam>

    <!-- The list of services to synchronize. The ~ignore_nodes and ~ignore_services lists are processed first. -->
    <rosparam param="sync_services">[]</rosparam>

    <!-- This parameter is only regarded, if sync_nodes or sync_topics are set. In this case the subscribed and published topics are synchronized even if they are not in the sync_* list -->
    <param name="sync_topics_on_demand" value="False" />

    <!-- The list of types to ignore.
    These are defaults and cannot be removed: ['bond/Status'] -->
    <rosparam param="ignore_type">[]</rosparam>

    <!-- The nodes which are running not at the same host as the ROS master are not synchronized by default. Use sync_remote_nodes to sync these nodes also. -->
    <param name="sync_remote_nodes" value="False" />
  </node>
</launch>

Advertise the packages here

Just a friendly suggestion that packages in this repo needs to be notified!

I feel so lucky to have happened to find node_manager_fkie today. This seems to make my life easier. AFAIK you guys haven't advertised these packages ROS-wise have you?
Thanks a lot.

Local and global topics/services

I'm new to the multimaster concept.

I have a situation where I have multiple robots running local ros networks and would like to facilitate communication between these networks using ROS. Since each local network uses the same set of topics, the common topics have to be isolated and the topics/services that are needed for inter robot communication, have to be enabled.

Is this possible? Or is using namespace the only way to solve this?

General Question

Hello,

I am currently trying to understand the functionallity of this package to reduce the network comnunication.

I an having 3 robots and one server. Each robot has its own namespace and all of them publishes the same topics. The Server is subscribing a few important topics. Each of thems starts a master discovery and sync node.

My aim is, that all robots ignore all nodes of the other robots. Therefore i use "ignore_nodes". The Server uses "ignore_topics / services" to receive only necessary information.

In case of ignoring e. G. a topic, does this mean, corresponding tcp data packages are not sent to the network and stay on the local master?

Checking the comnunication with wireshark, the robots still send a heap of packages into the network to each robot. But using ignoring nodes of this package they shouldn't, as far as I understand. The amount of meassured packages is nearly the same between Standard multimaster and multimaster using ignore Parameters.

Can you help me with this thread? Its hard to explain but I hope you can understand my general question behind this issue.

Thanks in advance!

No module named editor

I'm not sure when this broke, but I can't run node_manager on my machine any more. It just prints:

No module named editor

And then exits. This is ubuntu 14.04, and I have ros-indigo-node-manager-fkie installed. I tried reinstalling some things, and even did pip install python-editor, but no dice. Any tips on what might be broken?

Timeout causing sync/update failures.

Hello,

I'm encountering an issue where network latency timeouts appears to be causing the following errors to occur.

[ERROR][1452869534.196188][/master_sync]: SyncThread[dev-vm-nimbus-02-gazebo.local] ERROR: Traceback (most recent call last):
File "/opt/ros/indigo/lib/python2.7/dist-packages/master_sync_fkie/sync_thread.py", line 233, in _request_remote_state
remote_state = remote_monitor.masterInfoFiltered(self._filter.to_list())
File "/usr/lib/python2.7/xmlrpclib.py", line 1233, in _call_
return self._send(self._name, args)
File "/usr/lib/python2.7/xmlrpclib.py", line 1587, in __request
verbose=self.__verbose
File "/usr/lib/python2.7/xmlrpclib.py", line 1273, in request
return self.single_request(host, handler, request_body, verbose)
File "/usr/lib/python2.7/xmlrpclib.py", line 1301, in single_request
self.send_content(h, request_body)
File "/usr/lib/python2.7/xmlrpclib.py", line 1448, in send_content
connection.endheaders(request_body)
File "/usr/lib/python2.7/httplib.py", line 975, in endheaders
self._send_output(message_body)
File "/usr/lib/python2.7/httplib.py", line 835, in _send_output
self.send(msg)
File "/usr/lib/python2.7/httplib.py", line 797, in send
self.connect()
File "/usr/lib/python2.7/httplib.py", line 778, in connect
self.timeout, self.source_address)
File "/usr/lib/python2.7/socket.py", line 571, in create_connection
raise err
timeout: timed out

and

[ERROR] [WallTime: 1452806226.279808] [1452806216.276963] SyncThread[dev-vm-nimbus-02-robot2.local] ERROR: Traceback (most recent call last):
File "/opt/ros/indigo/lib/python2.7/dist-packages/master_sync_fkie/sync_thread.py", line 341, in _apply_remote_state
result = own_master_multi()
File "/usr/lib/python2.7/xmlrpclib.py", line 998, in _call_
return MultiCallIterator(self.__server.system.multicall(marshalled_list))
File "/usr/lib/python2.7/xmlrpclib.py", line 1233, in _call_
return self._send(self._name, args)
File "/usr/lib/python2.7/xmlrpclib.py", line 1587, in __request
verbose=self.__verbose
File "/usr/lib/python2.7/xmlrpclib.py", line 1273, in request
return self.single_request(host, handler, request_body, verbose)
File "/usr/lib/python2.7/xmlrpclib.py", line 1301, in single_request
self.send_content(h, request_body)
File "/usr/lib/python2.7/xmlrpclib.py", line 1448, in send_content
connection.endheaders(request_body)
File "/usr/lib/python2.7/httplib.py", line 975, in endheaders
self._send_output(message_body)
File "/usr/lib/python2.7/httplib.py", line 835, in _send_output
self.send(msg)
File "/usr/lib/python2.7/httplib.py", line 797, in send
self.connect()
File "/usr/lib/python2.7/httplib.py", line 778, in connect
self.timeout, self.source_address)
File "/usr/lib/python2.7/socket.py", line 571, in create_connection
raise err
error: [Errno 111] Connection refused

After these errors occur it appears as though the syncing and multimaster communication falls over.

I have a suspicion that it is sync_thread.py#L396.

self._update_timer = threading.Timer(random.random() * 2., self._request_remote_state, args=(self._apply_remote_state,))
self._update_timer.start()

The exception bypasses the timer starting again and sync updates are no longer running.

I'm happy to provide a fix, but would like to confirm my suspicions with someone more knowledgeable. Any feedback would be appreciated.

Some master_sync parameter don't seem to be working.

Hi,

Whenever I try to use the ignore_topics or sync_topics parameter, it doesn't seem to have any effect.
The terminal is indicating that the parameters are entered correctly by printing them but all the existing topics are received by other masters in the same network regardless of the entered parameter values.
I have taken a look a look at the Hyrdo (which we are using) branch implementation and I couldn't find any implementation regarding these parameters.
I was only able to find some implementation about the sync_topics_on_demand parameter but not about the others.

Thanks.

Using multimaster with 2 identical robots and a ground station

Hi, I'd like to use multimaster for a setup with 3 machines, each running their own ROS master. One of the machines is a ground station, while the other 2 are identical vehicles with many nodes and topics. I would only like a small subset of topics from each of the vehicles to be shared with the base station alone. On each of the vehicles, I launch:

<launch>
  <arg name="robot_name" default="robot0" />
  <node name="master_discovery" pkg="master_discovery_fkie" type="master_discovery" >
  </node>
  <!-- Launch the relay node -->
  <node pkg="topic_tools" type="relay" name="robot_relay" args="/shared_topic /$(arg robot_name)/shared_topic" />
</launch>

with a different "robot_name" argument for each since I want the base station to differentiate between this shared_topic. On the base station, I launch:

<launch>
  <node name="master_discovery" pkg="master_discovery_fkie" type="master_discovery" output="screen">
  </node>
  <node name="master_sync" pkg="master_sync_fkie" type="master_sync" output="screen">
    <rosparam param="sync_topics"> ['/robot0/shared_topic', '/robot1/shared_topic'] </rosparam>
  </node>
</launch>

which allows the base station to successfully receive /robot0/shared_topic OR /robot1/shared_topic when only one of the vehicle's has launched the first launch file. When I try to run both, I get the following warning before the nodes on the vehicle shutdown:

Reason given for shutdown: [new node registered with same name].

Each vehicle and the base station have their own ROS Master with their own local IP address as the ROS_MASTER_URI. I was under the impression that master_discovery simply makes the machines aware of one another, and only master_sync will cause collisions like this. Is there some argument that master_discovery needs like "ignore_hosts" or "ignore_nodes"? I only want the ground station to be aware of a few topics from each vehicle, but the fact that the vehicles have a large number of nodes with the same name prevents this. I realize I could namespace each vehicle so that the topics and nodes all have different names, but I was wondering if there was another solution with just arguments to the launch files I have here, or if I'm misunderstanding the default behaviour of master_discovery. Thanks!

Not getting topics in it's own master

Hey guys,

I have two computers (A and B) connected to each other. Each one is running it's own roscore and multimaster_discovery and multimaster_sync. In normal operation everything is going well, all the topics appear on both sides.

However I'm getting a problem when the connection breaks. Imagine, I have a topic being published on computer A and I can see it on computer A and B. Now, if I disconnect the ethernet cable on computer B, obviously I cannot get the topic on computer B, but I also can't get it on computer A!!

I don't know exactly how multimaster works under the hood, but I think it doesn't make sense that you cannot get a topic that is being published on it's own roscore.

Hope that you can help me.
Thanks in advance!

master synchronization always failed

When conneciton time out your master synchronization kill itself. But Master Discovery continue to wkorking. Can you restart your master synchronization when it take a message from master discovery. Maybe you can write a subscribe to discovery node or when it restart to take any message from discovery it can restart master synchronization again. We use your project at our project. İf ı know phyton well i would do it myself.

Zeroconf: fails to quit if the ROS_MASTER_URI is misconfigured

This is due to rospy.log*** which provides the ability to use a comma instead of a %.

rosrun master_discovery_fkie zeroconf 
[INFO] [1515680044.689815]: ROS Master URI: http://127.0.0.1:11311
[INFO] [1515680044.693266]: Network ID: 0
[INFO] [1515680044.698691]: Start RPC-XML Server at ('0.0.0.0', 11911)
[INFO] [1515680044.699377]: Subscribe to parameter `/roslaunch/uris`
Traceback (most recent call last):
  File "/opt/ros/kinetic/lib/master_discovery_fkie/zeroconf", line 4, in <module>
    master_discovery_fkie.main_zeroconf()
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/master_discovery_fkie/__init__.py", line 132, in main_zeroconf
    discoverer = zeroconf.Discoverer(rpc_port, mcast_port - MCAST_PORT)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/master_discovery_fkie/zeroconf.py", line 767, in __init__
    sys.exit("'%s' is not reachable for other systems. Change the ROS_MASTER_URI!", masterhost)
TypeError: exit expected at most 1 arguments, got 2

sync_topics parameter not working?

It looks like sync_topics is ignored (at least in my case). With following setup:

ROS1 (ROS_MASTER_URI=http://localhost:11312)

  • rostopic pub /test/topic std_msgs/String 'Hello World' -r 1
  • rostopic pub /test/topic_secret std_msgs/String 'Hello World!' -r 1
  • rosrun master_discovery_fkie master_discovery
  • rosrun master_sync_fkie master_sync _sync_topics:=["/test/topic"] _sync_topics_on_demand:=false

ROS2 (ROS_MASTER_URI=http://localhost:11311)

  • rosrun master_discovery_fkie master_discovery
  • rosrun master_sync_fkie master_sync _sync_topics_on_demand:=false
  • rostopic echo /test/topic -> works (as expected)
  • rostopic echo /test/topic_secret -> also works

Am I missing something or is it a bug? I would like to "flip" only selected topics between ROS1 and ROS2. Thanks in advance.

Ubuntu 14.04, ROS Indigo, multimaster_fkie from debs (also tried with current version from git).

Ignoring TF sync

Hello,

Think that we have two robots with their topics and nodes are namespaced. I want to ignore /tf topic since tf information on another robot is not relevant to the other. I have tried to add /tf to ignore_topics parameter however this does not seem to work. Still TF information is received from the other robot. Can you guide me?

Thanks

Crash on ros Kinetic when prompted for a dialog box to input a username and password

I am currently using node_manager with ros kinetic

When I am prompted for a username / password during the starting of a master_discovery host, Node Manager crashes giving the error:

[INFO] [WallTime: 1470733744.360508] Run remote on auk: rosrun node_manager_fkie remote_nm.py --package master_discovery_fkie --node_type master_discovery --node_name /master_discovery _mcast_port:=11511 _mcast_group:=226.0.0.0 _robot_hosts:=[] _heartbeat_hz:=0.5 __name:=master_discovery
Traceback (most recent call last):
  File "/home/z/catkin_ws/src/multimaster_fkie/node_manager_fkie/src/node_manager_fkie/progress_queue.py", line 210, in _on_request_interact
    res, user, pw = nm.ssh()._requestPW(req.request.user, req.request.host)
  File "/home/z/catkin_ws/src/multimaster_fkie/node_manager_fkie/src/node_manager_fkie/ssh_handler.py", line 249, in _requestPW
    pwInput = QtGui.QDialog()
AttributeError: 'module' object has no attribute 'QDialog'
Aborted (core dumped)

The issue seems to be due to the function _requestPW in ssh_handler.py using the old Qt4 way of accessing a dialog. Starting on line 246 changing

        from python_qt_binding import QtGui
        result = False
        pw = None
        pwInput = QtGui.QDialog()

to

        from python_qt_binding import QtWidgets
        result = False
        pw = None
        pwInput = QtWidgets.QDialog()

appears to fix the issue

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.