ROS for LabVIEW(TM) Software

cancel
Showing results for 
Search instead for 
Did you mean: 

Publisher appears in list but no data transmitted

Hi,

I have started using your toolbox and have successfully created and tested a subscriber however I am having issues getting a publisher created from Labview to actually publish data.  The Labview code is the same as in your example code.

When I try "rostopic list" the topic appears ('helloROS') but when I try to 'echo' nothing appears.  Doing 'rostopic info helloROS' shows the publisher as the defined node but it states 'unknown address.'

When I look inside ROSNode.vi the node and subscriber have a green tick but the helloROS has a brown tick.  Also, the Port number for the publisher appears as 0 whilst the others are 50,000+.

Appreciate all suggestions.

Many thanks,

Leo

0 Kudos
Message 1 of 8
(15,454 Views)

An update.  So I have resolved the issue of the unknown address - I had two networks on the remote (labview) computer and it was choosing the wrong IP as my IP.  This hasn't fixed the main issue of the topic data.

Now everything appears to be correct and the ROS_IP and ROS_MASTER_URI are set correctly.  Now I can create a publisher with labview (that appears in the master machine using 'rostopic list') and subscribe to the same topic from labview.  This all works fine but when I try to 'echo' or actually create a node on the master computer to subscribe to this topic, no data appears.

Trying to ping the publishing node using rosnode ping gives the following error:

rosnode ping /Labview_publisher

rosnode: node is [/Labview_publisher]

pinging /Labview_publisher with a timeout of 3.0s

Traceback (most recent call last):

  File "/opt/ros/hydro/bin/rosnode", line 35, in <module>

    rosnode.rosnodemain()

  File "/opt/ros/hydro/lib/python2.7/dist-packages/rosnode/__init__.py", line 78              6, in rosnodemain

    sys.exit(_rosnode_cmd_ping(argv) or 0)

  File "/opt/ros/hydro/lib/python2.7/dist-packages/rosnode/__init__.py", line 74              9, in _rosnode_cmd_ping

    rosnode_ping(node_name, verbose=True, max_count=options.ping_count)

  File "/opt/ros/hydro/lib/python2.7/dist-packages/rosnode/__init__.py", line 32              4, in rosnode_ping

    pid = _succeed(node.getPid(ID))

  File "/usr/lib/python2.7/xmlrpclib.py", line 1224, in __call__

    return self.__send(self.__name, args)

  File "/usr/lib/python2.7/xmlrpclib.py", line 1578, in __request

    verbose=self.__verbose

  File "/usr/lib/python2.7/xmlrpclib.py", line 1264, in request

    return self.single_request(host, handler, request_body, verbose)

  File "/usr/lib/python2.7/xmlrpclib.py", line 1294, in single_request

    response = h.getresponse(buffering=True)

  File "/usr/lib/python2.7/httplib.py", line 1030, in getresponse

    response.begin()

  File "/usr/lib/python2.7/httplib.py", line 407, in begin

    version, status, reason = self._read_status()

  File "/usr/lib/python2.7/httplib.py", line 371, in _read_status

    raise BadStatusLine(line)

httplib.BadStatusLine: ''

Note that I can successfully ping the other computer.

Any ideas people?

0 Kudos
Message 2 of 8
(14,037 Views)

Hi Leo. I was looking at your problem and was able to reproduce it. I experienced a problem similar to this a few months ago when we were working on an earlier release. I'm going to contact the person who helped me solve this and get back to you

0 Kudos
Message 3 of 8
(14,037 Views)

Hi Whitney,

Thanks for your reply.  I just tried my VI from another computer with a 'plain' version of Windows (i.e. not the corporate work computer with all the security that I had been using) and voila it all works.  Problem is that I cannot connect a 'plain' computer to our network so I will look for a workaround.

I would still be interested to hear your solution to see if it is a similar security program causing havoc or something else.  I cannot disable the security on my work computer so I cannot confirm that it definately is the culprit.

Cheers,

Leo

0 Kudos
Message 4 of 8
(14,037 Views)

Hi Leo,

I'm glad you got it working on a computer! I checked with the person I was working with over the summer and he said that we solved the problem by not running the master on a virtual Linux machine.

We're working at a university that also has a very secure network. We disabled all the firewalls on the PCs we're using to test. Like you said, that's not an option for you, but if your company allows it, you can to add a rule to the firewall allowing LabVIEW access. That has solved some of our communication issues before.

Whitney

0 Kudos
Message 5 of 8
(14,037 Views)

Hey Leo,

When you were publishing, were you using the topic repeat VI as opposed to the topic write? I just discovered a bug in the topic repeat VI - I don't think the data is being properly transmitted to the master. If you replace the VI with the topic write, it should work.

Hopfully I'll get the topic repeat bug sorted soon.

Whitney

0 Kudos
Message 6 of 8
(14,037 Views)

Hi Everyone,

I'm having the same issue. All my firewalls are turned off. I can see the topics but the messages are not being published. Has anyone found a work around for this? Really appriciate your help!
Guru

0 Kudos
Message 7 of 8
(14,037 Views)

Hi Everyone,

After toil and randomness, I have a solution. On Windows, TURN ON all firewalls and use recommended settings. When windows asks you to allow labview to access the network, allow windows to do just that. This worked for me. I had all my firewalls turned off before. I really don't know what is going on. I've reproduced the error with and without the firewalls / recommended settings and it seems to be the cause.

Thanks and happy debugging

Guru

0 Kudos
Message 8 of 8
(14,037 Views)